aws_sdk_elasticloadbalancingv2/operation/set_subnets/
_set_subnets_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SetSubnetsOutput {
6    /// <p>Information about the subnets.</p>
7    pub availability_zones: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>,
8    /// <p>The IP address type.</p>
9    pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
10    /// <p>\[Network Load Balancers\] Indicates whether to use an IPv6 prefix from each subnet for source NAT.</p>
11    pub enable_prefix_for_ipv6_source_nat: ::std::option::Option<crate::types::EnablePrefixForIpv6SourceNatEnum>,
12    _request_id: Option<String>,
13}
14impl SetSubnetsOutput {
15    /// <p>Information about the subnets.</p>
16    ///
17    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.availability_zones.is_none()`.
18    pub fn availability_zones(&self) -> &[crate::types::AvailabilityZone] {
19        self.availability_zones.as_deref().unwrap_or_default()
20    }
21    /// <p>The IP address type.</p>
22    pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
23        self.ip_address_type.as_ref()
24    }
25    /// <p>\[Network Load Balancers\] Indicates whether to use an IPv6 prefix from each subnet for source NAT.</p>
26    pub fn enable_prefix_for_ipv6_source_nat(&self) -> ::std::option::Option<&crate::types::EnablePrefixForIpv6SourceNatEnum> {
27        self.enable_prefix_for_ipv6_source_nat.as_ref()
28    }
29}
30impl ::aws_types::request_id::RequestId for SetSubnetsOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl SetSubnetsOutput {
36    /// Creates a new builder-style object to manufacture [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
37    pub fn builder() -> crate::operation::set_subnets::builders::SetSubnetsOutputBuilder {
38        crate::operation::set_subnets::builders::SetSubnetsOutputBuilder::default()
39    }
40}
41
42/// A builder for [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SetSubnetsOutputBuilder {
46    pub(crate) availability_zones: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>,
47    pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
48    pub(crate) enable_prefix_for_ipv6_source_nat: ::std::option::Option<crate::types::EnablePrefixForIpv6SourceNatEnum>,
49    _request_id: Option<String>,
50}
51impl SetSubnetsOutputBuilder {
52    /// Appends an item to `availability_zones`.
53    ///
54    /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
55    ///
56    /// <p>Information about the subnets.</p>
57    pub fn availability_zones(mut self, input: crate::types::AvailabilityZone) -> Self {
58        let mut v = self.availability_zones.unwrap_or_default();
59        v.push(input);
60        self.availability_zones = ::std::option::Option::Some(v);
61        self
62    }
63    /// <p>Information about the subnets.</p>
64    pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>) -> Self {
65        self.availability_zones = input;
66        self
67    }
68    /// <p>Information about the subnets.</p>
69    pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>> {
70        &self.availability_zones
71    }
72    /// <p>The IP address type.</p>
73    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
74        self.ip_address_type = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The IP address type.</p>
78    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
79        self.ip_address_type = input;
80        self
81    }
82    /// <p>The IP address type.</p>
83    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
84        &self.ip_address_type
85    }
86    /// <p>\[Network Load Balancers\] Indicates whether to use an IPv6 prefix from each subnet for source NAT.</p>
87    pub fn enable_prefix_for_ipv6_source_nat(mut self, input: crate::types::EnablePrefixForIpv6SourceNatEnum) -> Self {
88        self.enable_prefix_for_ipv6_source_nat = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>\[Network Load Balancers\] Indicates whether to use an IPv6 prefix from each subnet for source NAT.</p>
92    pub fn set_enable_prefix_for_ipv6_source_nat(mut self, input: ::std::option::Option<crate::types::EnablePrefixForIpv6SourceNatEnum>) -> Self {
93        self.enable_prefix_for_ipv6_source_nat = input;
94        self
95    }
96    /// <p>\[Network Load Balancers\] Indicates whether to use an IPv6 prefix from each subnet for source NAT.</p>
97    pub fn get_enable_prefix_for_ipv6_source_nat(&self) -> &::std::option::Option<crate::types::EnablePrefixForIpv6SourceNatEnum> {
98        &self.enable_prefix_for_ipv6_source_nat
99    }
100    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
101        self._request_id = Some(request_id.into());
102        self
103    }
104
105    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
106        self._request_id = request_id;
107        self
108    }
109    /// Consumes the builder and constructs a [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
110    pub fn build(self) -> crate::operation::set_subnets::SetSubnetsOutput {
111        crate::operation::set_subnets::SetSubnetsOutput {
112            availability_zones: self.availability_zones,
113            ip_address_type: self.ip_address_type,
114            enable_prefix_for_ipv6_source_nat: self.enable_prefix_for_ipv6_source_nat,
115            _request_id: self._request_id,
116        }
117    }
118}