/// <summary>
 /// Gets the primary and secondary admin API keys for the specified Azure
 /// Search service.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Search service associated with the specified resource
 /// group.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AdminKeyResult> GetAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns the primary and secondary API keys for the given Azure Search
 /// service.
 /// <see href="https://msdn.microsoft.com/library/azure/dn832685.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Search service for which to list admin keys.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AdminKeyResult> ListAsync(this IAdminKeysOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the primary and secondary admin API keys for the specified Azure
 /// Search service.
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription. You can
 /// obtain this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='searchServiceName'>
 /// The name of the Azure Search service associated with the specified resource
 /// group.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static AdminKeyResult Get(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
 {
     return(operations.GetAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns the primary and secondary API keys for the given Azure Search
 /// service.
 /// <see href="https://msdn.microsoft.com/library/azure/dn832685.aspx" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group within the current subscription.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Search service for which to list admin keys.
 /// </param>
 public static AdminKeyResult List(this IAdminKeysOperations operations, string resourceGroupName, string serviceName)
 {
     return(Task.Factory.StartNew(s => ((IAdminKeysOperations)s).ListAsync(resourceGroupName, serviceName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }