|
5 | 5 |
|
6 | 6 | namespace Microsoft.Azure.Management.ServiceFabricManagedClusters.Models
|
7 | 7 | {
|
8 |
| - using System.Linq; |
9 |
| - |
10 | 8 | /// <summary>
|
11 | 9 | /// Describes a node type in the cluster, each node type represents sub set of
|
12 | 10 | /// nodes in the cluster.
|
@@ -228,7 +226,7 @@ public NodeType()
|
228 | 226 | /// want to use and then click Want to deploy programmatically, Get Started ->.
|
229 | 227 | /// Enter any required information and then click Save.
|
230 | 228 | /// </param>
|
231 |
| - public NodeType(bool isPrimary, int vmInstanceCount, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), SystemData systemData = default(SystemData), int dataDiskSizeGB = default(int), string dataDiskType = default(string), string dataDiskLetter = default(string), System.Collections.Generic.IDictionary<string, string> placementProperties = default(System.Collections.Generic.IDictionary<string, string>), System.Collections.Generic.IDictionary<string, string> capacities = default(System.Collections.Generic.IDictionary<string, string>), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), System.Collections.Generic.IList<VaultSecretGroup> vmSecrets = default(System.Collections.Generic.IList<VaultSecretGroup>), System.Collections.Generic.IList<VmssExtension> vmExtensions = default(System.Collections.Generic.IList<VmssExtension>), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), bool? isStateless = default(bool?), bool? multiplePlacementGroups = default(bool?), System.Collections.Generic.IList<FrontendConfiguration> frontendConfigurations = default(System.Collections.Generic.IList<FrontendConfiguration>), System.Collections.Generic.IList<NetworkSecurityRule> networkSecurityRules = default(System.Collections.Generic.IList<NetworkSecurityRule>), System.Collections.Generic.IList<VmssDataDisk> additionalDataDisks = default(System.Collections.Generic.IList<VmssDataDisk>), bool? enableEncryptionAtHost = default(bool?), string provisioningState = default(string), bool? enableAcceleratedNetworking = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? enableOverProvisioning = default(bool?), System.Collections.Generic.IList<string> zones = default(System.Collections.Generic.IList<string>), bool? isSpotVM = default(bool?), string hostGroupId = default(string), bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = default(string), string evictionPolicy = default(string), string vmImageResourceId = default(string), string subnetId = default(string), System.Collections.Generic.IList<string> vmSetupActions = default(System.Collections.Generic.IList<string>), string securityType = default(string), bool? secureBootEnabled = default(bool?), bool? enableNodePublicIP = default(bool?), string vmSharedGalleryImageId = default(string), string natGatewayId = default(string), VmImagePlan vmImagePlan = default(VmImagePlan), NodeTypeSku sku = default(NodeTypeSku)) |
| 229 | + public NodeType(string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), SystemData systemData = default(SystemData), NodeTypeSku sku = default(NodeTypeSku), string securityType = default(string), bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeGB = default(int?), string dataDiskType = default(string), string dataDiskLetter = default(string), System.Collections.Generic.IDictionary<string, string> placementProperties = default(System.Collections.Generic.IDictionary<string, string>), System.Collections.Generic.IDictionary<string, string> capacities = default(System.Collections.Generic.IDictionary<string, string>), EndpointRangeDescription applicationPorts = default(EndpointRangeDescription), EndpointRangeDescription ephemeralPorts = default(EndpointRangeDescription), string vmSize = default(string), string vmImagePublisher = default(string), string vmImageOffer = default(string), string vmImageSku = default(string), string vmImageVersion = default(string), System.Collections.Generic.IList<VaultSecretGroup> vmSecrets = default(System.Collections.Generic.IList<VaultSecretGroup>), System.Collections.Generic.IList<VmssExtension> vmExtensions = default(System.Collections.Generic.IList<VmssExtension>), VmManagedIdentity vmManagedIdentity = default(VmManagedIdentity), bool? isStateless = default(bool?), bool? multiplePlacementGroups = default(bool?), System.Collections.Generic.IList<FrontendConfiguration> frontendConfigurations = default(System.Collections.Generic.IList<FrontendConfiguration>), System.Collections.Generic.IList<NetworkSecurityRule> networkSecurityRules = default(System.Collections.Generic.IList<NetworkSecurityRule>), System.Collections.Generic.IList<VmssDataDisk> additionalDataDisks = default(System.Collections.Generic.IList<VmssDataDisk>), bool? enableEncryptionAtHost = default(bool?), string provisioningState = default(string), bool? enableAcceleratedNetworking = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? enableOverProvisioning = default(bool?), System.Collections.Generic.IList<string> zones = default(System.Collections.Generic.IList<string>), bool? isSpotVM = default(bool?), string hostGroupId = default(string), bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = default(string), string evictionPolicy = default(string), string vmImageResourceId = default(string), string subnetId = default(string), System.Collections.Generic.IList<string> vmSetupActions = default(System.Collections.Generic.IList<string>), bool? secureBootEnabled = default(bool?), bool? enableNodePublicIP = default(bool?), string vmSharedGalleryImageId = default(string), string natGatewayId = default(string), VmImagePlan vmImagePlan = default(VmImagePlan)) |
232 | 230 |
|
233 | 231 | : base(id, name, type, tags, systemData)
|
234 | 232 | {
|
@@ -304,22 +302,22 @@ public NodeType()
|
304 | 302 | /// type is created.
|
305 | 303 | /// </summary>
|
306 | 304 | [Newtonsoft.Json.JsonProperty(PropertyName = "properties.isPrimary")]
|
307 |
| - public bool IsPrimary {get; set; } |
| 305 | + public bool? IsPrimary {get; set; } |
308 | 306 |
|
309 | 307 | /// <summary>
|
310 | 308 | /// Gets or sets the number of nodes in the node type. <br /><br />**Values:**
|
311 | 309 | /// <br />-1 - Use when auto scale rules are configured or sku.capacity is
|
312 | 310 | /// defined <br /> 0 - Not supported <br /> >0 - Use for manual scale.
|
313 | 311 | /// </summary>
|
314 | 312 | [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vmInstanceCount")]
|
315 |
| - public int VmInstanceCount {get; set; } |
| 313 | + public int? VmInstanceCount {get; set; } |
316 | 314 |
|
317 | 315 | /// <summary>
|
318 | 316 | /// Gets or sets disk size for the managed disk attached to the vms on the node
|
319 | 317 | /// type in GBs.
|
320 | 318 | /// </summary>
|
321 | 319 | [Newtonsoft.Json.JsonProperty(PropertyName = "properties.dataDiskSizeGB")]
|
322 |
| - public int DataDiskSizeGB {get; set; } |
| 320 | + public int? DataDiskSizeGB {get; set; } |
323 | 321 |
|
324 | 322 | /// <summary>
|
325 | 323 | /// Gets or sets managed data disk type. Specifies the storage account type for
|
@@ -411,7 +409,7 @@ public NodeType()
|
411 | 409 | /// machines.
|
412 | 410 | /// </summary>
|
413 | 411 | [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vmExtensions")]
|
414 |
| - public System.Collections.Generic.IList<VmssExtension> VmExtensions { get; set; } |
| 412 | + public System.Collections.Generic.IList<VmssExtension> VmExtensions {get; set; } |
415 | 413 |
|
416 | 414 | /// <summary>
|
417 | 415 | /// Gets or sets identities to assign to the virtual machine scale set under
|
@@ -623,16 +621,18 @@ public virtual void Validate()
|
623 | 621 | this.Sku.Validate();
|
624 | 622 | }
|
625 | 623 |
|
626 |
| - if (this.VmInstanceCount > 2147483647) |
627 |
| - { |
628 |
| - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "VMInstanceCount", 2147483647); |
629 |
| - } |
630 |
| - if (this.VmInstanceCount < -1) |
| 624 | + if (this.VmInstanceCount != null) |
631 | 625 | {
|
632 |
| - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "VMInstanceCount", -1); |
| 626 | + if (this.VmInstanceCount > 2147483647) |
| 627 | + { |
| 628 | + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "VMInstanceCount", 2147483647); |
| 629 | + } |
| 630 | + if (this.VmInstanceCount < -1) |
| 631 | + { |
| 632 | + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "VMInstanceCount", -1); |
| 633 | + } |
633 | 634 | }
|
634 | 635 |
|
635 |
| - |
636 | 636 | if (this.DataDiskLetter != null)
|
637 | 637 | {
|
638 | 638 | if (!System.Text.RegularExpressions.Regex.IsMatch(this.DataDiskLetter, "^[a-zA-Z]{1}$"))
|
|
0 commit comments