internal static VaultAccessPolicyParameters DeserializeVaultAccessPolicyParameters(JsonElement element) { string id = default; string name = default; string type = default; string location = default; VaultAccessPolicyProperties properties = 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("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } location = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { properties = VaultAccessPolicyProperties.DeserializeVaultAccessPolicyProperties(property.Value); continue; } } return(new VaultAccessPolicyParameters(id, name, type, location, properties)); }
internal static VaultAccessPolicyParameters DeserializeVaultAccessPolicyParameters(JsonElement element) { Optional <AzureLocation> location = default; VaultAccessPolicyProperties properties = 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")) { properties = VaultAccessPolicyProperties.DeserializeVaultAccessPolicyProperties(property.Value); 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 VaultAccessPolicyParameters(id, name, type, systemData, Optional.ToNullable(location), properties)); }
internal static VaultAccessPolicyParameters DeserializeVaultAccessPolicyParameters(JsonElement element) { Optional <string> location = default; VaultAccessPolicyProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { properties = VaultAccessPolicyProperties.DeserializeVaultAccessPolicyProperties(property.Value); 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 VaultAccessPolicyParameters(id, name, type, systemData, location.Value, properties)); }
internal static VaultAccessPolicyParameters DeserializeVaultAccessPolicyParameters(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; VaultAccessPolicyProperties 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("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { properties = VaultAccessPolicyProperties.DeserializeVaultAccessPolicyProperties(property.Value); continue; } } return(new VaultAccessPolicyParameters(id.Value, name.Value, type.Value, location.Value, properties)); }