///GENMHASH:7085203F0E54D9143441675F515A5350:8187A0188F5A617E219748998105A41C
 internal GalleryImageImpl(GalleryImageInner inner, IComputeManager computeManager) : base(inner.Name, inner)
 {
     this.computeManager = computeManager;
     // Set resource name
     this.galleryImageName = inner.Name;
     // resource ancestor names
     this.resourceGroupName = GetValueFromIdByName(inner.Id, "resourceGroups");
     this.galleryName       = GetValueFromIdByName(inner.Id, "galleries");
     this.galleryImageName  = GetValueFromIdByName(inner.Id, "images");
 }
 /// <summary>
 /// Create or update 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 is to be
 /// created.
 /// </param>
 /// <param name='galleryImageName'>
 /// The name of the gallery Image Definition to be created or updated. The
 /// allowed characters are alphabets and numbers with dots, dashes, and periods
 /// allowed in the middle. The maximum length is 80 characters.
 /// </param>
 /// <param name='galleryImage'>
 /// Parameters supplied to the create or update gallery image operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GalleryImageInner> CreateOrUpdateAsync(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName, GalleryImageInner galleryImage, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, galleryName, galleryImageName, galleryImage, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #3
0
 ///GENMHASH:DEFBDB096DEECBB96427EF245FBBCFB5:B84D8C5A6C67F036ADFA43B14CFFF21A
 private GalleryImageImpl WrapModel(GalleryImageInner inner)
 {
     return(new GalleryImageImpl(inner, this.computeManager));
 }