internal static ManagedPrivateEndpoint DeserializeManagedPrivateEndpoint(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <ManagedPrivateEndpointProperties> properties = 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")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } properties = ManagedPrivateEndpointProperties.DeserializeManagedPrivateEndpointProperties(property.Value); continue; } } return(new ManagedPrivateEndpoint(id.Value, name.Value, type.Value, properties.Value)); }
public static ManagedPrivateEndpoint ManagedPrivateEndpoint(string id = null, string name = null, string type = null, ManagedPrivateEndpointProperties properties = null) { return(new ManagedPrivateEndpoint(id, name, type, properties)); }