예제 #1
0
        internal static SqlTriggerGetResults DeserializeSqlTriggerGetResults(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 <SqlTriggerGetPropertiesResource> resource = 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 = SqlTriggerGetPropertiesResource.DeserializeSqlTriggerGetPropertiesResource(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new SqlTriggerGetResults(id.Value, name.Value, type.Value, location.Value, Optional.ToDictionary(tags), resource.Value));
        }
예제 #2
0
 internal SqlTriggerGetResults(string id, string name, string type, string location, IDictionary <string, string> tags, SqlTriggerGetPropertiesResource resource) : base(id, name, type, location, tags)
 {
     Resource = resource;
 }