internal VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, AzureLocation location, string instanceId, Models.Sku sku, Models.Plan plan, IReadOnlyList <VirtualMachineExtensionData> resources, IReadOnlyList <string> zones, bool?latestModelApplied, string vmId, VirtualMachineScaleSetVMInstanceView instanceView, HardwareProfile hardwareProfile, StorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, OSProfile osProfile, SecurityProfile securityProfile, NetworkProfile networkProfile, VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVMProtectionPolicy protectionPolicy, string userData) : base(id, name, type, tags, location) { InstanceId = instanceId; Sku = sku; Plan = plan; Resources = resources; Zones = zones; LatestModelApplied = latestModelApplied; VmId = vmId; InstanceView = instanceView; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; SecurityProfile = securityProfile; NetworkProfile = networkProfile; NetworkProfileConfiguration = networkProfileConfiguration; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; ProvisioningState = provisioningState; LicenseType = licenseType; ModelDefinitionApplied = modelDefinitionApplied; ProtectionPolicy = protectionPolicy; UserData = userData; }
internal AvailabilitySetData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, Location location, Models.Sku sku, int?platformUpdateDomainCount, int?platformFaultDomainCount, IList <Models.SubResource> virtualMachines, Models.SubResource proximityPlacementGroup, IReadOnlyList <InstanceViewStatus> statuses) : base(id, name, type, tags, location) { Sku = sku; PlatformUpdateDomainCount = platformUpdateDomainCount; PlatformFaultDomainCount = platformFaultDomainCount; VirtualMachines = virtualMachines; ProximityPlacementGroup = proximityPlacementGroup; Statuses = statuses; }
public DedicatedHostData(Location location, Models.Sku sku) : base(location) { if (sku == null) { throw new ArgumentNullException(nameof(sku)); } Sku = sku; VirtualMachines = new ChangeTrackingList <Resources.Models.SubResource>(); }
internal CapacityReservationData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, AzureLocation location, Models.Sku sku, IList <string> zones, string reservationId, IReadOnlyList <Resources.Models.SubResource> virtualMachinesAssociated, DateTimeOffset?provisioningTime, string provisioningState, CapacityReservationInstanceView instanceView) : base(id, name, type, tags, location) { Sku = sku; Zones = zones; ReservationId = reservationId; VirtualMachinesAssociated = virtualMachinesAssociated; ProvisioningTime = provisioningTime; ProvisioningState = provisioningState; InstanceView = instanceView; }
public CapacityReservationData(AzureLocation location, Models.Sku sku) : base(location) { if (sku == null) { throw new ArgumentNullException(nameof(sku)); } Sku = sku; Zones = new ChangeTrackingList <string>(); VirtualMachinesAssociated = new ChangeTrackingList <Resources.Models.SubResource>(); }
internal DedicatedHostData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, Location location, Models.Sku sku, int?platformFaultDomain, bool?autoReplaceOnFailure, string hostId, IReadOnlyList <Resources.Models.SubResource> virtualMachines, DedicatedHostLicenseTypes?licenseType, DateTimeOffset?provisioningTime, string provisioningState, DedicatedHostInstanceView instanceView) : base(id, name, type, tags, location) { Sku = sku; PlatformFaultDomain = platformFaultDomain; AutoReplaceOnFailure = autoReplaceOnFailure; HostId = hostId; VirtualMachines = virtualMachines; LicenseType = licenseType; ProvisioningTime = provisioningTime; ProvisioningState = provisioningState; InstanceView = instanceView; }
internal VirtualMachineScaleSetData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, Location location, Models.Sku sku, Models.Plan plan, ResourceIdentity identity, IList <string> zones, ExtendedLocation extendedLocation, UpgradePolicy upgradePolicy, AutomaticRepairsPolicy automaticRepairsPolicy, VirtualMachineScaleSetVMProfile virtualMachineProfile, string provisioningState, bool?overprovision, bool?doNotRunExtensionsOnOverprovisionedVMs, string uniqueId, bool?singlePlacementGroup, bool?zoneBalance, int?platformFaultDomainCount, WritableSubResource proximityPlacementGroup, WritableSubResource hostGroup, AdditionalCapabilities additionalCapabilities, ScaleInPolicy scaleInPolicy, OrchestrationMode?orchestrationMode) : base(id, name, type, tags, location) { Sku = sku; Plan = plan; Identity = identity; Zones = zones; ExtendedLocation = extendedLocation; UpgradePolicy = upgradePolicy; AutomaticRepairsPolicy = automaticRepairsPolicy; VirtualMachineProfile = virtualMachineProfile; ProvisioningState = provisioningState; Overprovision = overprovision; DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs; UniqueId = uniqueId; SinglePlacementGroup = singlePlacementGroup; ZoneBalance = zoneBalance; PlatformFaultDomainCount = platformFaultDomainCount; ProximityPlacementGroup = proximityPlacementGroup; HostGroup = hostGroup; AdditionalCapabilities = additionalCapabilities; ScaleInPolicy = scaleInPolicy; OrchestrationMode = orchestrationMode; }
internal static DedicatedHostData DeserializeDedicatedHostData(JsonElement element) { Models.Sku sku = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <int> platformFaultDomain = default; Optional <bool> autoReplaceOnFailure = default; Optional <string> hostId = default; Optional <IReadOnlyList <Resources.Models.SubResource> > virtualMachines = default; Optional <DedicatedHostLicenseTypes> licenseType = default; Optional <DateTimeOffset> provisioningTime = default; Optional <string> provisioningState = default; Optional <DedicatedHostInstanceView> instanceView = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { sku = Models.Sku.DeserializeSku(property.Value); continue; } if (property.NameEquals("tags")) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, property0.Value.GetString()); } tags = dictionary; continue; } if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("platformFaultDomain")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } platformFaultDomain = property0.Value.GetInt32(); continue; } if (property0.NameEquals("autoReplaceOnFailure")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } autoReplaceOnFailure = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("hostId")) { hostId = property0.Value.GetString(); continue; } if (property0.NameEquals("virtualMachines")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <Resources.Models.SubResource> array = new List <Resources.Models.SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(JsonSerializer.Deserialize <Resources.Models.SubResource>(item.ToString())); } virtualMachines = array; continue; } if (property0.NameEquals("licenseType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } licenseType = property0.Value.GetString().ToDedicatedHostLicenseTypes(); continue; } if (property0.NameEquals("provisioningTime")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningTime = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } if (property0.NameEquals("instanceView")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } instanceView = DedicatedHostInstanceView.DeserializeDedicatedHostInstanceView(property0.Value); continue; } } continue; } } return(new DedicatedHostData(id, name, type, tags, location, sku, Optional.ToNullable(platformFaultDomain), Optional.ToNullable(autoReplaceOnFailure), hostId.Value, Optional.ToList(virtualMachines), Optional.ToNullable(licenseType), Optional.ToNullable(provisioningTime), provisioningState.Value, instanceView.Value)); }
internal static CapacityReservationData DeserializeCapacityReservationData(JsonElement element) { Models.Sku sku = default; Optional <IList <string> > zones = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <string> reservationId = default; Optional <IReadOnlyList <Resources.Models.SubResource> > virtualMachinesAssociated = default; Optional <DateTimeOffset> provisioningTime = default; Optional <string> provisioningState = default; Optional <CapacityReservationInstanceView> instanceView = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { sku = Models.Sku.DeserializeSku(property.Value); continue; } if (property.NameEquals("zones")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <string> array = new List <string>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(item.GetString()); } zones = array; continue; } if (property.NameEquals("tags")) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, property0.Value.GetString()); } tags = dictionary; continue; } if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("reservationId")) { reservationId = property0.Value.GetString(); continue; } if (property0.NameEquals("virtualMachinesAssociated")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <Resources.Models.SubResource> array = new List <Resources.Models.SubResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(JsonSerializer.Deserialize <Resources.Models.SubResource>(item.ToString())); } virtualMachinesAssociated = array; continue; } if (property0.NameEquals("provisioningTime")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningTime = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } if (property0.NameEquals("instanceView")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } instanceView = CapacityReservationInstanceView.DeserializeCapacityReservationInstanceView(property0.Value); continue; } } continue; } } return(new CapacityReservationData(id, name, type, tags, location, sku, Optional.ToList(zones), reservationId.Value, Optional.ToList(virtualMachinesAssociated), Optional.ToNullable(provisioningTime), provisioningState.Value, instanceView.Value)); }
internal VirtualMachineScaleSet(string id, string name, string type, string location, IDictionary <string, string> tags, Sku sku, Plan plan, VirtualMachineScaleSetIdentity identity, IList <string> zones, UpgradePolicy upgradePolicy, AutomaticRepairsPolicy automaticRepairsPolicy, VirtualMachineScaleSetVMProfile virtualMachineProfile, string provisioningState, bool?overprovision, bool?doNotRunExtensionsOnOverprovisionedVMs, string uniqueId, bool?singlePlacementGroup, bool?zoneBalance, int?platformFaultDomainCount, SubResource proximityPlacementGroup, AdditionalCapabilities additionalCapabilities, ScaleInPolicy scaleInPolicy) : base(id, name, type, location, tags) { Sku = sku; Plan = plan; Identity = identity; Zones = zones; UpgradePolicy = upgradePolicy; AutomaticRepairsPolicy = automaticRepairsPolicy; VirtualMachineProfile = virtualMachineProfile; ProvisioningState = provisioningState; Overprovision = overprovision; DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs; UniqueId = uniqueId; SinglePlacementGroup = singlePlacementGroup; ZoneBalance = zoneBalance; PlatformFaultDomainCount = platformFaultDomainCount; ProximityPlacementGroup = proximityPlacementGroup; AdditionalCapabilities = additionalCapabilities; ScaleInPolicy = scaleInPolicy; }