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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a VPC endpoint connection to a service.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VpcEndpointConnection {
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub service_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the VPC endpoint.</p>
    pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub vpc_endpoint_owner: ::std::option::Option<::std::string::String>,
    /// <p>The state of the VPC endpoint.</p>
    pub vpc_endpoint_state: ::std::option::Option<crate::types::State>,
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The DNS entries for the VPC endpoint.</p>
    pub dns_entries: ::std::option::Option<::std::vec::Vec<crate::types::DnsEntry>>,
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    pub network_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub gateway_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The IP address type for the endpoint.</p>
    pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
    /// <p>The ID of the VPC endpoint connection.</p>
    pub vpc_endpoint_connection_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl VpcEndpointConnection {
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub fn service_id(&self) -> ::std::option::Option<&str> {
        self.service_id.as_deref()
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
        self.vpc_endpoint_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub fn vpc_endpoint_owner(&self) -> ::std::option::Option<&str> {
        self.vpc_endpoint_owner.as_deref()
    }
    /// <p>The state of the VPC endpoint.</p>
    pub fn vpc_endpoint_state(&self) -> ::std::option::Option<&crate::types::State> {
        self.vpc_endpoint_state.as_ref()
    }
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub fn creation_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_timestamp.as_ref()
    }
    /// <p>The DNS entries for the VPC endpoint.</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 `.dns_entries.is_none()`.
    pub fn dns_entries(&self) -> &[crate::types::DnsEntry] {
        self.dns_entries.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</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 `.network_load_balancer_arns.is_none()`.
    pub fn network_load_balancer_arns(&self) -> &[::std::string::String] {
        self.network_load_balancer_arns.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</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 `.gateway_load_balancer_arns.is_none()`.
    pub fn gateway_load_balancer_arns(&self) -> &[::std::string::String] {
        self.gateway_load_balancer_arns.as_deref().unwrap_or_default()
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
        self.ip_address_type.as_ref()
    }
    /// <p>The ID of the VPC endpoint connection.</p>
    pub fn vpc_endpoint_connection_id(&self) -> ::std::option::Option<&str> {
        self.vpc_endpoint_connection_id.as_deref()
    }
    /// <p>The tags.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl VpcEndpointConnection {
    /// Creates a new builder-style object to manufacture [`VpcEndpointConnection`](crate::types::VpcEndpointConnection).
    pub fn builder() -> crate::types::builders::VpcEndpointConnectionBuilder {
        crate::types::builders::VpcEndpointConnectionBuilder::default()
    }
}

/// A builder for [`VpcEndpointConnection`](crate::types::VpcEndpointConnection).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VpcEndpointConnectionBuilder {
    pub(crate) service_id: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_endpoint_id: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_endpoint_owner: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_endpoint_state: ::std::option::Option<crate::types::State>,
    pub(crate) creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) dns_entries: ::std::option::Option<::std::vec::Vec<crate::types::DnsEntry>>,
    pub(crate) network_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) gateway_load_balancer_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
    pub(crate) vpc_endpoint_connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl VpcEndpointConnectionBuilder {
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_id = input;
        self
    }
    /// <p>The ID of the service to which the endpoint is connected.</p>
    pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_id
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_endpoint_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_endpoint_id = input;
        self
    }
    /// <p>The ID of the VPC endpoint.</p>
    pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_endpoint_id
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub fn vpc_endpoint_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_endpoint_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub fn set_vpc_endpoint_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_endpoint_owner = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the VPC endpoint.</p>
    pub fn get_vpc_endpoint_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_endpoint_owner
    }
    /// <p>The state of the VPC endpoint.</p>
    pub fn vpc_endpoint_state(mut self, input: crate::types::State) -> Self {
        self.vpc_endpoint_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the VPC endpoint.</p>
    pub fn set_vpc_endpoint_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
        self.vpc_endpoint_state = input;
        self
    }
    /// <p>The state of the VPC endpoint.</p>
    pub fn get_vpc_endpoint_state(&self) -> &::std::option::Option<crate::types::State> {
        &self.vpc_endpoint_state
    }
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub fn creation_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_timestamp = input;
        self
    }
    /// <p>The date and time that the VPC endpoint was created.</p>
    pub fn get_creation_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_timestamp
    }
    /// Appends an item to `dns_entries`.
    ///
    /// To override the contents of this collection use [`set_dns_entries`](Self::set_dns_entries).
    ///
    /// <p>The DNS entries for the VPC endpoint.</p>
    pub fn dns_entries(mut self, input: crate::types::DnsEntry) -> Self {
        let mut v = self.dns_entries.unwrap_or_default();
        v.push(input);
        self.dns_entries = ::std::option::Option::Some(v);
        self
    }
    /// <p>The DNS entries for the VPC endpoint.</p>
    pub fn set_dns_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DnsEntry>>) -> Self {
        self.dns_entries = input;
        self
    }
    /// <p>The DNS entries for the VPC endpoint.</p>
    pub fn get_dns_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DnsEntry>> {
        &self.dns_entries
    }
    /// Appends an item to `network_load_balancer_arns`.
    ///
    /// To override the contents of this collection use [`set_network_load_balancer_arns`](Self::set_network_load_balancer_arns).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    pub fn network_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.network_load_balancer_arns.unwrap_or_default();
        v.push(input.into());
        self.network_load_balancer_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    pub fn set_network_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.network_load_balancer_arns = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the network load balancers for the service.</p>
    pub fn get_network_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.network_load_balancer_arns
    }
    /// Appends an item to `gateway_load_balancer_arns`.
    ///
    /// To override the contents of this collection use [`set_gateway_load_balancer_arns`](Self::set_gateway_load_balancer_arns).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub fn gateway_load_balancer_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.gateway_load_balancer_arns.unwrap_or_default();
        v.push(input.into());
        self.gateway_load_balancer_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub fn set_gateway_load_balancer_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.gateway_load_balancer_arns = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.</p>
    pub fn get_gateway_load_balancer_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.gateway_load_balancer_arns
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
        self.ip_address_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
        self.ip_address_type = input;
        self
    }
    /// <p>The IP address type for the endpoint.</p>
    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
        &self.ip_address_type
    }
    /// <p>The ID of the VPC endpoint connection.</p>
    pub fn vpc_endpoint_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_endpoint_connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC endpoint connection.</p>
    pub fn set_vpc_endpoint_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_endpoint_connection_id = input;
        self
    }
    /// <p>The ID of the VPC endpoint connection.</p>
    pub fn get_vpc_endpoint_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_endpoint_connection_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
    }
    /// Consumes the builder and constructs a [`VpcEndpointConnection`](crate::types::VpcEndpointConnection).
    pub fn build(self) -> crate::types::VpcEndpointConnection {
        crate::types::VpcEndpointConnection {
            service_id: self.service_id,
            vpc_endpoint_id: self.vpc_endpoint_id,
            vpc_endpoint_owner: self.vpc_endpoint_owner,
            vpc_endpoint_state: self.vpc_endpoint_state,
            creation_timestamp: self.creation_timestamp,
            dns_entries: self.dns_entries,
            network_load_balancer_arns: self.network_load_balancer_arns,
            gateway_load_balancer_arns: self.gateway_load_balancer_arns,
            ip_address_type: self.ip_address_type,
            vpc_endpoint_connection_id: self.vpc_endpoint_connection_id,
            tags: self.tags,
        }
    }
}