using System.Runtime.Serialization;
using Newtonsoft.Json.Converters;
namespace AMWD.Net.Api.Cloudflare.Zones
{
///
/// Control options for the SSL feature of the Edge Certificates tab in the
/// Cloudflare SSL/TLS app.
///
public class SSL : ZoneSettingBase
{
///
/// Initialize a new instance of the class.
///
public SSL()
{
Id = ZoneSettingId.SSL;
}
///
/// The encryption mode that Cloudflare uses to connect to your origin server.
///
[JsonProperty("value")]
public SslMode? Value { get; set; }
}
///
/// SSL encryption modes.
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum SslMode
{
///
/// No encryption applied.
/// Turning off SSL disables HTTPS and causes browsers to show a warning that your website is not secure.
///
[EnumMember(Value = "off")]
Off = 1,
///
/// Enable encryption only between your visitors and Cloudflare.
/// This will avoid browser security warnings, but all connections between Cloudflare and your origin are made through HTTP.
///
[EnumMember(Value = "flexible")]
Flexible = 2,
///
/// Enable encryption end-to-end.
/// Use this mode when your origin server supports SSL certification but does not use a valid, publicly trusted certificate.
///
[EnumMember(Value = "full")]
Full = 3,
///
/// Enable encryption end-to-end and enforce validation on origin certificates.
/// Use Cloudflare’s Origin CA to generate certificates for your origin.
///
[EnumMember(Value = "strict")]
Strict = 4,
///
/// Enforce encryption between Cloudflare and your origin.
/// Use this mode to guarantee connections to your origin will always be encrypted, regardless of your visitor’s request.
///
[EnumMember(Value = "origin_pull")]
OriginPull = 5
}
}