///GENMHASH:46AD705474F82EB01989BDC537143CDA:E24CCAC647CB1E84A09989E367AC3866 public IReadOnlyList <Models.DiskSkuTypes> UnsupportedDiskTypes() { if (this.Inner.Disallowed == null || this.Inner.Disallowed.DiskTypes == null) { return(new List <Models.DiskSkuTypes>()); } else { List <DiskSkuTypes> diskTypes = new List <DiskSkuTypes>(); foreach (var diskTypeStr in this.Inner.Disallowed.DiskTypes) { diskTypes.Add(DiskSkuTypes.FromStorageAccountType(DiskStorageAccountTypes.Parse(diskTypeStr))); } return(diskTypes); } }
///GENMHASH:08C16A717E4778526168C783D7E02873:5CDB83FF69B6F42640F7ADC9D700AF7A public DiskSkuTypes DiskSkuType() { if (this.inner.ResourceType != null && (this.inner.ResourceType.Equals("disks", System.StringComparison.OrdinalIgnoreCase) || this.inner.ResourceType.Equals("snapshots", System.StringComparison.OrdinalIgnoreCase)) && this.inner.Name != null) { if (this.inner.Name.Equals("Standard_LRS", System.StringComparison.OrdinalIgnoreCase)) { return(DiskSkuTypes.FromStorageAccountType(StorageAccountTypes.StandardLRS)); } if (this.inner.Name.Equals("Premium_LRS", System.StringComparison.OrdinalIgnoreCase)) { return(DiskSkuTypes.FromStorageAccountType(StorageAccountTypes.PremiumLRS)); } return(null); } else { return(null); } }
///GENMHASH:327CBF262F4C69D4F67206A8BC678FD6:6E1EBADD62B789305803912915AD8226 public GalleryImageImpl WithoutUnsupportedDiskType(DiskSkuTypes diskType) { if (this.Inner.Disallowed != null && this.Inner.Disallowed.DiskTypes != null) { int foundIndex = -1; int i = 0; string diskTypeToRemove = diskType.ToString(); foreach (var diskTypeStr in this.Inner.Disallowed.DiskTypes) { if (diskTypeStr.Equals(diskTypeToRemove, StringComparison.OrdinalIgnoreCase)) { foundIndex = i; break; } i++; } if (foundIndex != -1) { this.Inner.Disallowed.DiskTypes.RemoveAt(foundIndex); } } return(this); }
/// <summary> /// Specifies the SKU. /// </summary> /// <param name="sku">The SKU.</param> /// <return>The next stage of the definition.</return> Disk.Definition.IWithCreate Disk.Definition.IWithSku.WithSku(DiskSkuTypes sku) { return(this.WithSku(sku) as Disk.Definition.IWithCreate); }
/// <summary> /// Specifies the SKU. /// </summary> /// <param name="sku">A SKU.</param> /// <return>The next stage of the update.</return> Disk.Update.IUpdate Disk.Update.IWithSku.WithSku(DiskSkuTypes sku) { return(this.WithSku(sku) as Disk.Update.IUpdate); }
/// <summary> /// Specifies the disk type not supported by the image. /// </summary> /// <param name="diskType">The disk type.</param> /// <return>The next definition stage.</return> GalleryImage.Definition.IWithCreate GalleryImage.Definition.IWithDisallowed.WithUnsupportedDiskType(DiskSkuTypes diskType) { return(this.WithUnsupportedDiskType(diskType)); }
/// <summary> /// Specifies the disk type not supported by the image. /// </summary> /// <param name="diskType">The disk type.</param> /// <return>The next update stage.</return> GalleryImage.Update.IUpdate GalleryImage.Update.IWithDisallowed.WithUnsupportedDiskType(DiskSkuTypes diskType) { return(this.WithUnsupportedDiskType(diskType)); }
Snapshot.Definition.IWithCreate Snapshot.Definition.IWithSku.WithSku(DiskSkuTypes sku) { return(this.WithSku(sku) as Snapshot.Definition.IWithCreate); }
Snapshot.Update.IUpdate Snapshot.Update.IWithSku.WithSku(DiskSkuTypes sku) { return(this.WithSku(sku) as Snapshot.Update.IUpdate); }