// This file is @generated by prost-build.
/// Identifies a percentage, in the range \[0.0, 100.0\].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Percent {
    #[prost(double, tag = "1")]
    pub value: f64,
}
/// A fractional percentage is used in cases in which for performance reasons performing floating
/// point to integer conversions during randomness calculations is undesirable. The message includes
/// both a numerator and denominator that together determine the final fractional value.
///
/// * **Example**: 1/100 = 1%.
/// * **Example**: 3/10000 = 0.03%.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FractionalPercent {
    /// Specifies the numerator. Defaults to 0.
    #[prost(uint32, tag = "1")]
    pub numerator: u32,
    /// Specifies the denominator. If the denominator specified is less than the numerator, the final
    /// fractional percentage is capped at 1 (100%).
    #[prost(enumeration = "fractional_percent::DenominatorType", tag = "2")]
    pub denominator: i32,
}
/// Nested message and enum types in `FractionalPercent`.
pub mod fractional_percent {
    /// Fraction percentages support several fixed denominator values.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DenominatorType {
        /// 100.
        ///
        /// **Example**: 1/100 = 1%.
        Hundred = 0,
        /// 10,000.
        ///
        /// **Example**: 1/10000 = 0.01%.
        TenThousand = 1,
        /// 1,000,000.
        ///
        /// **Example**: 1/1000000 = 0.0001%.
        Million = 2,
    }
    impl DenominatorType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Hundred => "HUNDRED",
                Self::TenThousand => "TEN_THOUSAND",
                Self::Million => "MILLION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "HUNDRED" => Some(Self::Hundred),
                "TEN_THOUSAND" => Some(Self::TenThousand),
                "MILLION" => Some(Self::Million),
                _ => None,
            }
        }
    }
}
/// Envoy uses SemVer (<https://semver.org/>). Major/minor versions indicate
/// expected behaviors and APIs, the patch version field is used only
/// for security fixes and can be generally ignored.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SemanticVersion {
    #[prost(uint32, tag = "1")]
    pub major_number: u32,
    #[prost(uint32, tag = "2")]
    pub minor_number: u32,
    #[prost(uint32, tag = "3")]
    pub patch: u32,
}
/// HTTP status.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HttpStatus {
    /// Supplies HTTP response code.
    #[prost(enumeration = "StatusCode", tag = "1")]
    pub code: i32,
}
/// HTTP response codes supported in Envoy.
/// For more details: <https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StatusCode {
    /// Empty - This code not part of the HTTP status code specification, but it is needed for proto
    /// `enum` type.
    Empty = 0,
    /// Continue - ``100`` status code.
    Continue = 100,
    /// OK - ``200`` status code.
    Ok = 200,
    /// Created - ``201`` status code.
    Created = 201,
    /// Accepted - ``202`` status code.
    Accepted = 202,
    /// NonAuthoritativeInformation - ``203`` status code.
    NonAuthoritativeInformation = 203,
    /// NoContent - ``204`` status code.
    NoContent = 204,
    /// ResetContent - ``205`` status code.
    ResetContent = 205,
    /// PartialContent - ``206`` status code.
    PartialContent = 206,
    /// MultiStatus - ``207`` status code.
    MultiStatus = 207,
    /// AlreadyReported - ``208`` status code.
    AlreadyReported = 208,
    /// IMUsed - ``226`` status code.
    ImUsed = 226,
    /// MultipleChoices - ``300`` status code.
    MultipleChoices = 300,
    /// MovedPermanently - ``301`` status code.
    MovedPermanently = 301,
    /// Found - ``302`` status code.
    Found = 302,
    /// SeeOther - ``303`` status code.
    SeeOther = 303,
    /// NotModified - ``304`` status code.
    NotModified = 304,
    /// UseProxy - ``305`` status code.
    UseProxy = 305,
    /// TemporaryRedirect - ``307`` status code.
    TemporaryRedirect = 307,
    /// PermanentRedirect - ``308`` status code.
    PermanentRedirect = 308,
    /// BadRequest - ``400`` status code.
    BadRequest = 400,
    /// Unauthorized - ``401`` status code.
    Unauthorized = 401,
    /// PaymentRequired - ``402`` status code.
    PaymentRequired = 402,
    /// Forbidden - ``403`` status code.
    Forbidden = 403,
    /// NotFound - ``404`` status code.
    NotFound = 404,
    /// MethodNotAllowed - ``405`` status code.
    MethodNotAllowed = 405,
    /// NotAcceptable - ``406`` status code.
    NotAcceptable = 406,
    /// ProxyAuthenticationRequired - ``407`` status code.
    ProxyAuthenticationRequired = 407,
    /// RequestTimeout - ``408`` status code.
    RequestTimeout = 408,
    /// Conflict - ``409`` status code.
    Conflict = 409,
    /// Gone - ``410`` status code.
    Gone = 410,
    /// LengthRequired - ``411`` status code.
    LengthRequired = 411,
    /// PreconditionFailed - ``412`` status code.
    PreconditionFailed = 412,
    /// PayloadTooLarge - ``413`` status code.
    PayloadTooLarge = 413,
    /// URITooLong - ``414`` status code.
    UriTooLong = 414,
    /// UnsupportedMediaType - ``415`` status code.
    UnsupportedMediaType = 415,
    /// RangeNotSatisfiable - ``416`` status code.
    RangeNotSatisfiable = 416,
    /// ExpectationFailed - ``417`` status code.
    ExpectationFailed = 417,
    /// MisdirectedRequest - ``421`` status code.
    MisdirectedRequest = 421,
    /// UnprocessableEntity - ``422`` status code.
    UnprocessableEntity = 422,
    /// Locked - ``423`` status code.
    Locked = 423,
    /// FailedDependency - ``424`` status code.
    FailedDependency = 424,
    /// UpgradeRequired - ``426`` status code.
    UpgradeRequired = 426,
    /// PreconditionRequired - ``428`` status code.
    PreconditionRequired = 428,
    /// TooManyRequests - ``429`` status code.
    TooManyRequests = 429,
    /// RequestHeaderFieldsTooLarge - ``431`` status code.
    RequestHeaderFieldsTooLarge = 431,
    /// InternalServerError - ``500`` status code.
    InternalServerError = 500,
    /// NotImplemented - ``501`` status code.
    NotImplemented = 501,
    /// BadGateway - ``502`` status code.
    BadGateway = 502,
    /// ServiceUnavailable - ``503`` status code.
    ServiceUnavailable = 503,
    /// GatewayTimeout - ``504`` status code.
    GatewayTimeout = 504,
    /// HTTPVersionNotSupported - ``505`` status code.
    HttpVersionNotSupported = 505,
    /// VariantAlsoNegotiates - ``506`` status code.
    VariantAlsoNegotiates = 506,
    /// InsufficientStorage - ``507`` status code.
    InsufficientStorage = 507,
    /// LoopDetected - ``508`` status code.
    LoopDetected = 508,
    /// NotExtended - ``510`` status code.
    NotExtended = 510,
    /// NetworkAuthenticationRequired - ``511`` status code.
    NetworkAuthenticationRequired = 511,
}
impl StatusCode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Empty => "Empty",
            Self::Continue => "Continue",
            Self::Ok => "OK",
            Self::Created => "Created",
            Self::Accepted => "Accepted",
            Self::NonAuthoritativeInformation => "NonAuthoritativeInformation",
            Self::NoContent => "NoContent",
            Self::ResetContent => "ResetContent",
            Self::PartialContent => "PartialContent",
            Self::MultiStatus => "MultiStatus",
            Self::AlreadyReported => "AlreadyReported",
            Self::ImUsed => "IMUsed",
            Self::MultipleChoices => "MultipleChoices",
            Self::MovedPermanently => "MovedPermanently",
            Self::Found => "Found",
            Self::SeeOther => "SeeOther",
            Self::NotModified => "NotModified",
            Self::UseProxy => "UseProxy",
            Self::TemporaryRedirect => "TemporaryRedirect",
            Self::PermanentRedirect => "PermanentRedirect",
            Self::BadRequest => "BadRequest",
            Self::Unauthorized => "Unauthorized",
            Self::PaymentRequired => "PaymentRequired",
            Self::Forbidden => "Forbidden",
            Self::NotFound => "NotFound",
            Self::MethodNotAllowed => "MethodNotAllowed",
            Self::NotAcceptable => "NotAcceptable",
            Self::ProxyAuthenticationRequired => "ProxyAuthenticationRequired",
            Self::RequestTimeout => "RequestTimeout",
            Self::Conflict => "Conflict",
            Self::Gone => "Gone",
            Self::LengthRequired => "LengthRequired",
            Self::PreconditionFailed => "PreconditionFailed",
            Self::PayloadTooLarge => "PayloadTooLarge",
            Self::UriTooLong => "URITooLong",
            Self::UnsupportedMediaType => "UnsupportedMediaType",
            Self::RangeNotSatisfiable => "RangeNotSatisfiable",
            Self::ExpectationFailed => "ExpectationFailed",
            Self::MisdirectedRequest => "MisdirectedRequest",
            Self::UnprocessableEntity => "UnprocessableEntity",
            Self::Locked => "Locked",
            Self::FailedDependency => "FailedDependency",
            Self::UpgradeRequired => "UpgradeRequired",
            Self::PreconditionRequired => "PreconditionRequired",
            Self::TooManyRequests => "TooManyRequests",
            Self::RequestHeaderFieldsTooLarge => "RequestHeaderFieldsTooLarge",
            Self::InternalServerError => "InternalServerError",
            Self::NotImplemented => "NotImplemented",
            Self::BadGateway => "BadGateway",
            Self::ServiceUnavailable => "ServiceUnavailable",
            Self::GatewayTimeout => "GatewayTimeout",
            Self::HttpVersionNotSupported => "HTTPVersionNotSupported",
            Self::VariantAlsoNegotiates => "VariantAlsoNegotiates",
            Self::InsufficientStorage => "InsufficientStorage",
            Self::LoopDetected => "LoopDetected",
            Self::NotExtended => "NotExtended",
            Self::NetworkAuthenticationRequired => "NetworkAuthenticationRequired",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "Empty" => Some(Self::Empty),
            "Continue" => Some(Self::Continue),
            "OK" => Some(Self::Ok),
            "Created" => Some(Self::Created),
            "Accepted" => Some(Self::Accepted),
            "NonAuthoritativeInformation" => Some(Self::NonAuthoritativeInformation),
            "NoContent" => Some(Self::NoContent),
            "ResetContent" => Some(Self::ResetContent),
            "PartialContent" => Some(Self::PartialContent),
            "MultiStatus" => Some(Self::MultiStatus),
            "AlreadyReported" => Some(Self::AlreadyReported),
            "IMUsed" => Some(Self::ImUsed),
            "MultipleChoices" => Some(Self::MultipleChoices),
            "MovedPermanently" => Some(Self::MovedPermanently),
            "Found" => Some(Self::Found),
            "SeeOther" => Some(Self::SeeOther),
            "NotModified" => Some(Self::NotModified),
            "UseProxy" => Some(Self::UseProxy),
            "TemporaryRedirect" => Some(Self::TemporaryRedirect),
            "PermanentRedirect" => Some(Self::PermanentRedirect),
            "BadRequest" => Some(Self::BadRequest),
            "Unauthorized" => Some(Self::Unauthorized),
            "PaymentRequired" => Some(Self::PaymentRequired),
            "Forbidden" => Some(Self::Forbidden),
            "NotFound" => Some(Self::NotFound),
            "MethodNotAllowed" => Some(Self::MethodNotAllowed),
            "NotAcceptable" => Some(Self::NotAcceptable),
            "ProxyAuthenticationRequired" => Some(Self::ProxyAuthenticationRequired),
            "RequestTimeout" => Some(Self::RequestTimeout),
            "Conflict" => Some(Self::Conflict),
            "Gone" => Some(Self::Gone),
            "LengthRequired" => Some(Self::LengthRequired),
            "PreconditionFailed" => Some(Self::PreconditionFailed),
            "PayloadTooLarge" => Some(Self::PayloadTooLarge),
            "URITooLong" => Some(Self::UriTooLong),
            "UnsupportedMediaType" => Some(Self::UnsupportedMediaType),
            "RangeNotSatisfiable" => Some(Self::RangeNotSatisfiable),
            "ExpectationFailed" => Some(Self::ExpectationFailed),
            "MisdirectedRequest" => Some(Self::MisdirectedRequest),
            "UnprocessableEntity" => Some(Self::UnprocessableEntity),
            "Locked" => Some(Self::Locked),
            "FailedDependency" => Some(Self::FailedDependency),
            "UpgradeRequired" => Some(Self::UpgradeRequired),
            "PreconditionRequired" => Some(Self::PreconditionRequired),
            "TooManyRequests" => Some(Self::TooManyRequests),
            "RequestHeaderFieldsTooLarge" => Some(Self::RequestHeaderFieldsTooLarge),
            "InternalServerError" => Some(Self::InternalServerError),
            "NotImplemented" => Some(Self::NotImplemented),
            "BadGateway" => Some(Self::BadGateway),
            "ServiceUnavailable" => Some(Self::ServiceUnavailable),
            "GatewayTimeout" => Some(Self::GatewayTimeout),
            "HTTPVersionNotSupported" => Some(Self::HttpVersionNotSupported),
            "VariantAlsoNegotiates" => Some(Self::VariantAlsoNegotiates),
            "InsufficientStorage" => Some(Self::InsufficientStorage),
            "LoopDetected" => Some(Self::LoopDetected),
            "NotExtended" => Some(Self::NotExtended),
            "NetworkAuthenticationRequired" => Some(Self::NetworkAuthenticationRequired),
            _ => None,
        }
    }
}
