internal MhsmPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType type, IDictionary <string, string> tags, Location location, ManagedHsmSku sku, SystemData systemData, string etag, MhsmPrivateEndpoint privateEndpoint, MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState?provisioningState) : base(id, name, type, tags, location, sku, systemData) { Etag = etag; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }
internal static MhsmPrivateEndpointConnectionData DeserializeMhsmPrivateEndpointConnectionData(JsonElement element) { Optional <string> etag = default; Optional <ManagedHsmSku> sku = default; Optional <SystemData> systemData = default; IDictionary <string, string> tags = default; Location location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <MhsmPrivateEndpoint> privateEndpoint = default; Optional <MhsmPrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; Optional <PrivateEndpointConnectionProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = ManagedHsmSku.DeserializeManagedHsmSku(property.Value); continue; } if (property.NameEquals("systemData")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } systemData = SystemData.DeserializeSystemData(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 = 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("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = MhsmPrivateEndpoint.DeserializeMhsmPrivateEndpoint(property0.Value); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = MhsmPrivateLinkServiceConnectionState.DeserializeMhsmPrivateLinkServiceConnectionState(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new MhsmPrivateEndpointConnectionData(id, name, type, tags, location, sku.Value, systemData.Value, etag.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState))); }
internal MhsmPrivateEndpointConnectionItem(MhsmPrivateEndpoint privateEndpoint, MhsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState?provisioningState) { PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }