using System.Runtime.Serialization;
using Newtonsoft.Json.Converters;
namespace AMWD.Net.Api.Cloudflare.Zones
{
///
/// Apply custom caching based on the option selected.
///
public class CacheLevel : ZoneSettingBase
{
///
/// Initializes a new instance of the class.
///
public CacheLevel()
{
Id = ZoneSettingId.CacheLevel;
}
///
/// Current value of the zone setting.
///
[JsonProperty("value")]
public CacheLevelOption? Value { get; set; }
}
///
/// Apply custom caching based on the option selected.
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum CacheLevelOption
{
///
/// Cloudflare does not cache.
///
[EnumMember(Value = "bypass")]
Bypass = 1,
///
/// Delivers resources from cache when there is no query string.
///
[EnumMember(Value = "basic")]
Basic = 2,
///
/// Delivers the same resource to everyone independent of the query string.
///
[EnumMember(Value = "simplified")]
Simplified = 3,
///
/// Caches all static content that has a query string.
///
[EnumMember(Value = "aggressive")]
Aggressive = 4,
///
/// Treats all content as static and caches all file types beyond the
/// Cloudflare default cached content
///
[EnumMember(Value = "cache_everything")]
CacheEverything = 5
}
}