/// <summary>
 /// Gets a list of all update domains in a cloud 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 <UpdateDomain> > ListUpdateDomainsNextAsync(this ICloudServicesUpdateDomainOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListUpdateDomainsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of all update domains in a cloud service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <UpdateDomain> > ListUpdateDomainsAsync(this ICloudServicesUpdateDomainOperations operations, string resourceGroupName, string cloudServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListUpdateDomainsWithHttpMessagesAsync(resourceGroupName, cloudServiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the specified update domain of a cloud service. Use nextLink property
 /// in the response to get the next page of update domains. Do this till
 /// nextLink is null to fetch all the update domains.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 /// <param name='updateDomain'>
 /// Specifies an integer value that identifies the update domain. Update
 /// domains are identified with a zero-based index: the first update domain has
 /// an ID of 0, the second has an ID of 1, and so on.
 /// </param>
 public static UpdateDomain GetUpdateDomain(this ICloudServicesUpdateDomainOperations operations, string resourceGroupName, string cloudServiceName, int updateDomain)
 {
     return(operations.GetUpdateDomainAsync(resourceGroupName, cloudServiceName, updateDomain).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Updates the role instances in the specified update domain.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 /// <param name='updateDomain'>
 /// Specifies an integer value that identifies the update domain. Update
 /// domains are identified with a zero-based index: the first update domain has
 /// an ID of 0, the second has an ID of 1, and so on.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task WalkUpdateDomainAsync(this ICloudServicesUpdateDomainOperations operations, string resourceGroupName, string cloudServiceName, int updateDomain, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.WalkUpdateDomainWithHttpMessagesAsync(resourceGroupName, cloudServiceName, updateDomain, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Updates the role instances in the specified update domain.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 /// <param name='updateDomain'>
 /// Specifies an integer value that identifies the update domain. Update
 /// domains are identified with a zero-based index: the first update domain has
 /// an ID of 0, the second has an ID of 1, and so on.
 /// </param>
 public static void WalkUpdateDomain(this ICloudServicesUpdateDomainOperations operations, string resourceGroupName, string cloudServiceName, int updateDomain)
 {
     operations.WalkUpdateDomainAsync(resourceGroupName, cloudServiceName, updateDomain).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets a list of all update domains in a cloud 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 <UpdateDomain> ListUpdateDomainsNext(this ICloudServicesUpdateDomainOperations operations, string nextPageLink)
 {
     return(operations.ListUpdateDomainsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a list of all update domains in a cloud service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 public static IPage <UpdateDomain> ListUpdateDomains(this ICloudServicesUpdateDomainOperations operations, string resourceGroupName, string cloudServiceName)
 {
     return(operations.ListUpdateDomainsAsync(resourceGroupName, cloudServiceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations                    = new Operations(this);
     AvailabilitySets              = new AvailabilitySetsOperations(this);
     ProximityPlacementGroups      = new ProximityPlacementGroupsOperations(this);
     DedicatedHostGroups           = new DedicatedHostGroupsOperations(this);
     DedicatedHosts                = new DedicatedHostsOperations(this);
     SshPublicKeys                 = new SshPublicKeysOperations(this);
     VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this);
     VirtualMachineExtensions      = new VirtualMachineExtensionsOperations(this);
     VirtualMachineImages          = new VirtualMachineImagesOperations(this);
     Usage                                 = new UsageOperations(this);
     VirtualMachines                       = new VirtualMachinesOperations(this);
     VirtualMachineSizes                   = new VirtualMachineSizesOperations(this);
     Images                                = new ImagesOperations(this);
     VirtualMachineScaleSets               = new VirtualMachineScaleSetsOperations(this);
     VirtualMachineScaleSetExtensions      = new VirtualMachineScaleSetExtensionsOperations(this);
     VirtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesOperations(this);
     VirtualMachineScaleSetVMExtensions    = new VirtualMachineScaleSetVMExtensionsOperations(this);
     VirtualMachineScaleSetVMs             = new VirtualMachineScaleSetVMsOperations(this);
     LogAnalytics                          = new LogAnalyticsOperations(this);
     VirtualMachineRunCommands             = new VirtualMachineRunCommandsOperations(this);
     VirtualMachineScaleSetVMRunCommands   = new VirtualMachineScaleSetVMRunCommandsOperations(this);
     ResourceSkus                          = new ResourceSkusOperations(this);
     Disks                                 = new DisksOperations(this);
     Snapshots                             = new SnapshotsOperations(this);
     DiskEncryptionSets                    = new DiskEncryptionSetsOperations(this);
     DiskAccesses                          = new DiskAccessesOperations(this);
     DiskRestorePoint                      = new DiskRestorePointOperations(this);
     Galleries                             = new GalleriesOperations(this);
     GalleryImages                         = new GalleryImagesOperations(this);
     GalleryImageVersions                  = new GalleryImageVersionsOperations(this);
     GalleryApplications                   = new GalleryApplicationsOperations(this);
     GalleryApplicationVersions            = new GalleryApplicationVersionsOperations(this);
     ContainerServices                     = new ContainerServicesOperations(this);
     CloudServiceRoleInstances             = new CloudServiceRoleInstancesOperations(this);
     CloudServiceRoles                     = new CloudServiceRolesOperations(this);
     CloudServices                         = new CloudServicesOperations(this);
     CloudServicesUpdateDomain             = new CloudServicesUpdateDomainOperations(this);
     BaseUri                               = new System.Uri("https://management.azure.com");
     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()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     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()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }