/// <summary>
 /// Retrieves information about a gallery Image Version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery Image Definition in which the Image Version
 /// resides.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery Image Version to be retrieved.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply on the operation. Possible values include:
 /// 'ReplicationStatus'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GalleryImageVersionInner> GetAsync(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, ReplicationStatusTypes expand = default(ReplicationStatusTypes), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update a gallery Image Version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery Image Definition in which the Image Version is to
 /// be updated.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery Image Version to be updated. Needs to follow
 /// semantic version name pattern: The allowed characters are digit and period.
 /// Digits must be within the range of a 32-bit integer. Format:
 /// &lt;MajorVersion&gt;.&lt;MinorVersion&gt;.&lt;Patch&gt;
 /// </param>
 /// <param name='galleryImageVersion'>
 /// Parameters supplied to the update gallery Image Version operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GalleryImageVersionInner> UpdateAsync(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations       = new Operations(this);
     AvailabilitySets = new AvailabilitySetsOperations(this);
     VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this);
     VirtualMachineExtensions      = new VirtualMachineExtensionsOperations(this);
     VirtualMachineImages          = new VirtualMachineImagesOperations(this);
     Usage = new UsageOperations(this);
     VirtualMachineSizes = new VirtualMachineSizesOperations(this);
     Images                                = new ImagesOperations(this);
     VirtualMachines                       = new VirtualMachinesOperations(this);
     VirtualMachineScaleSets               = new VirtualMachineScaleSetsOperations(this);
     VirtualMachineScaleSetExtensions      = new VirtualMachineScaleSetExtensionsOperations(this);
     VirtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesOperations(this);
     VirtualMachineScaleSetVMs             = new VirtualMachineScaleSetVMsOperations(this);
     LogAnalytics                          = new LogAnalyticsOperations(this);
     VirtualMachineRunCommands             = new VirtualMachineRunCommandsOperations(this);
     ResourceSkus                          = new ResourceSkusOperations(this);
     Disks                            = new DisksOperations(this);
     Snapshots                        = new SnapshotsOperations(this);
     Galleries                        = new GalleriesOperations(this);
     GalleryImages                    = new GalleryImagesOperations(this);
     GalleryImageVersions             = new GalleryImageVersionsOperations(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());
 }
 /// <summary>
 /// List gallery Image Versions in a gallery Image Definition.
 /// </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 <GalleryImageVersionInner> > ListByGalleryImageNextAsync(this IGalleryImageVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByGalleryImageNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Delete a gallery Image Version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery Image Definition in which the Image Version
 /// resides.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery Image Version to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// List gallery image versions in a gallery image definition.
 /// </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 <GalleryImageVersion> ListByGalleryImageNext(this IGalleryImageVersionsOperations operations, string nextPageLink)
 {
     return(operations.ListByGalleryImageNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create or update a gallery image version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery image definition in which the Image Version is to
 /// be created.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery image version to be created. Needs to follow
 /// semantic version name pattern: The allowed characters are digit and period.
 /// Digits must be within the range of a 32-bit integer. Format:
 /// &lt;MajorVersion&gt;.&lt;MinorVersion&gt;.&lt;Patch&gt;
 /// </param>
 /// <param name='galleryImageVersion'>
 /// Parameters supplied to the create or update gallery image version
 /// operation.
 /// </param>
 public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a gallery image version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery image definition in which the Image Version
 /// resides.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery image version to be deleted.
 /// </param>
 public static void BeginDelete(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName)
 {
     operations.BeginDeleteAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// List gallery image versions in a gallery image definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the Shared Image Gallery Image Definition from which the Image
 /// Versions are to be listed.
 /// </param>
 public static IPage <GalleryImageVersion> ListByGalleryImage(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName)
 {
     return(operations.ListByGalleryImageAsync(resourceGroupName, galleryName, galleryImageName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieves information about a gallery image version.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='galleryName'>
 /// The name of the Shared Image Gallery in which the Image Definition resides.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery image definition in which the Image Version
 /// resides.
 /// </param>
 /// <param name='galleryImageVersionName'>
 /// The name of the gallery image version to be retrieved.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply on the operation. Possible values include:
 /// 'ReplicationStatus'
 /// </param>
 public static GalleryImageVersion Get(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand).GetAwaiter().GetResult());
 }