internal static AfdRouteCacheConfiguration DeserializeAfdRouteCacheConfiguration(JsonElement element) { Optional <AfdQueryStringCachingBehavior> queryStringCachingBehavior = default; Optional <string> queryParameters = default; Optional <CompressionSettings> compressionSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("queryStringCachingBehavior")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } queryStringCachingBehavior = new AfdQueryStringCachingBehavior(property.Value.GetString()); continue; } if (property.NameEquals("queryParameters")) { queryParameters = property.Value.GetString(); continue; } if (property.NameEquals("compressionSettings")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } compressionSettings = CompressionSettings.DeserializeCompressionSettings(property.Value); continue; } } return(new AfdRouteCacheConfiguration(Optional.ToNullable(queryStringCachingBehavior), queryParameters.Value, compressionSettings.Value)); }
public static string ToSerialString(this AfdQueryStringCachingBehavior value) => value switch {