envoy_types/generated/
envoy.extensions.clusters.common.dns.v3.rs1#[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 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 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}