/// <summary>
 /// Get a list of Capability resources that extend a Target resource..
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// String that represents an Azure resource group.
 /// </param>
 /// <param name='parentProviderNamespace'>
 /// String that represents a resource provider namespace.
 /// </param>
 /// <param name='parentResourceType'>
 /// String that represents a resource type.
 /// </param>
 /// <param name='parentResourceName'>
 /// String that represents a resource name.
 /// </param>
 /// <param name='targetName'>
 /// String that represents a Target resource name.
 /// </param>
 /// <param name='continuationToken'>
 /// String that sets the continuation token.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Capability> > ListAsync(this ICapabilitiesOperations operations, string resourceGroupName, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, continuationToken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes a new instance of the SqlManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public SqlManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._auditingPolicy                       = new AuditingPolicyOperations(this);
     this._capabilities                         = new CapabilitiesOperations(this);
     this._databaseActivation                   = new DatabaseActivationOperations(this);
     this._databaseBackup                       = new DatabaseBackupOperations(this);
     this._databases                            = new DatabaseOperations(this);
     this._dataMasking                          = new DataMaskingOperations(this);
     this._elasticPools                         = new ElasticPoolOperations(this);
     this._firewallRules                        = new FirewallRuleOperations(this);
     this._recommendedElasticPools              = new RecommendedElasticPoolOperations(this);
     this._recommendedIndexes                   = new RecommendedIndexOperations(this);
     this._databaseReplicationLinks             = new ReplicationLinkOperations(this);
     this._secureConnection                     = new SecureConnectionPolicyOperations(this);
     this._securityAlertPolicy                  = new SecurityAlertPolicyOperations(this);
     this._serverAdministrators                 = new ServerAdministratorOperations(this);
     this._communicationLinks                   = new ServerCommunicationLinkOperations(this);
     this._serverDisasterRecoveryConfigurations = new ServerDisasterRecoveryConfigurationOperations(this);
     this._servers                            = new ServerOperations(this);
     this._serverUpgrades                     = new ServerUpgradeOperations(this);
     this._serviceObjectives                  = new ServiceObjectiveOperations(this);
     this._serviceTierAdvisors                = new ServiceTierAdvisorOperations(this);
     this._transparentDataEncryption          = new TransparentDataEncryptionOperations(this);
     this._apiVersion                         = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Get a list of Capability resources that extend a Target resource..
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Capability> > ListNextAsync(this ICapabilitiesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the subscription capabilities available for the specified location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location name whose capabilities are retrieved.
 /// </param>
 /// <param name='include'>
 /// If specified, restricts the response to only include the selected item.
 /// Possible values include: 'supportedEditions',
 /// 'supportedElasticPoolEditions', 'supportedManagedInstanceVersions'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocationCapabilities> ListByLocationAsync(this ICapabilitiesOperations operations, string locationName, string include = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationWithHttpMessagesAsync(locationName, include, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the capabilities available for the specified location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// The location id whose capabilities are retrieved.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocationCapabilitiesInner> ListByLocationAsync(this ICapabilitiesOperations operations, string locationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationWithHttpMessagesAsync(locationId, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns information about the Azure SQL capabilities available for
 /// the specified region.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.ICapabilitiesOperations.
 /// </param>
 /// <param name='locationName'>
 /// Required. The name of the region for which the Azure SQL
 /// capabilities are retrieved.
 /// </param>
 /// <returns>
 /// Represents the response to a Get Azure Sql capabilities request
 /// </returns>
 public static LocationCapabilitiesGetResponse Get(this ICapabilitiesOperations operations, string locationName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICapabilitiesOperations)s).GetAsync(locationName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns information about the Azure SQL capabilities available for
 /// the specified region.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.ICapabilitiesOperations.
 /// </param>
 /// <param name='locationName'>
 /// Required. The name of the region for which the Azure SQL
 /// capabilities are retrieved.
 /// </param>
 /// <returns>
 /// Represents the response to a Get Azure Sql capabilities request
 /// </returns>
 public static Task <LocationCapabilitiesGetResponse> GetAsync(this ICapabilitiesOperations operations, string locationName)
 {
     return(operations.GetAsync(locationName, CancellationToken.None));
 }
 /// <summary>
 /// Get a list of Capability resources that extend a Target resource..
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// String that represents an Azure resource group.
 /// </param>
 /// <param name='parentProviderNamespace'>
 /// String that represents a resource provider namespace.
 /// </param>
 /// <param name='parentResourceType'>
 /// String that represents a resource type.
 /// </param>
 /// <param name='parentResourceName'>
 /// String that represents a resource name.
 /// </param>
 /// <param name='targetName'>
 /// String that represents a Target resource name.
 /// </param>
 /// <param name='continuationToken'>
 /// String that sets the continuation token.
 /// </param>
 public static IPage <Capability> List(this ICapabilitiesOperations operations, string resourceGroupName, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, string continuationToken = default(string))
 {
     return(operations.ListAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, continuationToken).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get a list of Capability resources that extend a Target resource..
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Capability> ListNext(this ICapabilitiesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create or update a Capability resource that extends a Target resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// String that represents an Azure resource group.
 /// </param>
 /// <param name='parentProviderNamespace'>
 /// String that represents a resource provider namespace.
 /// </param>
 /// <param name='parentResourceType'>
 /// String that represents a resource type.
 /// </param>
 /// <param name='parentResourceName'>
 /// String that represents a resource name.
 /// </param>
 /// <param name='targetName'>
 /// String that represents a Target resource name.
 /// </param>
 /// <param name='capabilityName'>
 /// String that represents a Capability resource name.
 /// </param>
 public static Capability CreateOrUpdate(this ICapabilitiesOperations operations, string resourceGroupName, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, string capabilityName)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a Capability that extends a Target resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// String that represents an Azure resource group.
 /// </param>
 /// <param name='parentProviderNamespace'>
 /// String that represents a resource provider namespace.
 /// </param>
 /// <param name='parentResourceType'>
 /// String that represents a resource type.
 /// </param>
 /// <param name='parentResourceName'>
 /// String that represents a resource name.
 /// </param>
 /// <param name='targetName'>
 /// String that represents a Target resource name.
 /// </param>
 /// <param name='capabilityName'>
 /// String that represents a Capability resource name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ICapabilitiesOperations operations, string resourceGroupName, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, string capabilityName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete a Capability that extends a Target resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// String that represents an Azure resource group.
 /// </param>
 /// <param name='parentProviderNamespace'>
 /// String that represents a resource provider namespace.
 /// </param>
 /// <param name='parentResourceType'>
 /// String that represents a resource type.
 /// </param>
 /// <param name='parentResourceName'>
 /// String that represents a resource name.
 /// </param>
 /// <param name='targetName'>
 /// String that represents a Target resource name.
 /// </param>
 /// <param name='capabilityName'>
 /// String that represents a Capability resource name.
 /// </param>
 public static void Delete(this ICapabilitiesOperations operations, string resourceGroupName, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, string capabilityName)
 {
     operations.DeleteAsync(resourceGroupName, parentProviderNamespace, parentResourceType, parentResourceName, targetName, capabilityName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the subscription capabilities available for the specified location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The location name whose capabilities are retrieved.
 /// </param>
 /// <param name='include'>
 /// If specified, restricts the response to only include the selected item.
 /// Possible values include: 'supportedEditions',
 /// 'supportedElasticPoolEditions', 'supportedManagedInstanceVersions'
 /// </param>
 public static LocationCapabilities ListByLocation(this ICapabilitiesOperations operations, string locationName, string include = default(string))
 {
     return(operations.ListByLocationAsync(locationName, include).GetAwaiter().GetResult());
 }