1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that represents the service discovery information for a service mesh.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MeshServiceDiscovery {
    /// <p>The IP version to use to control traffic within the mesh.</p>
    pub ip_preference: ::std::option::Option<crate::types::IpPreference>,
}
impl MeshServiceDiscovery {
    /// <p>The IP version to use to control traffic within the mesh.</p>
    pub fn ip_preference(&self) -> ::std::option::Option<&crate::types::IpPreference> {
        self.ip_preference.as_ref()
    }
}
impl MeshServiceDiscovery {
    /// Creates a new builder-style object to manufacture [`MeshServiceDiscovery`](crate::types::MeshServiceDiscovery).
    pub fn builder() -> crate::types::builders::MeshServiceDiscoveryBuilder {
        crate::types::builders::MeshServiceDiscoveryBuilder::default()
    }
}

/// A builder for [`MeshServiceDiscovery`](crate::types::MeshServiceDiscovery).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MeshServiceDiscoveryBuilder {
    pub(crate) ip_preference: ::std::option::Option<crate::types::IpPreference>,
}
impl MeshServiceDiscoveryBuilder {
    /// <p>The IP version to use to control traffic within the mesh.</p>
    pub fn ip_preference(mut self, input: crate::types::IpPreference) -> Self {
        self.ip_preference = ::std::option::Option::Some(input);
        self
    }
    /// <p>The IP version to use to control traffic within the mesh.</p>
    pub fn set_ip_preference(mut self, input: ::std::option::Option<crate::types::IpPreference>) -> Self {
        self.ip_preference = input;
        self
    }
    /// <p>The IP version to use to control traffic within the mesh.</p>
    pub fn get_ip_preference(&self) -> &::std::option::Option<crate::types::IpPreference> {
        &self.ip_preference
    }
    /// Consumes the builder and constructs a [`MeshServiceDiscovery`](crate::types::MeshServiceDiscovery).
    pub fn build(self) -> crate::types::MeshServiceDiscovery {
        crate::types::MeshServiceDiscovery {
            ip_preference: self.ip_preference,
        }
    }
}