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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SetSubnetsOutput {
    /// <p>Information about the subnets.</p>
    pub availability_zones: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>,
    /// <p>\[Application Load Balancers\] The IP address type.</p>
    /// <p>\[Network Load Balancers\] The IP address type.</p>
    /// <p>\[Gateway Load Balancers\] The IP address type.</p>
    pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
    _request_id: Option<String>,
}
impl SetSubnetsOutput {
    /// <p>Information about the subnets.</p>
    ///
    /// 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()`.
    pub fn availability_zones(&self) -> &[crate::types::AvailabilityZone] {
        self.availability_zones.as_deref().unwrap_or_default()
    }
    /// <p>\[Application Load Balancers\] The IP address type.</p>
    /// <p>\[Network Load Balancers\] The IP address type.</p>
    /// <p>\[Gateway Load Balancers\] The IP address type.</p>
    pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
        self.ip_address_type.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for SetSubnetsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl SetSubnetsOutput {
    /// Creates a new builder-style object to manufacture [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
    pub fn builder() -> crate::operation::set_subnets::builders::SetSubnetsOutputBuilder {
        crate::operation::set_subnets::builders::SetSubnetsOutputBuilder::default()
    }
}

/// A builder for [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SetSubnetsOutputBuilder {
    pub(crate) availability_zones: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>,
    pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
    _request_id: Option<String>,
}
impl SetSubnetsOutputBuilder {
    /// Appends an item to `availability_zones`.
    ///
    /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
    ///
    /// <p>Information about the subnets.</p>
    pub fn availability_zones(mut self, input: crate::types::AvailabilityZone) -> Self {
        let mut v = self.availability_zones.unwrap_or_default();
        v.push(input);
        self.availability_zones = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the subnets.</p>
    pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>>) -> Self {
        self.availability_zones = input;
        self
    }
    /// <p>Information about the subnets.</p>
    pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AvailabilityZone>> {
        &self.availability_zones
    }
    /// <p>\[Application Load Balancers\] The IP address type.</p>
    /// <p>\[Network Load Balancers\] The IP address type.</p>
    /// <p>\[Gateway Load Balancers\] The IP address type.</p>
    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
        self.ip_address_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>\[Application Load Balancers\] The IP address type.</p>
    /// <p>\[Network Load Balancers\] The IP address type.</p>
    /// <p>\[Gateway Load Balancers\] The IP address type.</p>
    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
        self.ip_address_type = input;
        self
    }
    /// <p>\[Application Load Balancers\] The IP address type.</p>
    /// <p>\[Network Load Balancers\] The IP address type.</p>
    /// <p>\[Gateway Load Balancers\] The IP address type.</p>
    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
        &self.ip_address_type
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`SetSubnetsOutput`](crate::operation::set_subnets::SetSubnetsOutput).
    pub fn build(self) -> crate::operation::set_subnets::SetSubnetsOutput {
        crate::operation::set_subnets::SetSubnetsOutput {
            availability_zones: self.availability_zones,
            ip_address_type: self.ip_address_type,
            _request_id: self._request_id,
        }
    }
}