/// <summary>
 /// Moves Location Based Services Accounts from one ResourceGroup (or
 /// Subscription) to another
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains Location Based Services
 /// Account to move.
 /// </param>
 /// <param name='moveRequest'>
 /// The details of the Location Based Services Account move.
 /// </param>
 public static void Move(this IAccountsOperations operations, string resourceGroupName, LocationBasedServicesAccountsMoveRequest moveRequest)
 {
     operations.MoveAsync(resourceGroupName, moveRequest).GetAwaiter().GetResult();
 }
 /// <summary>
 /// List Accounts in a resource group
 /// </summary>
 /// <remarks>
 /// List Accounts in ResourceGroup
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Account> ListByResourceGroupNext(this IAccountsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the details of the account.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RemoteApp.IAccountsOperations.
 /// </param>
 /// <returns>
 /// Definition for result of GetAccount operaton.
 /// </returns>
 public static Task <GetAccountResult> GetAsync(this IAccountsOperations operations)
 {
     return(operations.GetAsync(CancellationToken.None));
 }
 /// <summary>
 /// List Accounts in a subscription
 /// </summary>
 /// <remarks>
 /// List Accounts in Subscription
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation token
 /// </param>
 public static IPage <Account> ListBySubscription(this IAccountsOperations operations, string skipToken = default(string))
 {
     return(operations.ListBySubscriptionAsync(skipToken).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete an account
 /// </summary>
 /// <remarks>
 /// DeleteAccount
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 public static OperationResponse BeginDelete(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.BeginDeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates a Cognitive Services account
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 /// <param name='account'>
 /// The parameters to provide for the created account.
 /// </param>
 public static CognitiveServicesAccount Update(this IAccountsOperations operations, string resourceGroupName, string accountName, CognitiveServicesAccount account)
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, account).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns all the resources of a particular type belonging to a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CognitiveServicesAccountInner> > ListNextAsync(this IAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List operations available for the Location Based Services Resource Provider
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <LocationBasedServicesOperationsValueItem> > ListOperationsAsync(this IAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates a Location Based Services Account. Only a subset of the parameters
 /// may be updated after creation, such as Sku and Tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Azure Resource Group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Location Based Services Account.
 /// </param>
 /// <param name='locationBasedServicesAccountUpdateParameters'>
 /// The updated parameters for the Location Based Services Account.
 /// </param>
 public static LocationBasedServicesAccount Update(this IAccountsOperations operations, string resourceGroupName, string accountName, LocationBasedServicesAccountUpdateParameters locationBasedServicesAccountUpdateParameters)
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, locationBasedServicesAccountUpdateParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Regenerate either the primary or secondary key for use with the Location
 /// Based Services APIs. The old key will stop working immediately.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Azure Resource Group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Location Based Services Account.
 /// </param>
 /// <param name='keySpecification'>
 /// Which key to regenerate:  primary or secondary.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocationBasedServicesAccountKeys> RegenerateKeysAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, LocationBasedServicesKeySpecification keySpecification, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, accountName, keySpecification, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// List operations available for the Location Based Services Resource Provider
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IEnumerable <LocationBasedServicesOperationsValueItem> ListOperations(this IAccountsOperations operations)
 {
     return(operations.ListOperationsAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Regenerate either the primary or secondary key for use with the Location
 /// Based Services APIs. The old key will stop working immediately.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Azure Resource Group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Location Based Services Account.
 /// </param>
 /// <param name='keySpecification'>
 /// Which key to regenerate:  primary or secondary.
 /// </param>
 public static LocationBasedServicesAccountKeys RegenerateKeys(this IAccountsOperations operations, string resourceGroupName, string accountName, LocationBasedServicesKeySpecification keySpecification)
 {
     return(operations.RegenerateKeysAsync(resourceGroupName, accountName, keySpecification).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the keys to use with the Location Based Services APIs. A key is used to
 /// authenticate and authorize access to the Location Based Services REST APIs.
 /// Only one key is needed at a time; two are given to provide seamless key
 /// regeneration.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Azure Resource Group.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Location Based Services Account.
 /// </param>
 public static LocationBasedServicesAccountKeys ListKeys(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.ListKeysAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Moves Location Based Services Accounts from one ResourceGroup (or
 /// Subscription) to another
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains Location Based Services
 /// Account to move.
 /// </param>
 /// <param name='moveRequest'>
 /// The details of the Location Based Services Account move.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task MoveAsync(this IAccountsOperations operations, string resourceGroupName, LocationBasedServicesAccountsMoveRequest moveRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.MoveWithHttpMessagesAsync(resourceGroupName, moveRequest, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Get usages for the requested Cognitive Services account
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 /// <param name='filter'>
 /// An OData filter expression that describes a subset of usages to return. The
 /// supported parameter is name.value (name of the metric, can have an or of
 /// multiple names).
 /// </param>
 public static UsagesResult GetUsages(this IAccountsOperations operations, string resourceGroupName, string accountName, string filter = default(string))
 {
     return(operations.GetUsagesAsync(resourceGroupName, accountName, filter).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a Cognitive Services account from the resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 public static void Delete(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     operations.DeleteAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Returns all the resources of a particular type belonging to a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <CognitiveServicesAccount> ListNext(this IAccountsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a Cognitive Services account from the resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IAccountsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Returns all the resources of a particular type belonging to a resource
 /// group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CognitiveServicesAccountInner> > ListByResourceGroupAsync(this IAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns a Cognitive Services account specified by the parameters.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 public static CognitiveServicesAccount GetProperties(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.GetPropertiesAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Patch a given account
 /// </summary>
 /// <remarks>
 /// Patch an account
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='accountUpdateParameters'>
 /// The account update parameters.
 /// </param>
 public static Account Update(this IAccountsOperations operations, string resourceGroupName, string accountName, AccountUpdateParameters accountUpdateParameters)
 {
     return(operations.UpdateAsync(resourceGroupName, accountName, accountUpdateParameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns all the resources of a particular type belonging to a resource
 /// group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 public static IPage <CognitiveServicesAccount> ListByResourceGroup(this IAccountsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List Accounts in a resource group
 /// </summary>
 /// <remarks>
 /// List Accounts in ResourceGroup
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='skipToken'>
 /// Continuation token
 /// </param>
 public static IPage <Account> ListByResourceGroup(this IAccountsOperations operations, string resourceGroupName, string skipToken = default(string))
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName, skipToken).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns all the resources of a particular type belonging to a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <CognitiveServicesAccount> List(this IAccountsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get an account under a resource group
 /// </summary>
 /// <remarks>
 /// Get an account
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 public static Account Get(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.GetAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Regenerates the specified account key for the specified Cognitive Services
 /// account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 /// <param name='keyName'>
 /// key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
 /// </param>
 public static CognitiveServicesAccountKeys RegenerateKey(this IAccountsOperations operations, string resourceGroupName, string accountName, KeyName keyName)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, accountName, keyName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create an account in the given resource group
 /// </summary>
 /// <remarks>
 /// Create an account
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='accountName'>
 /// The name of the share account.
 /// </param>
 /// <param name='account'>
 /// The account payload.
 /// </param>
 public static Account Create(this IAccountsOperations operations, string resourceGroupName, string accountName, Account account)
 {
     return(operations.CreateAsync(resourceGroupName, accountName, account).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List available SKUs for the requested Cognitive Services account
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the user's subscription.
 /// </param>
 /// <param name='accountName'>
 /// The name of Cognitive Services account.
 /// </param>
 public static CognitiveServicesAccountEnumerateSkusResult ListSkus(this IAccountsOperations operations, string resourceGroupName, string accountName)
 {
     return(operations.ListSkusAsync(resourceGroupName, accountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the list of available billing plans for the customer.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RemoteApp.IAccountsOperations.
 /// </param>
 /// <returns>
 /// Definition for result of ListBillingPlans operation.
 /// </returns>
 public static Task <ListBillingPlansResult> ListBillingPlansAsync(this IAccountsOperations operations)
 {
     return(operations.ListBillingPlansAsync(CancellationToken.None));
 }
 /// <summary>
 /// Get all Location Based Services Accounts in a Subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IEnumerable <LocationBasedServicesAccount> ListBySubscription(this IAccountsOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }