internal static LoadBalancerSku DeserializeLoadBalancerSku(JsonElement element) { Optional <LoadBalancerSkuName> name = default; Optional <LoadBalancerSkuTier> tier = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } name = new LoadBalancerSkuName(property.Value.GetString()); continue; } if (property.NameEquals("tier")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } tier = new LoadBalancerSkuTier(property.Value.GetString()); continue; } } return(new LoadBalancerSku(Optional.ToNullable(name), Optional.ToNullable(tier))); }
internal static LoadBalancerSku DeserializeLoadBalancerSku(JsonElement element) { Optional <LoadBalancerSkuName> name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = new LoadBalancerSkuName(property.Value.GetString()); continue; } } return(new LoadBalancerSku(Optional.ToNullable(name))); }
internal static LoadBalancerSku DeserializeLoadBalancerSku(JsonElement element) { LoadBalancerSkuName?name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } name = new LoadBalancerSkuName(property.Value.GetString()); continue; } } return(new LoadBalancerSku(name)); }