internal static CassandraTableGetResults DeserializeCassandraTableGetResults(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <CassandraTableGetPropertiesResource> resource = default; Optional <OptionsResource> options = 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("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("resource")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } resource = CassandraTableGetPropertiesResource.DeserializeCassandraTableGetPropertiesResource(property0.Value); continue; } if (property0.NameEquals("options")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } options = OptionsResource.DeserializeOptionsResource(property0.Value); continue; } } continue; } } return(new CassandraTableGetResults(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), resource.Value, options.Value)); }
internal SqlDatabaseGetResults(string id, string name, string type, string location, IDictionary <string, string> tags, SqlDatabaseGetPropertiesResource resource, OptionsResource options) : base(id, name, type, location, tags) { Resource = resource; Options = options; }
internal static GremlinDatabaseGetResults DeserializeGremlinDatabaseGetResults(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <string> location = default; Optional <IDictionary <string, string> > tags = default; Optional <GremlinDatabaseGetPropertiesResource> resource = default; Optional <OptionsResource> options = 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("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("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("resource")) { resource = GremlinDatabaseGetPropertiesResource.DeserializeGremlinDatabaseGetPropertiesResource(property0.Value); continue; } if (property0.NameEquals("options")) { options = OptionsResource.DeserializeOptionsResource(property0.Value); continue; } } continue; } } return(new GremlinDatabaseGetResults(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), resource.Value, options.Value)); }