/// <summary>
 /// Get the API portal custom domain.
 /// </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='domainName'>
 /// The name of the API portal custom domain.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ApiPortalCustomDomainResource> GetAsync(this IApiPortalCustomDomainsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, string domainName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiPortalName, domainName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Services              = new ServicesOperations(this);
     ConfigServers         = new ConfigServersOperations(this);
     ConfigurationServices = new ConfigurationServicesOperations(this);
     ServiceRegistries     = new ServiceRegistriesOperations(this);
     BuildService          = new BuildServiceOperations(this);
     BuildpackBinding      = new BuildpackBindingOperations(this);
     BuildServiceBuilder   = new BuildServiceBuilderOperations(this);
     BuildServiceAgentPool = new BuildServiceAgentPoolOperations(this);
     MonitoringSettings    = new MonitoringSettingsOperations(this);
     Apps                             = new AppsOperations(this);
     Bindings                         = new BindingsOperations(this);
     Storages                         = new StoragesOperations(this);
     Certificates                     = new CertificatesOperations(this);
     CustomDomains                    = new CustomDomainsOperations(this);
     Deployments                      = new DeploymentsOperations(this);
     Operations                       = new Operations(this);
     RuntimeVersions                  = new RuntimeVersionsOperations(this);
     Skus                             = new SkusOperations(this);
     Gateways                         = new GatewaysOperations(this);
     GatewayRouteConfigs              = new GatewayRouteConfigsOperations(this);
     GatewayCustomDomains             = new GatewayCustomDomainsOperations(this);
     ApiPortals                       = new ApiPortalsOperations(this);
     ApiPortalCustomDomains           = new ApiPortalCustomDomainsOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     ApiVersion                       = "2022-01-01-preview";
     AcceptLanguage                   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <CustomPersistentDiskProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CustomPersistentDiskProperties>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <CertificateProperties>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <CertificateProperties>("type"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <StorageProperties>("storageType"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <StorageProperties>("storageType"));
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <UserSourceInfo>("type"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <UserSourceInfo>("type"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Create or update the API portal custom domain.
 /// </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='domainName'>
 /// The name of the API portal custom domain.
 /// </param>
 /// <param name='apiPortalCustomDomainResource'>
 /// The API portal custom domain for the create or update operation
 /// </param>
 public static ApiPortalCustomDomainResource CreateOrUpdate(this IApiPortalCustomDomainsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, string domainName, ApiPortalCustomDomainResource apiPortalCustomDomainResource)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Handle requests to list all API portal custom domains.
 /// </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 <ApiPortalCustomDomainResource> > ListNextAsync(this IApiPortalCustomDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Handle requests to list all API portal custom domains.
 /// </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 <ApiPortalCustomDomainResource> ListNext(this IApiPortalCustomDomainsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the API portal custom domain.
 /// </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='domainName'>
 /// The name of the API portal custom domain.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IApiPortalCustomDomainsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, string domainName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiPortalName, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the API portal custom domain.
 /// </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='domainName'>
 /// The name of the API portal custom domain.
 /// </param>
 public static void BeginDelete(this IApiPortalCustomDomainsOperations operations, string resourceGroupName, string serviceName, string apiPortalName, string domainName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serviceName, apiPortalName, domainName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Handle requests to list all API portal custom domains.
 /// </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 IPage <ApiPortalCustomDomainResource> List(this IApiPortalCustomDomainsOperations operations, string resourceGroupName, string serviceName, string apiPortalName)
 {
     return(operations.ListAsync(resourceGroupName, serviceName, apiPortalName).GetAwaiter().GetResult());
 }