|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +#nullable disable |
| 5 | + |
| 6 | +using System.ComponentModel; |
| 7 | +using Azure.Core; |
| 8 | + |
| 9 | +namespace Azure.ResourceManager.Compute.Models |
| 10 | +{ |
| 11 | + public partial class VirtualMachineScaleSetPatch : ComputeResourcePatch |
| 12 | + { |
| 13 | + /// <summary> The upgrade policy. </summary> |
| 14 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 15 | + public VirtualMachineScaleSetUpgradePolicy UpgradePolicy |
| 16 | + { |
| 17 | + get => Properties?.UpgradePolicy; |
| 18 | + set |
| 19 | + { |
| 20 | + if (Properties is null) |
| 21 | + { |
| 22 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 23 | + } |
| 24 | + Properties.UpgradePolicy = value; |
| 25 | + } |
| 26 | + } |
| 27 | + |
| 28 | + /// <summary> Policy for automatic repairs. </summary> |
| 29 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 30 | + public AutomaticRepairsPolicy AutomaticRepairsPolicy |
| 31 | + { |
| 32 | + get => Properties?.AutomaticRepairsPolicy; |
| 33 | + set |
| 34 | + { |
| 35 | + if (Properties is null) |
| 36 | + { |
| 37 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 38 | + } |
| 39 | + Properties.AutomaticRepairsPolicy = value; |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + /// <summary> The virtual machine profile. </summary> |
| 44 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 45 | + public VirtualMachineScaleSetUpdateVmProfile VirtualMachineProfile |
| 46 | + { |
| 47 | + get => Properties?.VirtualMachineProfile; |
| 48 | + set |
| 49 | + { |
| 50 | + if (Properties is null) |
| 51 | + { |
| 52 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 53 | + } |
| 54 | + Properties.VirtualMachineProfile = value; |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + /// <summary> Specifies whether the Virtual Machine Scale Set should be overprovisioned. </summary> |
| 59 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 60 | + public bool? Overprovision |
| 61 | + { |
| 62 | + get => Properties?.Overprovision; |
| 63 | + set |
| 64 | + { |
| 65 | + if (Properties is null) |
| 66 | + { |
| 67 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 68 | + } |
| 69 | + Properties.Overprovision = value; |
| 70 | + } |
| 71 | + } |
| 72 | + |
| 73 | + /// <summary> When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. </summary> |
| 74 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 75 | + public bool? DoNotRunExtensionsOnOverprovisionedVms |
| 76 | + { |
| 77 | + get => Properties?.DoNotRunExtensionsOnOverprovisionedVms; |
| 78 | + set |
| 79 | + { |
| 80 | + if (Properties is null) |
| 81 | + { |
| 82 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 83 | + } |
| 84 | + Properties.DoNotRunExtensionsOnOverprovisionedVms = value; |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + /// <summary> When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. </summary> |
| 89 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 90 | + public bool? SinglePlacementGroup |
| 91 | + { |
| 92 | + get => Properties?.SinglePlacementGroup; |
| 93 | + set |
| 94 | + { |
| 95 | + if (Properties is null) |
| 96 | + { |
| 97 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 98 | + } |
| 99 | + Properties.SinglePlacementGroup = value; |
| 100 | + } |
| 101 | + } |
| 102 | + |
| 103 | + /// <summary> Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. </summary> |
| 104 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 105 | + public AdditionalCapabilities AdditionalCapabilities |
| 106 | + { |
| 107 | + get => Properties?.AdditionalCapabilities; |
| 108 | + set |
| 109 | + { |
| 110 | + if (Properties is null) |
| 111 | + { |
| 112 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 113 | + } |
| 114 | + Properties.AdditionalCapabilities = value; |
| 115 | + } |
| 116 | + } |
| 117 | + |
| 118 | + /// <summary> Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. </summary> |
| 119 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 120 | + public ScaleInPolicy ScaleInPolicy |
| 121 | + { |
| 122 | + get => Properties?.ScaleInPolicy; |
| 123 | + set |
| 124 | + { |
| 125 | + if (Properties is null) |
| 126 | + { |
| 127 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 128 | + } |
| 129 | + Properties.ScaleInPolicy = value; |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + /// <summary> Gets or sets Id. </summary> |
| 134 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 135 | + public ResourceIdentifier ProximityPlacementGroupId |
| 136 | + { |
| 137 | + get => Properties?.ProximityPlacementGroupId; |
| 138 | + set |
| 139 | + { |
| 140 | + if (Properties is null) |
| 141 | + { |
| 142 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 143 | + } |
| 144 | + Properties.ProximityPlacementGroupId = value; |
| 145 | + } |
| 146 | + } |
| 147 | + |
| 148 | + /// <summary> Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. </summary> |
| 149 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 150 | + public VirtualMachineScaleSetPriorityMixPolicy PriorityMixPolicy |
| 151 | + { |
| 152 | + get => Properties?.PriorityMixPolicy; |
| 153 | + set |
| 154 | + { |
| 155 | + if (Properties is null) |
| 156 | + { |
| 157 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 158 | + } |
| 159 | + Properties.PriorityMixPolicy = value; |
| 160 | + } |
| 161 | + } |
| 162 | + |
| 163 | + /// <summary> Specifies the Spot Restore properties for the virtual machine scale set. </summary> |
| 164 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 165 | + public SpotRestorePolicy SpotRestorePolicy |
| 166 | + { |
| 167 | + get => Properties?.SpotRestorePolicy; |
| 168 | + set |
| 169 | + { |
| 170 | + if (Properties is null) |
| 171 | + { |
| 172 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 173 | + } |
| 174 | + Properties.SpotRestorePolicy = value; |
| 175 | + } |
| 176 | + } |
| 177 | + |
| 178 | + /// <summary> Policy for Resiliency. </summary> |
| 179 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 180 | + public ResiliencyPolicy ResiliencyPolicy |
| 181 | + { |
| 182 | + get => Properties?.ResiliencyPolicy; |
| 183 | + set |
| 184 | + { |
| 185 | + if (Properties is null) |
| 186 | + { |
| 187 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 188 | + } |
| 189 | + Properties.ResiliencyPolicy = value; |
| 190 | + } |
| 191 | + } |
| 192 | + |
| 193 | + /// <summary> Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count. </summary> |
| 194 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 195 | + public ZonalPlatformFaultDomainAlignMode? ZonalPlatformFaultDomainAlignMode |
| 196 | + { |
| 197 | + get => Properties?.ZonalPlatformFaultDomainAlignMode; |
| 198 | + set |
| 199 | + { |
| 200 | + if (Properties is null) |
| 201 | + { |
| 202 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 203 | + } |
| 204 | + Properties.ZonalPlatformFaultDomainAlignMode = value; |
| 205 | + } |
| 206 | + } |
| 207 | + |
| 208 | + /// <summary> Specifies the sku profile for the virtual machine scale set. </summary> |
| 209 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 210 | + public ComputeSkuProfile SkuProfile |
| 211 | + { |
| 212 | + get => Properties?.SkuProfile; |
| 213 | + set |
| 214 | + { |
| 215 | + if (Properties is null) |
| 216 | + { |
| 217 | + Properties = new VirtualMachineScaleSetPatchProperties(); |
| 218 | + } |
| 219 | + Properties.SkuProfile = value; |
| 220 | + } |
| 221 | + } |
| 222 | + } |
| 223 | +} |
0 commit comments