envoy_types/generated/
envoy.extensions.clusters.common.dns.v3.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3#[repr(i32)]
4pub enum DnsLookupFamily {
5    Unspecified = 0,
6    Auto = 1,
7    V4Only = 2,
8    V6Only = 3,
9    V4Preferred = 4,
10    All = 5,
11}
12impl DnsLookupFamily {
13    /// String value of the enum field names used in the ProtoBuf definition.
14    ///
15    /// The values are not transformed in any way and thus are considered stable
16    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
17    pub fn as_str_name(&self) -> &'static str {
18        match self {
19            Self::Unspecified => "UNSPECIFIED",
20            Self::Auto => "AUTO",
21            Self::V4Only => "V4_ONLY",
22            Self::V6Only => "V6_ONLY",
23            Self::V4Preferred => "V4_PREFERRED",
24            Self::All => "ALL",
25        }
26    }
27    /// Creates an enum from field names used in the ProtoBuf definition.
28    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
29        match value {
30            "UNSPECIFIED" => Some(Self::Unspecified),
31            "AUTO" => Some(Self::Auto),
32            "V4_ONLY" => Some(Self::V4Only),
33            "V6_ONLY" => Some(Self::V6Only),
34            "V4_PREFERRED" => Some(Self::V4Preferred),
35            "ALL" => Some(Self::All),
36            _ => None,
37        }
38    }
39}