internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement element) { Optional <ExtendedLocation> extendedLocation = default; Optional <string> kind = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <KubeEnvironmentProvisioningState> provisioningState = default; Optional <string> deploymentErrors = default; Optional <bool> internalLoadBalancerEnabled = default; Optional <string> defaultDomain = default; Optional <string> staticIp = default; Optional <ArcConfiguration> arcConfiguration = default; Optional <AppLogsConfiguration> appLogsConfiguration = default; Optional <string> aksResourceID = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("extendedLocation")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } extendedLocation = ExtendedLocation.DeserializeExtendedLocation(property.Value); continue; } if (property.NameEquals("kind")) { kind = property.Value.GetString(); 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("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = property0.Value.GetString().ToKubeEnvironmentProvisioningState(); continue; } if (property0.NameEquals("deploymentErrors")) { deploymentErrors = property0.Value.GetString(); continue; } if (property0.NameEquals("internalLoadBalancerEnabled")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } internalLoadBalancerEnabled = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("defaultDomain")) { defaultDomain = property0.Value.GetString(); continue; } if (property0.NameEquals("staticIp")) { staticIp = property0.Value.GetString(); continue; } if (property0.NameEquals("arcConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } arcConfiguration = ArcConfiguration.DeserializeArcConfiguration(property0.Value); continue; } if (property0.NameEquals("appLogsConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } appLogsConfiguration = AppLogsConfiguration.DeserializeAppLogsConfiguration(property0.Value); continue; } if (property0.NameEquals("aksResourceID")) { aksResourceID = property0.Value.GetString(); continue; } } continue; } } return(new KubeEnvironmentData(id, name, type, systemData, tags, location, kind.Value, extendedLocation.Value, Optional.ToNullable(provisioningState), deploymentErrors.Value, Optional.ToNullable(internalLoadBalancerEnabled), defaultDomain.Value, staticIp.Value, arcConfiguration.Value, appLogsConfiguration.Value, aksResourceID.Value)); }
internal CapacityReservationGroupData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, IList <string> zones, IReadOnlyList <Resources.Models.SubResource> capacityReservations, IReadOnlyList <Resources.Models.SubResource> virtualMachinesAssociated, CapacityReservationGroupInstanceView instanceView) : base(id, name, type, systemData, tags, location) { Zones = zones; CapacityReservations = capacityReservations; VirtualMachinesAssociated = virtualMachinesAssociated; InstanceView = instanceView; }
public DiskAccessData(AzureLocation location) : base(location) { PrivateEndpointConnections = new ChangeTrackingList <PrivateEndpointConnectionData>(); }
internal HciClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ProvisioningState?provisioningState, HciClusterStatus?status, Guid?cloudId, string cloudManagementEndpoint, Guid?aadClientId, Guid?aadTenantId, ClusterDesiredProperties desiredProperties, ClusterReportedProperties reportedProperties, float?trialDaysRemaining, string billingModel, DateTimeOffset?registrationTimestamp, DateTimeOffset?lastSyncTimestamp, DateTimeOffset?lastBillingTimestamp, string createdBy, Models.CreatedByType?createdByType, DateTimeOffset?createdAt, string lastModifiedBy, Models.CreatedByType?lastModifiedByType, DateTimeOffset?lastModifiedAt) : base(id, name, resourceType, systemData, tags, location) { ProvisioningState = provisioningState; Status = status; CloudId = cloudId; CloudManagementEndpoint = cloudManagementEndpoint; AadClientId = aadClientId; AadTenantId = aadTenantId; DesiredProperties = desiredProperties; ReportedProperties = reportedProperties; TrialDaysRemaining = trialDaysRemaining; BillingModel = billingModel; RegistrationTimestamp = registrationTimestamp; LastSyncTimestamp = lastSyncTimestamp; LastBillingTimestamp = lastBillingTimestamp; CreatedBy = createdBy; CreatedByType = createdByType; CreatedAt = createdAt; LastModifiedBy = lastModifiedBy; LastModifiedByType = lastModifiedByType; LastModifiedAt = lastModifiedAt; }
internal VirtualClusterData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string subnetId, string family, IReadOnlyList <string> childResources, string maintenanceConfigurationId) : base(id, name, type, systemData, tags, location) { SubnetId = subnetId; Family = family; ChildResources = childResources; MaintenanceConfigurationId = maintenanceConfigurationId; }
internal static SqlDatabaseCreateOrUpdateContent DeserializeSqlDatabaseCreateOrUpdateContent(JsonElement element) { IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; SqlDatabaseResource resource = default; Optional <CreateUpdateOptions> options = default; foreach (var property in element.EnumerateObject()) { 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("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("resource")) { resource = SqlDatabaseResource.DeserializeSqlDatabaseResource(property0.Value); continue; } if (property0.NameEquals("options")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } options = CreateUpdateOptions.DeserializeCreateUpdateOptions(property0.Value); continue; } } continue; } } return(new SqlDatabaseCreateOrUpdateContent(id, name, type, systemData, tags, location, resource, options.Value)); }
internal GalleryImageData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string description, string eula, Uri privacyStatementUri, Uri releaseNoteUri, OperatingSystemTypes?oSType, OperatingSystemStateTypes?oSState, HyperVGeneration?hyperVGeneration, DateTimeOffset?endOfLifeDate, GalleryImageIdentifier identifier, RecommendedMachineConfiguration recommended, Disallowed disallowed, ImagePurchasePlan purchasePlan, GalleryImagePropertiesProvisioningState?provisioningState, IList <GalleryImageFeature> features) : base(id, name, type, systemData, tags, location) { Description = description; Eula = eula; PrivacyStatementUri = privacyStatementUri; ReleaseNoteUri = releaseNoteUri; OSType = oSType; OSState = oSState; HyperVGeneration = hyperVGeneration; EndOfLifeDate = endOfLifeDate; Identifier = identifier; Recommended = recommended; Disallowed = disallowed; PurchasePlan = purchasePlan; ProvisioningState = provisioningState; Features = features; }
internal JitRequestData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string applicationResourceId, string publisherTenantId, IList <JitAuthorizationPolicies> jitAuthorizationPolicies, JitSchedulingPolicy jitSchedulingPolicy, ProvisioningState?provisioningState, JitRequestState?jitRequestState, ApplicationClientDetails createdBy, ApplicationClientDetails updatedBy) : base(id, name, type, systemData, tags, location) { ApplicationResourceId = applicationResourceId; PublisherTenantId = publisherTenantId; JitAuthorizationPolicies = jitAuthorizationPolicies; JitSchedulingPolicy = jitSchedulingPolicy; ProvisioningState = provisioningState; JitRequestState = jitRequestState; CreatedBy = createdBy; UpdatedBy = updatedBy; }
internal static ReservationResponseData DeserializeReservationResponseData(JsonElement element) { Optional <AzureLocation> location = default; Optional <int> etag = default; Optional <ReservationsSkuName> sku = default; Optional <ReservationsProperties> properties = default; Optional <string> kind = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } etag = property.Value.GetInt32(); continue; } if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = ReservationsSkuName.DeserializeReservationsSkuName(property.Value); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } properties = ReservationsProperties.DeserializeReservationsProperties(property.Value); continue; } if (property.NameEquals("kind")) { kind = 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 = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } } return(new ReservationResponseData(id, name, type, systemData, Optional.ToNullable(location), Optional.ToNullable(etag), sku.Value, properties.Value, kind.Value)); }
internal ElasticPoolData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, Models.Sku sku, string kind, ElasticPoolState?state, DateTimeOffset?creationDate, long?maxSizeBytes, ElasticPoolPerDatabaseSettings perDatabaseSettings, bool?zoneRedundant, ElasticPoolLicenseType?licenseType, string maintenanceConfigurationId) : base(id, name, type, systemData, tags, location) { Sku = sku; Kind = kind; State = state; CreationDate = creationDate; MaxSizeBytes = maxSizeBytes; PerDatabaseSettings = perDatabaseSettings; ZoneRedundant = zoneRedundant; LicenseType = licenseType; MaintenanceConfigurationId = maintenanceConfigurationId; }
public JitRequestData(AzureLocation location) : base(location) { JitAuthorizationPolicies = new ChangeTrackingList <JitAuthorizationPolicies>(); }
public ElasticPoolData(AzureLocation location) : base(location) { }
internal static SapApplicationServerInstanceData DeserializeSapApplicationServerInstanceData(JsonElement element) { IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <string> instanceNo = default; Optional <ResourceIdentifier> subnet = default; Optional <string> hostname = default; Optional <string> kernelVersion = default; Optional <string> kernelPatch = default; Optional <string> ipAddress = default; Optional <long?> gatewayPort = default; Optional <long?> icmHttpPort = default; Optional <long?> icmHttpsPort = default; Optional <ResourceIdentifier> virtualMachineId = default; Optional <SapVirtualInstanceStatus> status = default; Optional <SapHealthState> health = default; Optional <SapVirtualInstanceProvisioningState> provisioningState = default; Optional <SapVirtualInstanceError> errors = default; foreach (var property in element.EnumerateObject()) { 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 = new AzureLocation(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 = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("instanceNo")) { instanceNo = property0.Value.GetString(); continue; } if (property0.NameEquals("subnet")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } subnet = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("hostname")) { hostname = property0.Value.GetString(); continue; } if (property0.NameEquals("kernelVersion")) { kernelVersion = property0.Value.GetString(); continue; } if (property0.NameEquals("kernelPatch")) { kernelPatch = property0.Value.GetString(); continue; } if (property0.NameEquals("ipAddress")) { ipAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("gatewayPort")) { if (property0.Value.ValueKind == JsonValueKind.Null) { gatewayPort = null; continue; } gatewayPort = property0.Value.GetInt64(); continue; } if (property0.NameEquals("icmHttpPort")) { if (property0.Value.ValueKind == JsonValueKind.Null) { icmHttpPort = null; continue; } icmHttpPort = property0.Value.GetInt64(); continue; } if (property0.NameEquals("icmHttpsPort")) { if (property0.Value.ValueKind == JsonValueKind.Null) { icmHttpsPort = null; continue; } icmHttpsPort = property0.Value.GetInt64(); continue; } if (property0.NameEquals("virtualMachineId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } virtualMachineId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("status")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } status = new SapVirtualInstanceStatus(property0.Value.GetString()); continue; } if (property0.NameEquals("health")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } health = new SapHealthState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new SapVirtualInstanceProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("errors")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property0.Value); continue; } } continue; } } return(new SapApplicationServerInstanceData(id, name, type, systemData, tags, location, instanceNo.Value, subnet.Value, hostname.Value, kernelVersion.Value, kernelPatch.Value, ipAddress.Value, Optional.ToNullable(gatewayPort), Optional.ToNullable(icmHttpPort), Optional.ToNullable(icmHttpsPort), virtualMachineId.Value, Optional.ToNullable(status), Optional.ToNullable(health), Optional.ToNullable(provisioningState), errors.Value)); }
internal static ScVmmVirtualMachineTemplateData DeserializeScVmmVirtualMachineTemplateData(JsonElement element) { ExtendedLocation extendedLocation = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <string> inventoryItemId = default; Optional <string> uuid = default; Optional <string> vmmServerId = default; Optional <OSType> osType = default; Optional <string> osName = default; Optional <string> computerName = default; Optional <int> memoryMB = default; Optional <int> cpuCount = default; Optional <LimitCpuForMigration> limitCpuForMigration = default; Optional <DynamicMemoryEnabled> dynamicMemoryEnabled = default; Optional <IsCustomizable> isCustomizable = default; Optional <int> dynamicMemoryMaxMB = default; Optional <int> dynamicMemoryMinMB = default; Optional <string> isHighlyAvailable = default; Optional <int> generation = default; Optional <IReadOnlyList <NetworkInterfaces> > networkInterfaces = default; Optional <IReadOnlyList <VirtualDisk> > disks = default; Optional <string> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("extendedLocation")) { extendedLocation = ExtendedLocation.DeserializeExtendedLocation(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("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("inventoryItemId")) { inventoryItemId = property0.Value.GetString(); continue; } if (property0.NameEquals("uuid")) { uuid = property0.Value.GetString(); continue; } if (property0.NameEquals("vmmServerId")) { vmmServerId = property0.Value.GetString(); continue; } if (property0.NameEquals("osType")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } osType = new OSType(property0.Value.GetString()); continue; } if (property0.NameEquals("osName")) { osName = property0.Value.GetString(); continue; } if (property0.NameEquals("computerName")) { computerName = property0.Value.GetString(); continue; } if (property0.NameEquals("memoryMB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } memoryMB = property0.Value.GetInt32(); continue; } if (property0.NameEquals("cpuCount")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } cpuCount = property0.Value.GetInt32(); continue; } if (property0.NameEquals("limitCpuForMigration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } limitCpuForMigration = new LimitCpuForMigration(property0.Value.GetString()); continue; } if (property0.NameEquals("dynamicMemoryEnabled")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } dynamicMemoryEnabled = new DynamicMemoryEnabled(property0.Value.GetString()); continue; } if (property0.NameEquals("isCustomizable")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } isCustomizable = new IsCustomizable(property0.Value.GetString()); continue; } if (property0.NameEquals("dynamicMemoryMaxMB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } dynamicMemoryMaxMB = property0.Value.GetInt32(); continue; } if (property0.NameEquals("dynamicMemoryMinMB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } dynamicMemoryMinMB = property0.Value.GetInt32(); continue; } if (property0.NameEquals("isHighlyAvailable")) { isHighlyAvailable = property0.Value.GetString(); continue; } if (property0.NameEquals("generation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } generation = property0.Value.GetInt32(); continue; } if (property0.NameEquals("networkInterfaces")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <NetworkInterfaces> array = new List <NetworkInterfaces>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(Models.NetworkInterfaces.DeserializeNetworkInterfaces(item)); } networkInterfaces = array; continue; } if (property0.NameEquals("disks")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <VirtualDisk> array = new List <VirtualDisk>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(VirtualDisk.DeserializeVirtualDisk(item)); } disks = array; continue; } if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } } continue; } } return(new ScVmmVirtualMachineTemplateData(id, name, type, systemData, tags, location, extendedLocation, inventoryItemId.Value, uuid.Value, vmmServerId.Value, Optional.ToNullable(osType), osName.Value, computerName.Value, Optional.ToNullable(memoryMB), Optional.ToNullable(cpuCount), Optional.ToNullable(limitCpuForMigration), Optional.ToNullable(dynamicMemoryEnabled), Optional.ToNullable(isCustomizable), Optional.ToNullable(dynamicMemoryMaxMB), Optional.ToNullable(dynamicMemoryMinMB), isHighlyAvailable.Value, Optional.ToNullable(generation), Optional.ToList(networkInterfaces), Optional.ToList(disks), provisioningState.Value)); }
internal static NetworkProfileData DeserializeNetworkProfileData(JsonElement element) { Optional <ETag> etag = default; Optional <ResourceIdentifier> id = default; Optional <string> name = default; Optional <ResourceType> type = default; Optional <AzureLocation> location = default; Optional <IDictionary <string, string> > tags = default; Optional <IReadOnlyList <ContainerNetworkInterface> > containerNetworkInterfaces = default; Optional <IList <ContainerNetworkInterfaceConfiguration> > containerNetworkInterfaceConfigurations = default; Optional <Guid> resourceGuid = default; Optional <NetworkProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } 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("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("containerNetworkInterfaces")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <ContainerNetworkInterface> array = new List <ContainerNetworkInterface>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ContainerNetworkInterface.DeserializeContainerNetworkInterface(item)); } containerNetworkInterfaces = array; continue; } if (property0.NameEquals("containerNetworkInterfaceConfigurations")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <ContainerNetworkInterfaceConfiguration> array = new List <ContainerNetworkInterfaceConfiguration>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ContainerNetworkInterfaceConfiguration.DeserializeContainerNetworkInterfaceConfiguration(item)); } containerNetworkInterfaceConfigurations = array; continue; } if (property0.NameEquals("resourceGuid")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } resourceGuid = property0.Value.GetGuid(); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new NetworkProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new NetworkProfileData(id.Value, name.Value, Optional.ToNullable(type), Optional.ToNullable(location), Optional.ToDictionary(tags), Optional.ToNullable(etag), Optional.ToList(containerNetworkInterfaces), Optional.ToList(containerNetworkInterfaceConfigurations), Optional.ToNullable(resourceGuid), Optional.ToNullable(provisioningState))); }
internal static VirtualMachineScaleSetData DeserializeVirtualMachineScaleSetData(JsonElement element) { Optional <Models.Sku> sku = default; Optional <Plan> plan = default; Optional <ResourceIdentity> identity = default; Optional <IList <string> > zones = default; Optional <ExtendedLocation> extendedLocation = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <UpgradePolicy> upgradePolicy = default; Optional <AutomaticRepairsPolicy> automaticRepairsPolicy = default; Optional <VirtualMachineScaleSetVMProfile> virtualMachineProfile = default; Optional <string> provisioningState = default; Optional <bool> overprovision = default; Optional <bool> doNotRunExtensionsOnOverprovisionedVMs = default; Optional <string> uniqueId = default; Optional <bool> singlePlacementGroup = default; Optional <bool> zoneBalance = default; Optional <int> platformFaultDomainCount = default; Optional <WritableSubResource> proximityPlacementGroup = default; Optional <WritableSubResource> hostGroup = default; Optional <AdditionalCapabilities> additionalCapabilities = default; Optional <ScaleInPolicy> scaleInPolicy = default; Optional <OrchestrationMode> orchestrationMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = Models.Sku.DeserializeSku(property.Value); continue; } if (property.NameEquals("plan")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } plan = Plan.DeserializePlan(property.Value); continue; } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } identity = JsonSerializer.Deserialize <ResourceIdentity>(property.Value.ToString()); 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("extendedLocation")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } extendedLocation = ExtendedLocation.DeserializeExtendedLocation(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("upgradePolicy")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property0.Value); continue; } if (property0.NameEquals("automaticRepairsPolicy")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } automaticRepairsPolicy = AutomaticRepairsPolicy.DeserializeAutomaticRepairsPolicy(property0.Value); continue; } if (property0.NameEquals("virtualMachineProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } virtualMachineProfile = VirtualMachineScaleSetVMProfile.DeserializeVirtualMachineScaleSetVMProfile(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } if (property0.NameEquals("overprovision")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } overprovision = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("doNotRunExtensionsOnOverprovisionedVMs")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } doNotRunExtensionsOnOverprovisionedVMs = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("uniqueId")) { uniqueId = property0.Value.GetString(); continue; } if (property0.NameEquals("singlePlacementGroup")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } singlePlacementGroup = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("zoneBalance")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } zoneBalance = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("platformFaultDomainCount")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } platformFaultDomainCount = property0.Value.GetInt32(); continue; } if (property0.NameEquals("proximityPlacementGroup")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } proximityPlacementGroup = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("hostGroup")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } hostGroup = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("additionalCapabilities")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } additionalCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property0.Value); continue; } if (property0.NameEquals("scaleInPolicy")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } scaleInPolicy = ScaleInPolicy.DeserializeScaleInPolicy(property0.Value); continue; } if (property0.NameEquals("orchestrationMode")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } orchestrationMode = new OrchestrationMode(property0.Value.GetString()); continue; } } continue; } } return(new VirtualMachineScaleSetData(id, name, type, tags, location, sku.Value, plan.Value, identity, Optional.ToList(zones), extendedLocation.Value, upgradePolicy.Value, automaticRepairsPolicy.Value, virtualMachineProfile.Value, provisioningState.Value, Optional.ToNullable(overprovision), Optional.ToNullable(doNotRunExtensionsOnOverprovisionedVMs), uniqueId.Value, Optional.ToNullable(singlePlacementGroup), Optional.ToNullable(zoneBalance), Optional.ToNullable(platformFaultDomainCount), proximityPlacementGroup, hostGroup, additionalCapabilities.Value, scaleInPolicy.Value, Optional.ToNullable(orchestrationMode))); }
internal static ElasticSanData DeserializeElasticSanData(JsonElement element) { IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <ElasticSanSku> sku = default; Optional <IList <string> > availabilityZones = default; Optional <ProvisioningStates> provisioningState = default; Optional <long> baseSizeTiB = default; Optional <long> extendedCapacitySizeTiB = default; Optional <long> totalVolumeSizeGiB = default; Optional <long> volumeGroupCount = default; Optional <long> totalIops = default; Optional <long> totalMBps = default; Optional <long> provisionedMBps = default; foreach (var property in element.EnumerateObject()) { 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 = new AzureLocation(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 = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("sku")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } sku = ElasticSanSku.DeserializeElasticSanSku(property0.Value); continue; } if (property0.NameEquals("availabilityZones")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <string> array = new List <string>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(item.GetString()); } availabilityZones = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningStates(property0.Value.GetString()); continue; } if (property0.NameEquals("baseSizeTiB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } baseSizeTiB = property0.Value.GetInt64(); continue; } if (property0.NameEquals("extendedCapacitySizeTiB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } extendedCapacitySizeTiB = property0.Value.GetInt64(); continue; } if (property0.NameEquals("totalVolumeSizeGiB")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } totalVolumeSizeGiB = property0.Value.GetInt64(); continue; } if (property0.NameEquals("volumeGroupCount")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } volumeGroupCount = property0.Value.GetInt64(); continue; } if (property0.NameEquals("totalIops")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } totalIops = property0.Value.GetInt64(); continue; } if (property0.NameEquals("totalMBps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } totalMBps = property0.Value.GetInt64(); continue; } if (property0.NameEquals("provisionedMBps")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisionedMBps = property0.Value.GetInt64(); continue; } } continue; } } return(new ElasticSanData(id, name, type, systemData, tags, location, sku.Value, Optional.ToList(availabilityZones), Optional.ToNullable(provisioningState), Optional.ToNullable(baseSizeTiB), Optional.ToNullable(extendedCapacitySizeTiB), Optional.ToNullable(totalVolumeSizeGiB), Optional.ToNullable(volumeGroupCount), Optional.ToNullable(totalIops), Optional.ToNullable(totalMBps), Optional.ToNullable(provisionedMBps))); }
public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string name) { var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}"; return(new ResourceIdentifier(resourceId)); }
public GalleryImageData(AzureLocation location) : base(location) { Features = new ChangeTrackingList <GalleryImageFeature>(); }
public VirtualMachineData(AzureLocation location) : base(location) { Resources = new ChangeTrackingList <VirtualMachineExtensionData>(); Zones = new ChangeTrackingList <string>(); }
public HciClusterData(AzureLocation location) : base(location) { }
internal VirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ComputePlan plan, IReadOnlyList <VirtualMachineExtensionData> resources, ManagedServiceIdentity identity, IList <string> zones, Models.ExtendedLocation extendedLocation, HardwareProfile hardwareProfile, StorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, OSProfile osProfile, NetworkProfile networkProfile, SecurityProfile securityProfile, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, WritableSubResource virtualMachineScaleSet, WritableSubResource proximityPlacementGroup, VirtualMachinePriorityTypes?priority, VirtualMachineEvictionPolicyTypes?evictionPolicy, BillingProfile billingProfile, WritableSubResource host, WritableSubResource hostGroup, string provisioningState, VirtualMachineInstanceView instanceView, string licenseType, string vmId, string extensionsTimeBudget, int?platformFaultDomain, ScheduledEventsProfile scheduledEventsProfile, string userData, CapacityReservationProfile capacityReservation, ApplicationProfile applicationProfile) : base(id, name, resourceType, systemData, tags, location) { Plan = plan; Resources = resources; Identity = identity; Zones = zones; ExtendedLocation = extendedLocation; HardwareProfile = hardwareProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OSProfile = osProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; DiagnosticsProfile = diagnosticsProfile; AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; Host = host; HostGroup = hostGroup; ProvisioningState = provisioningState; InstanceView = instanceView; LicenseType = licenseType; VmId = vmId; ExtensionsTimeBudget = extensionsTimeBudget; PlatformFaultDomain = platformFaultDomain; ScheduledEventsProfile = scheduledEventsProfile; UserData = userData; CapacityReservation = capacityReservation; ApplicationProfile = applicationProfile; }
public VirtualClusterData(AzureLocation location) : base(location) { ChildResources = new ChangeTrackingList <string>(); }
internal TableCreateUpdateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, TableResource resource, CreateUpdateOptions options) : base(id, name, resourceType, systemData, tags, location) { Resource = resource; Options = options; }
public CapacityReservationGroupData(AzureLocation location) : base(location) { Zones = new ChangeTrackingList <string>(); CapacityReservations = new ChangeTrackingList <Resources.Models.SubResource>(); VirtualMachinesAssociated = new ChangeTrackingList <Resources.Models.SubResource>(); }
internal static ImageData DeserializeImageData(JsonElement element) { Optional <ExtendedLocation> extendedLocation = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <WritableSubResource> sourceVirtualMachine = default; Optional <ImageStorageProfile> storageProfile = default; Optional <string> provisioningState = default; Optional <HyperVGenerationTypes> hyperVGeneration = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("extendedLocation")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } extendedLocation = ExtendedLocation.DeserializeExtendedLocation(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("sourceVirtualMachine")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } sourceVirtualMachine = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("storageProfile")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } storageProfile = ImageStorageProfile.DeserializeImageStorageProfile(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } if (property0.NameEquals("hyperVGeneration")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } hyperVGeneration = new HyperVGenerationTypes(property0.Value.GetString()); continue; } } continue; } } return(new ImageData(id, name, type, tags, location, extendedLocation.Value, sourceVirtualMachine, storageProfile.Value, provisioningState.Value, Optional.ToNullable(hyperVGeneration))); }
internal static ServiceBusNamespaceData DeserializeServiceBusNamespaceData(JsonElement element) { Optional <ServiceBusSku> sku = default; Optional <ManagedServiceIdentity> identity = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <string> provisioningState = default; Optional <string> status = default; Optional <DateTimeOffset> createdAt = default; Optional <DateTimeOffset> updatedAt = default; Optional <string> serviceBusEndpoint = default; Optional <string> metricId = default; Optional <bool> zoneRedundant = default; Optional <Models.EncryptionProperties> encryption = default; Optional <IList <ServiceBusPrivateEndpointConnectionData> > privateEndpointConnections = default; Optional <bool> disableLocalAuth = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = ServiceBusSku.DeserializeServiceBusSku(property.Value); continue; } if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } identity = JsonSerializer.Deserialize <ManagedServiceIdentity>(property.Value.ToString()); 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("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { provisioningState = property0.Value.GetString(); continue; } if (property0.NameEquals("status")) { status = property0.Value.GetString(); continue; } if (property0.NameEquals("createdAt")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } createdAt = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("updatedAt")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } updatedAt = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("serviceBusEndpoint")) { serviceBusEndpoint = property0.Value.GetString(); continue; } if (property0.NameEquals("metricId")) { metricId = property0.Value.GetString(); continue; } if (property0.NameEquals("zoneRedundant")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } zoneRedundant = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("encryption")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } encryption = Models.EncryptionProperties.DeserializeEncryptionProperties(property0.Value); continue; } if (property0.NameEquals("privateEndpointConnections")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <ServiceBusPrivateEndpointConnectionData> array = new List <ServiceBusPrivateEndpointConnectionData>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(ServiceBusPrivateEndpointConnectionData.DeserializeServiceBusPrivateEndpointConnectionData(item)); } privateEndpointConnections = array; continue; } if (property0.NameEquals("disableLocalAuth")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } disableLocalAuth = property0.Value.GetBoolean(); continue; } } continue; } } return(new ServiceBusNamespaceData(id, name, type, systemData, tags, location, sku.Value, identity, provisioningState.Value, status.Value, Optional.ToNullable(createdAt), Optional.ToNullable(updatedAt), serviceBusEndpoint.Value, metricId.Value, Optional.ToNullable(zoneRedundant), encryption.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(disableLocalAuth))); }
internal static ArmDeploymentData DeserializeArmDeploymentData(JsonElement element) { Optional <AzureLocation> location = default; Optional <ArmDeploymentPropertiesExtended> properties = default; Optional <IReadOnlyDictionary <string, string> > tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } properties = ArmDeploymentPropertiesExtended.DeserializeArmDeploymentPropertiesExtended(property.Value); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } 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("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("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } } return(new ArmDeploymentData(id, name, type, systemData, Optional.ToNullable(location), properties.Value, Optional.ToDictionary(tags))); }
internal DiskAccessData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ExtendedLocation extendedLocation, IReadOnlyList <PrivateEndpointConnectionData> privateEndpointConnections, string provisioningState, DateTimeOffset?timeCreated) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; PrivateEndpointConnections = privateEndpointConnections; ProvisioningState = provisioningState; TimeCreated = timeCreated; }
internal EventHubNamespaceData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, Models.Sku sku, ManagedServiceIdentity identity, string provisioningState, string status, DateTimeOffset?createdAt, DateTimeOffset?updatedAt, string serviceBusEndpoint, string clusterArmId, string metricId, bool?isAutoInflateEnabled, int?maximumThroughputUnits, bool?kafkaEnabled, bool?zoneRedundant, EventHubEncryption encryption, IList <PrivateEndpointConnectionData> privateEndpointConnections, bool?disableLocalAuth, string alternateName) : base(id, name, type, systemData, tags, location) { Sku = sku; Identity = identity; ProvisioningState = provisioningState; Status = status; CreatedAt = createdAt; UpdatedAt = updatedAt; ServiceBusEndpoint = serviceBusEndpoint; ClusterArmId = clusterArmId; MetricId = metricId; IsAutoInflateEnabled = isAutoInflateEnabled; MaximumThroughputUnits = maximumThroughputUnits; KafkaEnabled = kafkaEnabled; ZoneRedundant = zoneRedundant; Encryption = encryption; PrivateEndpointConnections = privateEndpointConnections; DisableLocalAuth = disableLocalAuth; AlternateName = alternateName; }