internal ResourceGroupPatchable(string name, ResourceGroupProperties properties, string managedBy, IDictionary <string, string> tags) { Name = name; Properties = properties; ManagedBy = managedBy; Tags = tags; }
internal ResourceGroup(string id, string name, ResourceGroupProperties properties, string location, string managedBy, IDictionary <string, string> tags) { Id = id; Name = name; Properties = properties; Location = location; ManagedBy = managedBy; Tags = tags; }
internal static ResourceGroup DeserializeResourceGroup(JsonElement element) { Optional <string> id = default; Optional <string> name = default; Optional <ResourceGroupProperties> properties = default; string location = default; Optional <string> managedBy = default; Optional <IDictionary <string, string> > tags = 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("properties")) { properties = ResourceGroupProperties.DeserializeResourceGroupProperties(property.Value); continue; } if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("managedBy")) { managedBy = 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; } } return(new ResourceGroup(id.Value, name.Value, properties.Value, location, managedBy.Value, Optional.ToDictionary(tags))); }
internal static ResourceGroup DeserializeResourceGroup(JsonElement element) { string id = default; string name = default; ResourceGroupProperties properties = default; string location = default; string managedBy = default; IDictionary <string, string> tags = 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("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } properties = ResourceGroupProperties.DeserializeResourceGroupProperties(property.Value); continue; } if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("managedBy")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } managedBy = property.Value.GetString(); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property0.Name, null); } else { dictionary.Add(property0.Name, property0.Value.GetString()); } } tags = dictionary; continue; } } return(new ResourceGroup(id, name, properties, location, managedBy, tags)); }