internal static PrivateLinkResourceListResult DeserializePrivateLinkResourceListResult(JsonElement element)
        {
            IReadOnlyList <PrivateLinkResource> value = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <PrivateLinkResource> array = new List <PrivateLinkResource>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(PrivateLinkResource.DeserializePrivateLinkResource(item));
                        }
                    }
                    value = array;
                    continue;
                }
            }
            return(new PrivateLinkResourceListResult(value));
        }
Beispiel #2
0
        internal static PrivateLinkResourceListResult DeserializePrivateLinkResourceListResult(JsonElement element)
        {
            Optional <IReadOnlyList <PrivateLinkResource> > value = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <PrivateLinkResource> array = new List <PrivateLinkResource>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(PrivateLinkResource.DeserializePrivateLinkResource(item));
                    }
                    value = array;
                    continue;
                }
            }
            return(new PrivateLinkResourceListResult(Optional.ToList(value)));
        }