internal static PublicIPAddressSku DeserializePublicIPAddressSku(JsonElement element)
        {
            Optional <PublicIPAddressSkuName> name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = new PublicIPAddressSkuName(property.Value.GetString());
                    continue;
                }
            }
            return(new PublicIPAddressSku(Optional.ToNullable(name)));
        }
Example #2
0
        internal static PublicIPAddressSku DeserializePublicIPAddressSku(JsonElement element)
        {
            PublicIPAddressSkuName?name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = new PublicIPAddressSkuName(property.Value.GetString());
                    continue;
                }
            }
            return(new PublicIPAddressSku(name));
        }