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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a customer-owned address pool.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CoipPool {
    /// <p>The ID of the address pool.</p>
    pub pool_id: ::std::option::Option<::std::string::String>,
    /// <p>The address ranges of the address pool.</p>
    pub pool_cidrs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The ID of the local gateway route table.</p>
    pub local_gateway_route_table_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The ARN of the address pool.</p>
    pub pool_arn: ::std::option::Option<::std::string::String>,
}
impl CoipPool {
    /// <p>The ID of the address pool.</p>
    pub fn pool_id(&self) -> ::std::option::Option<&str> {
        self.pool_id.as_deref()
    }
    /// <p>The address ranges of the address pool.</p>
    pub fn pool_cidrs(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.pool_cidrs.as_deref()
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(&self) -> ::std::option::Option<&str> {
        self.local_gateway_route_table_id.as_deref()
    }
    /// <p>The tags.</p>
    pub fn tags(&self) -> ::std::option::Option<&[crate::types::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ARN of the address pool.</p>
    pub fn pool_arn(&self) -> ::std::option::Option<&str> {
        self.pool_arn.as_deref()
    }
}
impl CoipPool {
    /// Creates a new builder-style object to manufacture [`CoipPool`](crate::types::CoipPool).
    pub fn builder() -> crate::types::builders::CoipPoolBuilder {
        crate::types::builders::CoipPoolBuilder::default()
    }
}

/// A builder for [`CoipPool`](crate::types::CoipPool).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CoipPoolBuilder {
    pub(crate) pool_id: ::std::option::Option<::std::string::String>,
    pub(crate) pool_cidrs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) local_gateway_route_table_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) pool_arn: ::std::option::Option<::std::string::String>,
}
impl CoipPoolBuilder {
    /// <p>The ID of the address pool.</p>
    pub fn pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pool_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the address pool.</p>
    pub fn set_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pool_id = input;
        self
    }
    /// <p>The ID of the address pool.</p>
    pub fn get_pool_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pool_id
    }
    /// Appends an item to `pool_cidrs`.
    ///
    /// To override the contents of this collection use [`set_pool_cidrs`](Self::set_pool_cidrs).
    ///
    /// <p>The address ranges of the address pool.</p>
    pub fn pool_cidrs(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.pool_cidrs.unwrap_or_default();
        v.push(input.into());
        self.pool_cidrs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The address ranges of the address pool.</p>
    pub fn set_pool_cidrs(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.pool_cidrs = input;
        self
    }
    /// <p>The address ranges of the address pool.</p>
    pub fn get_pool_cidrs(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.pool_cidrs
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn local_gateway_route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.local_gateway_route_table_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn set_local_gateway_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.local_gateway_route_table_id = input;
        self
    }
    /// <p>The ID of the local gateway route table.</p>
    pub fn get_local_gateway_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.local_gateway_route_table_id
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The tags.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The ARN of the address pool.</p>
    pub fn pool_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pool_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the address pool.</p>
    pub fn set_pool_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pool_arn = input;
        self
    }
    /// <p>The ARN of the address pool.</p>
    pub fn get_pool_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.pool_arn
    }
    /// Consumes the builder and constructs a [`CoipPool`](crate::types::CoipPool).
    pub fn build(self) -> crate::types::CoipPool {
        crate::types::CoipPool {
            pool_id: self.pool_id,
            pool_cidrs: self.pool_cidrs,
            local_gateway_route_table_id: self.local_gateway_route_table_id,
            tags: self.tags,
            pool_arn: self.pool_arn,
        }
    }
}