text:
namespace Microsoft.Azure.Management.CosmosDB
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for SqlResourcesOperations.
    /// </summary>
    public static partial class SqlResourcesOperationsExtensions
    {
            /// <summary>
            /// Lists the SQL databases under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static IEnumerable<SqlDatabaseGetResults> ListSqlDatabases(this ISqlResourcesOperations operations, string resourceGroupName, string accountName)
            {
                return operations.ListSqlDatabasesAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the SQL databases under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlDatabaseGetResults>> ListSqlDatabasesAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlDatabasesWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the SQL database under an existing Azure Cosmos DB database account
            /// with the provided name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static SqlDatabaseGetResults GetSqlDatabase(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.GetSqlDatabaseAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the SQL database under an existing Azure Cosmos DB database account
            /// with the provided name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlDatabaseGetResults> GetSqlDatabaseAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlDatabaseWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='createUpdateSqlDatabaseParameters'>
            /// The parameters to provide for the current SQL database.
            /// </param>
            public static SqlDatabaseGetResults CreateUpdateSqlDatabase(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters)
            {
                return operations.CreateUpdateSqlDatabaseAsync(resourceGroupName, accountName, databaseName, createUpdateSqlDatabaseParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='createUpdateSqlDatabaseParameters'>
            /// The parameters to provide for the current SQL database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlDatabaseGetResults> CreateUpdateSqlDatabaseAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlDatabaseWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, createUpdateSqlDatabaseParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static void DeleteSqlDatabase(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                operations.DeleteSqlDatabaseAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlDatabaseAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlDatabaseWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Gets the RUs per second of the SQL database under an existing Azure Cosmos
            /// DB database account with the provided name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static ThroughputSettingsGetResults GetSqlDatabaseThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.GetSqlDatabaseThroughputAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the RUs per second of the SQL database under an existing Azure Cosmos
            /// DB database account with the provided name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> GetSqlDatabaseThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlDatabaseThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// database.
            /// </param>
            public static ThroughputSettingsGetResults UpdateSqlDatabaseThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters)
            {
                return operations.UpdateSqlDatabaseThroughputAsync(resourceGroupName, accountName, databaseName, updateThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> UpdateSqlDatabaseThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.UpdateSqlDatabaseThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, updateThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static ThroughputSettingsGetResults MigrateSqlDatabaseToAutoscale(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.MigrateSqlDatabaseToAutoscaleAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> MigrateSqlDatabaseToAutoscaleAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.MigrateSqlDatabaseToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static ThroughputSettingsGetResults MigrateSqlDatabaseToManualThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.MigrateSqlDatabaseToManualThroughputAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> MigrateSqlDatabaseToManualThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.MigrateSqlDatabaseToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL
            /// database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static IEnumerable<ClientEncryptionKeyGetResults> ListClientEncryptionKeys(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.ListClientEncryptionKeysAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL
            /// database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<ClientEncryptionKeyGetResults>> ListClientEncryptionKeysAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListClientEncryptionKeysWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL
            /// database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            public static ClientEncryptionKeyGetResults GetClientEncryptionKey(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName)
            {
                return operations.GetClientEncryptionKeyAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL
            /// database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ClientEncryptionKeyGetResults> GetClientEncryptionKeyAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetClientEncryptionKeyWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update a ClientEncryptionKey. This API is meant to be invoked via
            /// tools such as the Azure Powershell (instead of directly).
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            /// <param name='createUpdateClientEncryptionKeyParameters'>
            /// The parameters to provide for the client encryption key.
            /// </param>
            public static ClientEncryptionKeyGetResults CreateUpdateClientEncryptionKey(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, ClientEncryptionKeyCreateUpdateParameters createUpdateClientEncryptionKeyParameters)
            {
                return operations.CreateUpdateClientEncryptionKeyAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName, createUpdateClientEncryptionKeyParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update a ClientEncryptionKey. This API is meant to be invoked via
            /// tools such as the Azure Powershell (instead of directly).
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            /// <param name='createUpdateClientEncryptionKeyParameters'>
            /// The parameters to provide for the client encryption key.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ClientEncryptionKeyGetResults> CreateUpdateClientEncryptionKeyAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, ClientEncryptionKeyCreateUpdateParameters createUpdateClientEncryptionKeyParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateClientEncryptionKeyWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName, createUpdateClientEncryptionKeyParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Lists the SQL container under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static IEnumerable<SqlContainerGetResults> ListSqlContainers(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.ListSqlContainersAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the SQL container under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlContainerGetResults>> ListSqlContainersAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlContainersWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the SQL container under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static SqlContainerGetResults GetSqlContainer(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.GetSqlContainerAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the SQL container under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlContainerGetResults> GetSqlContainerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlContainerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='createUpdateSqlContainerParameters'>
            /// The parameters to provide for the current SQL container.
            /// </param>
            public static SqlContainerGetResults CreateUpdateSqlContainer(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters)
            {
                return operations.CreateUpdateSqlContainerAsync(resourceGroupName, accountName, databaseName, containerName, createUpdateSqlContainerParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='createUpdateSqlContainerParameters'>
            /// The parameters to provide for the current SQL container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlContainerGetResults> CreateUpdateSqlContainerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlContainerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, createUpdateSqlContainerParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL container.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static void DeleteSqlContainer(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                operations.DeleteSqlContainerAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL container.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlContainerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlContainerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Merges the partitions of a SQL Container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='mergeParameters'>
            /// The parameters for the merge operation.
            /// </param>
            public static PhysicalPartitionStorageInfoCollection ListSqlContainerPartitionMerge(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters)
            {
                return operations.ListSqlContainerPartitionMergeAsync(resourceGroupName, accountName, databaseName, containerName, mergeParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Merges the partitions of a SQL Container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='mergeParameters'>
            /// The parameters for the merge operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionStorageInfoCollection> ListSqlContainerPartitionMergeAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlContainerPartitionMergeWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, mergeParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the RUs per second of the SQL container under an existing Azure Cosmos
            /// DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static ThroughputSettingsGetResults GetSqlContainerThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.GetSqlContainerThroughputAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the RUs per second of the SQL container under an existing Azure Cosmos
            /// DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> GetSqlContainerThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlContainerThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// container.
            /// </param>
            public static ThroughputSettingsGetResults UpdateSqlContainerThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters)
            {
                return operations.UpdateSqlContainerThroughputAsync(resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> UpdateSqlContainerThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.UpdateSqlContainerThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from manual throughput to
            /// autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static ThroughputSettingsGetResults MigrateSqlContainerToAutoscale(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.MigrateSqlContainerToAutoscaleAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from manual throughput to
            /// autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> MigrateSqlContainerToAutoscaleAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.MigrateSqlContainerToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
            /// throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static ThroughputSettingsGetResults MigrateSqlContainerToManualThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.MigrateSqlContainerToManualThroughputAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
            /// throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> MigrateSqlContainerToManualThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.MigrateSqlContainerToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL database.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult SqlDatabaseRetrieveThroughputDistribution(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters)
            {
                return operations.SqlDatabaseRetrieveThroughputDistributionAsync(resourceGroupName, accountName, databaseName, retrieveThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> SqlDatabaseRetrieveThroughputDistributionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.SqlDatabaseRetrieveThroughputDistributionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, retrieveThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// database.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult SqlDatabaseRedistributeThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters)
            {
                return operations.SqlDatabaseRedistributeThroughputAsync(resourceGroupName, accountName, databaseName, redistributeThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> SqlDatabaseRedistributeThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.SqlDatabaseRedistributeThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, redistributeThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL container.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult SqlContainerRetrieveThroughputDistribution(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters)
            {
                return operations.SqlContainerRetrieveThroughputDistributionAsync(resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> SqlContainerRetrieveThroughputDistributionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.SqlContainerRetrieveThroughputDistributionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// container.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult SqlContainerRedistributeThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters)
            {
                return operations.SqlContainerRedistributeThroughputAsync(resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> SqlContainerRedistributeThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.SqlContainerRedistributeThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Lists the SQL storedProcedure under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static IEnumerable<SqlStoredProcedureGetResults> ListSqlStoredProcedures(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.ListSqlStoredProceduresAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the SQL storedProcedure under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlStoredProcedureGetResults>> ListSqlStoredProceduresAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlStoredProceduresWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the SQL storedProcedure under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            public static SqlStoredProcedureGetResults GetSqlStoredProcedure(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName)
            {
                return operations.GetSqlStoredProcedureAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the SQL storedProcedure under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlStoredProcedureGetResults> GetSqlStoredProcedureAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlStoredProcedureWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL storedProcedure
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='createUpdateSqlStoredProcedureParameters'>
            /// The parameters to provide for the current SQL storedProcedure.
            /// </param>
            public static SqlStoredProcedureGetResults CreateUpdateSqlStoredProcedure(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, SqlStoredProcedureCreateUpdateParameters createUpdateSqlStoredProcedureParameters)
            {
                return operations.CreateUpdateSqlStoredProcedureAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSqlStoredProcedureParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL storedProcedure
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='createUpdateSqlStoredProcedureParameters'>
            /// The parameters to provide for the current SQL storedProcedure.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlStoredProcedureGetResults> CreateUpdateSqlStoredProcedureAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, SqlStoredProcedureCreateUpdateParameters createUpdateSqlStoredProcedureParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlStoredProcedureWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSqlStoredProcedureParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL storedProcedure.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            public static void DeleteSqlStoredProcedure(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName)
            {
                operations.DeleteSqlStoredProcedureAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL storedProcedure.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlStoredProcedureAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlStoredProcedureWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Lists the SQL userDefinedFunction under an existing Azure Cosmos DB
            /// database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static IEnumerable<SqlUserDefinedFunctionGetResults> ListSqlUserDefinedFunctions(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.ListSqlUserDefinedFunctionsAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the SQL userDefinedFunction under an existing Azure Cosmos DB
            /// database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlUserDefinedFunctionGetResults>> ListSqlUserDefinedFunctionsAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlUserDefinedFunctionsWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            public static SqlUserDefinedFunctionGetResults GetSqlUserDefinedFunction(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName)
            {
                return operations.GetSqlUserDefinedFunctionAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database
            /// account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlUserDefinedFunctionGetResults> GetSqlUserDefinedFunctionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlUserDefinedFunctionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL userDefinedFunction
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='createUpdateSqlUserDefinedFunctionParameters'>
            /// The parameters to provide for the current SQL userDefinedFunction.
            /// </param>
            public static SqlUserDefinedFunctionGetResults CreateUpdateSqlUserDefinedFunction(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, SqlUserDefinedFunctionCreateUpdateParameters createUpdateSqlUserDefinedFunctionParameters)
            {
                return operations.CreateUpdateSqlUserDefinedFunctionAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSqlUserDefinedFunctionParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL userDefinedFunction
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='createUpdateSqlUserDefinedFunctionParameters'>
            /// The parameters to provide for the current SQL userDefinedFunction.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlUserDefinedFunctionGetResults> CreateUpdateSqlUserDefinedFunctionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, SqlUserDefinedFunctionCreateUpdateParameters createUpdateSqlUserDefinedFunctionParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlUserDefinedFunctionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSqlUserDefinedFunctionParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL userDefinedFunction.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            public static void DeleteSqlUserDefinedFunction(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName)
            {
                operations.DeleteSqlUserDefinedFunctionAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL userDefinedFunction.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlUserDefinedFunctionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlUserDefinedFunctionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Lists the SQL trigger under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static IEnumerable<SqlTriggerGetResults> ListSqlTriggers(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.ListSqlTriggersAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Lists the SQL trigger under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlTriggerGetResults>> ListSqlTriggersAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlTriggersWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets the SQL trigger under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            public static SqlTriggerGetResults GetSqlTrigger(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName)
            {
                return operations.GetSqlTriggerAsync(resourceGroupName, accountName, databaseName, containerName, triggerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the SQL trigger under an existing Azure Cosmos DB database account.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlTriggerGetResults> GetSqlTriggerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlTriggerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL trigger
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='createUpdateSqlTriggerParameters'>
            /// The parameters to provide for the current SQL trigger.
            /// </param>
            public static SqlTriggerGetResults CreateUpdateSqlTrigger(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, SqlTriggerCreateUpdateParameters createUpdateSqlTriggerParameters)
            {
                return operations.CreateUpdateSqlTriggerAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSqlTriggerParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL trigger
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='createUpdateSqlTriggerParameters'>
            /// The parameters to provide for the current SQL trigger.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlTriggerGetResults> CreateUpdateSqlTriggerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, SqlTriggerCreateUpdateParameters createUpdateSqlTriggerParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlTriggerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSqlTriggerParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL trigger.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            public static void DeleteSqlTrigger(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName)
            {
                operations.DeleteSqlTriggerAsync(resourceGroupName, accountName, databaseName, containerName, triggerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL trigger.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlTriggerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlTriggerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition
            /// with the given Id.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static SqlRoleDefinitionGetResults GetSqlRoleDefinition(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName)
            {
                return operations.GetSqlRoleDefinitionAsync(roleDefinitionId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition
            /// with the given Id.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleDefinitionGetResults> GetSqlRoleDefinitionAsync(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlRoleDefinitionWithHttpMessagesAsync(roleDefinitionId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleDefinitionParameters'>
            /// The properties required to create or update a Role Definition.
            /// </param>
            public static SqlRoleDefinitionGetResults CreateUpdateSqlRoleDefinition(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters)
            {
                return operations.CreateUpdateSqlRoleDefinitionAsync(roleDefinitionId, resourceGroupName, accountName, createUpdateSqlRoleDefinitionParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleDefinitionParameters'>
            /// The properties required to create or update a Role Definition.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleDefinitionGetResults> CreateUpdateSqlRoleDefinitionAsync(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlRoleDefinitionWithHttpMessagesAsync(roleDefinitionId, resourceGroupName, accountName, createUpdateSqlRoleDefinitionParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static void DeleteSqlRoleDefinition(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName)
            {
                operations.DeleteSqlRoleDefinitionAsync(roleDefinitionId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlRoleDefinitionAsync(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlRoleDefinitionWithHttpMessagesAsync(roleDefinitionId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Retrieves the list of all Azure Cosmos DB SQL Role Definitions.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static IEnumerable<SqlRoleDefinitionGetResults> ListSqlRoleDefinitions(this ISqlResourcesOperations operations, string resourceGroupName, string accountName)
            {
                return operations.ListSqlRoleDefinitionsAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves the list of all Azure Cosmos DB SQL Role Definitions.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlRoleDefinitionGetResults>> ListSqlRoleDefinitionsAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlRoleDefinitionsWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment
            /// with the given Id.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static SqlRoleAssignmentGetResults GetSqlRoleAssignment(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName)
            {
                return operations.GetSqlRoleAssignmentAsync(roleAssignmentId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves the properties of an existing Azure Cosmos DB SQL Role Assignment
            /// with the given Id.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleAssignmentGetResults> GetSqlRoleAssignmentAsync(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetSqlRoleAssignmentWithHttpMessagesAsync(roleAssignmentId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleAssignmentParameters'>
            /// The properties required to create or update a Role Assignment.
            /// </param>
            public static SqlRoleAssignmentGetResults CreateUpdateSqlRoleAssignment(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters)
            {
                return operations.CreateUpdateSqlRoleAssignmentAsync(roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleAssignmentParameters'>
            /// The properties required to create or update a Role Assignment.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleAssignmentGetResults> CreateUpdateSqlRoleAssignmentAsync(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateUpdateSqlRoleAssignmentWithHttpMessagesAsync(roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static void DeleteSqlRoleAssignment(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName)
            {
                operations.DeleteSqlRoleAssignmentAsync(roleAssignmentId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteSqlRoleAssignmentAsync(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteSqlRoleAssignmentWithHttpMessagesAsync(roleAssignmentId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Retrieves the list of all Azure Cosmos DB SQL Role Assignments.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static IEnumerable<SqlRoleAssignmentGetResults> ListSqlRoleAssignments(this ISqlResourcesOperations operations, string resourceGroupName, string accountName)
            {
                return operations.ListSqlRoleAssignmentsAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves the list of all Azure Cosmos DB SQL Role Assignments.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<SqlRoleAssignmentGetResults>> ListSqlRoleAssignmentsAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListSqlRoleAssignmentsWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieves continuous backup information for a container resource.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='location'>
            /// The name of the continuous backup restore location.
            /// </param>
            public static BackupInformation RetrieveContinuousBackupInformation(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location)
            {
                return operations.RetrieveContinuousBackupInformationAsync(resourceGroupName, accountName, databaseName, containerName, location).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves continuous backup information for a container resource.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='location'>
            /// The name of the continuous backup restore location.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<BackupInformation> RetrieveContinuousBackupInformationAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.RetrieveContinuousBackupInformationWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, location, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='createUpdateSqlDatabaseParameters'>
            /// The parameters to provide for the current SQL database.
            /// </param>
            public static SqlDatabaseGetResults BeginCreateUpdateSqlDatabase(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters)
            {
                return operations.BeginCreateUpdateSqlDatabaseAsync(resourceGroupName, accountName, databaseName, createUpdateSqlDatabaseParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='createUpdateSqlDatabaseParameters'>
            /// The parameters to provide for the current SQL database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlDatabaseGetResults> BeginCreateUpdateSqlDatabaseAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, SqlDatabaseCreateUpdateParameters createUpdateSqlDatabaseParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlDatabaseWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, createUpdateSqlDatabaseParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static void BeginDeleteSqlDatabase(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                operations.BeginDeleteSqlDatabaseAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL database.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlDatabaseAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlDatabaseWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// database.
            /// </param>
            public static ThroughputSettingsGetResults BeginUpdateSqlDatabaseThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters)
            {
                return operations.BeginUpdateSqlDatabaseThroughputAsync(resourceGroupName, accountName, databaseName, updateThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginUpdateSqlDatabaseThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginUpdateSqlDatabaseThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, updateThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static ThroughputSettingsGetResults BeginMigrateSqlDatabaseToAutoscale(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.BeginMigrateSqlDatabaseToAutoscaleAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginMigrateSqlDatabaseToAutoscaleAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginMigrateSqlDatabaseToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            public static ThroughputSettingsGetResults BeginMigrateSqlDatabaseToManualThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName)
            {
                return operations.BeginMigrateSqlDatabaseToManualThroughputAsync(resourceGroupName, accountName, databaseName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginMigrateSqlDatabaseToManualThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginMigrateSqlDatabaseToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update a ClientEncryptionKey. This API is meant to be invoked via
            /// tools such as the Azure Powershell (instead of directly).
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            /// <param name='createUpdateClientEncryptionKeyParameters'>
            /// The parameters to provide for the client encryption key.
            /// </param>
            public static ClientEncryptionKeyGetResults BeginCreateUpdateClientEncryptionKey(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, ClientEncryptionKeyCreateUpdateParameters createUpdateClientEncryptionKeyParameters)
            {
                return operations.BeginCreateUpdateClientEncryptionKeyAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName, createUpdateClientEncryptionKeyParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update a ClientEncryptionKey. This API is meant to be invoked via
            /// tools such as the Azure Powershell (instead of directly).
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='clientEncryptionKeyName'>
            /// Cosmos DB ClientEncryptionKey name.
            /// </param>
            /// <param name='createUpdateClientEncryptionKeyParameters'>
            /// The parameters to provide for the client encryption key.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ClientEncryptionKeyGetResults> BeginCreateUpdateClientEncryptionKeyAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string clientEncryptionKeyName, ClientEncryptionKeyCreateUpdateParameters createUpdateClientEncryptionKeyParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateClientEncryptionKeyWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, clientEncryptionKeyName, createUpdateClientEncryptionKeyParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='createUpdateSqlContainerParameters'>
            /// The parameters to provide for the current SQL container.
            /// </param>
            public static SqlContainerGetResults BeginCreateUpdateSqlContainer(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters)
            {
                return operations.BeginCreateUpdateSqlContainerAsync(resourceGroupName, accountName, databaseName, containerName, createUpdateSqlContainerParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='createUpdateSqlContainerParameters'>
            /// The parameters to provide for the current SQL container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlContainerGetResults> BeginCreateUpdateSqlContainerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlContainerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, createUpdateSqlContainerParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL container.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static void BeginDeleteSqlContainer(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                operations.BeginDeleteSqlContainerAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL container.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlContainerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlContainerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Merges the partitions of a SQL Container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='mergeParameters'>
            /// The parameters for the merge operation.
            /// </param>
            public static PhysicalPartitionStorageInfoCollection BeginListSqlContainerPartitionMerge(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters)
            {
                return operations.BeginListSqlContainerPartitionMergeAsync(resourceGroupName, accountName, databaseName, containerName, mergeParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Merges the partitions of a SQL Container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='mergeParameters'>
            /// The parameters for the merge operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionStorageInfoCollection> BeginListSqlContainerPartitionMergeAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, MergeParameters mergeParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginListSqlContainerPartitionMergeWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, mergeParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// container.
            /// </param>
            public static ThroughputSettingsGetResults BeginUpdateSqlContainerThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters)
            {
                return operations.BeginUpdateSqlContainerThroughputAsync(resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Update RUs per second of an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='updateThroughputParameters'>
            /// The parameters to provide for the RUs per second of the current SQL
            /// container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginUpdateSqlContainerThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ThroughputSettingsUpdateParameters updateThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginUpdateSqlContainerThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, updateThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from manual throughput to
            /// autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static ThroughputSettingsGetResults BeginMigrateSqlContainerToAutoscale(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.BeginMigrateSqlContainerToAutoscaleAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from manual throughput to
            /// autoscale
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginMigrateSqlContainerToAutoscaleAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginMigrateSqlContainerToAutoscaleWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
            /// throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            public static ThroughputSettingsGetResults BeginMigrateSqlContainerToManualThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName)
            {
                return operations.BeginMigrateSqlContainerToManualThroughputAsync(resourceGroupName, accountName, databaseName, containerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Migrate an Azure Cosmos DB SQL container from autoscale to manual
            /// throughput
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ThroughputSettingsGetResults> BeginMigrateSqlContainerToManualThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginMigrateSqlContainerToManualThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL database.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult BeginSqlDatabaseRetrieveThroughputDistribution(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters)
            {
                return operations.BeginSqlDatabaseRetrieveThroughputDistributionAsync(resourceGroupName, accountName, databaseName, retrieveThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> BeginSqlDatabaseRetrieveThroughputDistributionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginSqlDatabaseRetrieveThroughputDistributionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, retrieveThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// database.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult BeginSqlDatabaseRedistributeThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters)
            {
                return operations.BeginSqlDatabaseRedistributeThroughputAsync(resourceGroupName, accountName, databaseName, redistributeThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL database
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// database.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> BeginSqlDatabaseRedistributeThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginSqlDatabaseRedistributeThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, redistributeThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL container.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult BeginSqlContainerRetrieveThroughputDistribution(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters)
            {
                return operations.BeginSqlContainerRetrieveThroughputDistributionAsync(resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieve throughput distribution for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='retrieveThroughputParameters'>
            /// The parameters to provide for retrieving throughput distribution for the
            /// current SQL container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> BeginSqlContainerRetrieveThroughputDistributionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RetrieveThroughputParameters retrieveThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginSqlContainerRetrieveThroughputDistributionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, retrieveThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// container.
            /// </param>
            public static PhysicalPartitionThroughputInfoResult BeginSqlContainerRedistributeThroughput(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters)
            {
                return operations.BeginSqlContainerRedistributeThroughputAsync(resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Redistribute throughput for an Azure Cosmos DB SQL container
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='redistributeThroughputParameters'>
            /// The parameters to provide for redistributing throughput for the current SQL
            /// container.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PhysicalPartitionThroughputInfoResult> BeginSqlContainerRedistributeThroughputAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, RedistributeThroughputParameters redistributeThroughputParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginSqlContainerRedistributeThroughputWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, redistributeThroughputParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL storedProcedure
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='createUpdateSqlStoredProcedureParameters'>
            /// The parameters to provide for the current SQL storedProcedure.
            /// </param>
            public static SqlStoredProcedureGetResults BeginCreateUpdateSqlStoredProcedure(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, SqlStoredProcedureCreateUpdateParameters createUpdateSqlStoredProcedureParameters)
            {
                return operations.BeginCreateUpdateSqlStoredProcedureAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSqlStoredProcedureParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL storedProcedure
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='createUpdateSqlStoredProcedureParameters'>
            /// The parameters to provide for the current SQL storedProcedure.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlStoredProcedureGetResults> BeginCreateUpdateSqlStoredProcedureAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, SqlStoredProcedureCreateUpdateParameters createUpdateSqlStoredProcedureParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlStoredProcedureWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, createUpdateSqlStoredProcedureParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL storedProcedure.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            public static void BeginDeleteSqlStoredProcedure(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName)
            {
                operations.BeginDeleteSqlStoredProcedureAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL storedProcedure.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='storedProcedureName'>
            /// Cosmos DB storedProcedure name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlStoredProcedureAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string storedProcedureName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlStoredProcedureWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, storedProcedureName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL userDefinedFunction
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='createUpdateSqlUserDefinedFunctionParameters'>
            /// The parameters to provide for the current SQL userDefinedFunction.
            /// </param>
            public static SqlUserDefinedFunctionGetResults BeginCreateUpdateSqlUserDefinedFunction(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, SqlUserDefinedFunctionCreateUpdateParameters createUpdateSqlUserDefinedFunctionParameters)
            {
                return operations.BeginCreateUpdateSqlUserDefinedFunctionAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSqlUserDefinedFunctionParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL userDefinedFunction
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='createUpdateSqlUserDefinedFunctionParameters'>
            /// The parameters to provide for the current SQL userDefinedFunction.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlUserDefinedFunctionGetResults> BeginCreateUpdateSqlUserDefinedFunctionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, SqlUserDefinedFunctionCreateUpdateParameters createUpdateSqlUserDefinedFunctionParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlUserDefinedFunctionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, createUpdateSqlUserDefinedFunctionParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL userDefinedFunction.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            public static void BeginDeleteSqlUserDefinedFunction(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName)
            {
                operations.BeginDeleteSqlUserDefinedFunctionAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL userDefinedFunction.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='userDefinedFunctionName'>
            /// Cosmos DB userDefinedFunction name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlUserDefinedFunctionAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string userDefinedFunctionName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlUserDefinedFunctionWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, userDefinedFunctionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL trigger
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='createUpdateSqlTriggerParameters'>
            /// The parameters to provide for the current SQL trigger.
            /// </param>
            public static SqlTriggerGetResults BeginCreateUpdateSqlTrigger(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, SqlTriggerCreateUpdateParameters createUpdateSqlTriggerParameters)
            {
                return operations.BeginCreateUpdateSqlTriggerAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSqlTriggerParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Create or update an Azure Cosmos DB SQL trigger
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='createUpdateSqlTriggerParameters'>
            /// The parameters to provide for the current SQL trigger.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlTriggerGetResults> BeginCreateUpdateSqlTriggerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, SqlTriggerCreateUpdateParameters createUpdateSqlTriggerParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlTriggerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, createUpdateSqlTriggerParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL trigger.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            public static void BeginDeleteSqlTrigger(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName)
            {
                operations.BeginDeleteSqlTriggerAsync(resourceGroupName, accountName, databaseName, containerName, triggerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL trigger.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='triggerName'>
            /// Cosmos DB trigger name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlTriggerAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, string triggerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlTriggerWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleDefinitionParameters'>
            /// The properties required to create or update a Role Definition.
            /// </param>
            public static SqlRoleDefinitionGetResults BeginCreateUpdateSqlRoleDefinition(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters)
            {
                return operations.BeginCreateUpdateSqlRoleDefinitionAsync(roleDefinitionId, resourceGroupName, accountName, createUpdateSqlRoleDefinitionParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleDefinitionParameters'>
            /// The properties required to create or update a Role Definition.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleDefinitionGetResults> BeginCreateUpdateSqlRoleDefinitionAsync(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, SqlRoleDefinitionCreateUpdateParameters createUpdateSqlRoleDefinitionParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlRoleDefinitionWithHttpMessagesAsync(roleDefinitionId, resourceGroupName, accountName, createUpdateSqlRoleDefinitionParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static void BeginDeleteSqlRoleDefinition(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName)
            {
                operations.BeginDeleteSqlRoleDefinitionAsync(roleDefinitionId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Definition.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleDefinitionId'>
            /// The GUID for the Role Definition.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlRoleDefinitionAsync(this ISqlResourcesOperations operations, string roleDefinitionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlRoleDefinitionWithHttpMessagesAsync(roleDefinitionId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleAssignmentParameters'>
            /// The properties required to create or update a Role Assignment.
            /// </param>
            public static SqlRoleAssignmentGetResults BeginCreateUpdateSqlRoleAssignment(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters)
            {
                return operations.BeginCreateUpdateSqlRoleAssignmentAsync(roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates an Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='createUpdateSqlRoleAssignmentParameters'>
            /// The properties required to create or update a Role Assignment.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<SqlRoleAssignmentGetResults> BeginCreateUpdateSqlRoleAssignmentAsync(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, SqlRoleAssignmentCreateUpdateParameters createUpdateSqlRoleAssignmentParameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateUpdateSqlRoleAssignmentWithHttpMessagesAsync(roleAssignmentId, resourceGroupName, accountName, createUpdateSqlRoleAssignmentParameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            public static void BeginDeleteSqlRoleAssignment(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName)
            {
                operations.BeginDeleteSqlRoleAssignmentAsync(roleAssignmentId, resourceGroupName, accountName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes an existing Azure Cosmos DB SQL Role Assignment.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='roleAssignmentId'>
            /// The GUID for the Role Assignment.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteSqlRoleAssignmentAsync(this ISqlResourcesOperations operations, string roleAssignmentId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteSqlRoleAssignmentWithHttpMessagesAsync(roleAssignmentId, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Retrieves continuous backup information for a container resource.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='location'>
            /// The name of the continuous backup restore location.
            /// </param>
            public static BackupInformation BeginRetrieveContinuousBackupInformation(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location)
            {
                return operations.BeginRetrieveContinuousBackupInformationAsync(resourceGroupName, accountName, databaseName, containerName, location).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves continuous backup information for a container resource.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group. The name is case insensitive.
            /// </param>
            /// <param name='accountName'>
            /// Cosmos DB database account name.
            /// </param>
            /// <param name='databaseName'>
            /// Cosmos DB database name.
            /// </param>
            /// <param name='containerName'>
            /// Cosmos DB container name.
            /// </param>
            /// <param name='location'>
            /// The name of the continuous backup restore location.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<BackupInformation> BeginRetrieveContinuousBackupInformationAsync(this ISqlResourcesOperations operations, string resourceGroupName, string accountName, string databaseName, string containerName, ContinuousBackupRestoreLocation location, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginRetrieveContinuousBackupInformationWithHttpMessagesAsync(resourceGroupName, accountName, databaseName, containerName, location, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

    }
}