internal static PrivateEndpointConnectionReference DeserializePrivateEndpointConnectionReference(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <ProvisioningState> provisioningState = default; Optional <PrivateEndpoint> privateEndpoint = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; foreach (var property in element.EnumerateObject()) { 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")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpoint")) { privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } } continue; } } return(new PrivateEndpointConnectionReference(id.Value, name.Value, type.Value, Optional.ToNullable(provisioningState), privateEndpoint.Value, privateLinkServiceConnectionState.Value)); }
internal PrivateEndpointConnectionReference(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, ProvisioningState?provisioningState, WritableSubResource privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState) : base(id, name, type, systemData) { ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; }
internal static PrivateEndpointConnectionReference DeserializePrivateEndpointConnectionReference(JsonElement element) { ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <ProvisioningState> provisioningState = default; Optional <WritableSubResource> privateEndpoint = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; foreach (var property in element.EnumerateObject()) { 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("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } } continue; } } return(new PrivateEndpointConnectionReference(id, name, type, Optional.ToNullable(provisioningState), privateEndpoint, privateLinkServiceConnectionState.Value)); }
internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element) { string id = default; string name = default; string type = default; ProvisioningState?provisioningState = default; PrivateEndpoint privateEndpoint = default; PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } id = property.Value.GetString(); continue; } if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } type = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } } continue; } } return(new PrivateEndpointConnection(id, name, type, provisioningState, privateEndpoint, privateLinkServiceConnectionState)); }