-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
BatchOSDisk.cs
68 lines (61 loc) · 3.63 KB
/
BatchOSDisk.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
namespace Azure.ResourceManager.Batch.Models
{
/// <summary> Settings for the operating system disk of the virtual machine. </summary>
public partial class BatchOSDisk
{
/// <summary> Initializes a new instance of <see cref="BatchOSDisk"/>. </summary>
public BatchOSDisk()
{
}
/// <summary> Initializes a new instance of <see cref="BatchOSDisk"/>. </summary>
/// <param name="ephemeralOSDiskSettings"> Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. </param>
/// <param name="caching"> The type of caching to enable for the disk. </param>
/// <param name="managedDisk"></param>
/// <param name="diskSizeGB"> The initial disk size in GB when creating new OS disk. </param>
/// <param name="isWriteAcceleratorEnabled"> Specifies whether writeAccelerator should be enabled or disabled on the disk. </param>
internal BatchOSDisk(DiffDiskSettings ephemeralOSDiskSettings, BatchDiskCachingType? caching, ManagedDisk managedDisk, int? diskSizeGB, bool? isWriteAcceleratorEnabled)
{
EphemeralOSDiskSettings = ephemeralOSDiskSettings;
Caching = caching;
ManagedDisk = managedDisk;
DiskSizeGB = diskSizeGB;
IsWriteAcceleratorEnabled = isWriteAcceleratorEnabled;
}
/// <summary> Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. </summary>
internal DiffDiskSettings EphemeralOSDiskSettings { get; set; }
/// <summary> This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. </summary>
public BatchDiffDiskPlacement? EphemeralOSDiskPlacement
{
get => EphemeralOSDiskSettings is null ? default : EphemeralOSDiskSettings.Placement;
set
{
if (EphemeralOSDiskSettings is null)
EphemeralOSDiskSettings = new DiffDiskSettings();
EphemeralOSDiskSettings.Placement = value;
}
}
/// <summary> The type of caching to enable for the disk. </summary>
public BatchDiskCachingType? Caching { get; set; }
/// <summary> Gets or sets the managed disk. </summary>
internal ManagedDisk ManagedDisk { get; set; }
/// <summary> The storage account type for use in creating data disks or OS disk. </summary>
public BatchStorageAccountType? ManagedDiskStorageAccountType
{
get => ManagedDisk is null ? default : ManagedDisk.StorageAccountType;
set
{
if (ManagedDisk is null)
ManagedDisk = new ManagedDisk();
ManagedDisk.StorageAccountType = value;
}
}
/// <summary> The initial disk size in GB when creating new OS disk. </summary>
public int? DiskSizeGB { get; set; }
/// <summary> Specifies whether writeAccelerator should be enabled or disabled on the disk. </summary>
public bool? IsWriteAcceleratorEnabled { get; set; }
}
}