/// <summary>
 /// Get the API portal and its properties.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ApiPortalResource> GetAsync(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiPortalName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Check the domains are valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomDomainValidateResult> ValidateDomainAsync(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateDomainWithHttpMessagesAsync(resourceGroupName, serviceName, apiPortalName, validatePayload, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </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 <ApiPortalResource> > ListNextAsync(this IApiPortalsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Create the default API portal or update the existing API portal.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 /// <param name='apiPortalResource'>
 /// The API portal for the create or update operation
 /// </param>
 public static ApiPortalResource CreateOrUpdate(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, ApiPortalResource apiPortalResource)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiPortalName, apiPortalResource).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </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 <ApiPortalResource> ListNext(this IApiPortalsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the default API portal.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiPortalName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the default API portal.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 public static void BeginDelete(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serviceName, apiPortalName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Check the domains are valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='apiPortalName'>
 /// The name of API portal.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 public static CustomDomainValidateResult ValidateDomain(this IApiPortalsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, CustomDomainValidatePayload validatePayload)
 {
     return(operations.ValidateDomainAsync(resourceGroupName, serviceName, apiPortalName, validatePayload).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Handles requests to list all resources in a Service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 public static IPage <ApiPortalResource> List(this IApiPortalsOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.ListAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }