aws_sdk_quicksight/types/
_vpc_connection_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The summary metadata that describes a VPC connection.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct VpcConnectionSummary {
7    /// <p>The ID of the VPC connection that you're creating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.</p>
8    pub vpc_connection_id: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the VPC connection.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>The display name for the VPC connection.</p>
12    pub name: ::std::option::Option<::std::string::String>,
13    /// <p>The Amazon EC2 VPC ID associated with the VPC connection.</p>
14    pub vpc_id: ::std::option::Option<::std::string::String>,
15    /// <p>The Amazon EC2 security group IDs associated with the VPC connection.</p>
16    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
17    /// <p>A list of IP addresses of DNS resolver endpoints for the VPC connection.</p>
18    pub dns_resolvers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
19    /// <p>The status of the VPC connection.</p>
20    pub status: ::std::option::Option<crate::types::VpcConnectionResourceStatus>,
21    /// <p>The availability status of the VPC connection.</p>
22    pub availability_status: ::std::option::Option<crate::types::VpcConnectionAvailabilityStatus>,
23    /// <p>A list of network interfaces.</p>
24    pub network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>,
25    /// <p>The ARN of the IAM role associated with the VPC connection.</p>
26    pub role_arn: ::std::option::Option<::std::string::String>,
27    /// <p>The time that the VPC connection was created.</p>
28    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
29    /// <p>The time that the VPC connection was last updated.</p>
30    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
31}
32impl VpcConnectionSummary {
33    /// <p>The ID of the VPC connection that you're creating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.</p>
34    pub fn vpc_connection_id(&self) -> ::std::option::Option<&str> {
35        self.vpc_connection_id.as_deref()
36    }
37    /// <p>The Amazon Resource Name (ARN) of the VPC connection.</p>
38    pub fn arn(&self) -> ::std::option::Option<&str> {
39        self.arn.as_deref()
40    }
41    /// <p>The display name for the VPC connection.</p>
42    pub fn name(&self) -> ::std::option::Option<&str> {
43        self.name.as_deref()
44    }
45    /// <p>The Amazon EC2 VPC ID associated with the VPC connection.</p>
46    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
47        self.vpc_id.as_deref()
48    }
49    /// <p>The Amazon EC2 security group IDs associated with the VPC connection.</p>
50    ///
51    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
52    pub fn security_group_ids(&self) -> &[::std::string::String] {
53        self.security_group_ids.as_deref().unwrap_or_default()
54    }
55    /// <p>A list of IP addresses of DNS resolver endpoints for the VPC connection.</p>
56    ///
57    /// 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_resolvers.is_none()`.
58    pub fn dns_resolvers(&self) -> &[::std::string::String] {
59        self.dns_resolvers.as_deref().unwrap_or_default()
60    }
61    /// <p>The status of the VPC connection.</p>
62    pub fn status(&self) -> ::std::option::Option<&crate::types::VpcConnectionResourceStatus> {
63        self.status.as_ref()
64    }
65    /// <p>The availability status of the VPC connection.</p>
66    pub fn availability_status(&self) -> ::std::option::Option<&crate::types::VpcConnectionAvailabilityStatus> {
67        self.availability_status.as_ref()
68    }
69    /// <p>A list of network interfaces.</p>
70    ///
71    /// 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_interfaces.is_none()`.
72    pub fn network_interfaces(&self) -> &[crate::types::NetworkInterface] {
73        self.network_interfaces.as_deref().unwrap_or_default()
74    }
75    /// <p>The ARN of the IAM role associated with the VPC connection.</p>
76    pub fn role_arn(&self) -> ::std::option::Option<&str> {
77        self.role_arn.as_deref()
78    }
79    /// <p>The time that the VPC connection was created.</p>
80    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
81        self.created_time.as_ref()
82    }
83    /// <p>The time that the VPC connection was last updated.</p>
84    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
85        self.last_updated_time.as_ref()
86    }
87}
88impl VpcConnectionSummary {
89    /// Creates a new builder-style object to manufacture [`VpcConnectionSummary`](crate::types::VpcConnectionSummary).
90    pub fn builder() -> crate::types::builders::VpcConnectionSummaryBuilder {
91        crate::types::builders::VpcConnectionSummaryBuilder::default()
92    }
93}
94
95/// A builder for [`VpcConnectionSummary`](crate::types::VpcConnectionSummary).
96#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
97#[non_exhaustive]
98pub struct VpcConnectionSummaryBuilder {
99    pub(crate) vpc_connection_id: ::std::option::Option<::std::string::String>,
100    pub(crate) arn: ::std::option::Option<::std::string::String>,
101    pub(crate) name: ::std::option::Option<::std::string::String>,
102    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
103    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
104    pub(crate) dns_resolvers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
105    pub(crate) status: ::std::option::Option<crate::types::VpcConnectionResourceStatus>,
106    pub(crate) availability_status: ::std::option::Option<crate::types::VpcConnectionAvailabilityStatus>,
107    pub(crate) network_interfaces: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>,
108    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
109    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
110    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
111}
112impl VpcConnectionSummaryBuilder {
113    /// <p>The ID of the VPC connection that you're creating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.</p>
114    pub fn vpc_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.vpc_connection_id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The ID of the VPC connection that you're creating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.</p>
119    pub fn set_vpc_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.vpc_connection_id = input;
121        self
122    }
123    /// <p>The ID of the VPC connection that you're creating. This ID is a unique identifier for each Amazon Web Services Region in an Amazon Web Services account.</p>
124    pub fn get_vpc_connection_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.vpc_connection_id
126    }
127    /// <p>The Amazon Resource Name (ARN) of the VPC connection.</p>
128    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.arn = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The Amazon Resource Name (ARN) of the VPC connection.</p>
133    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.arn = input;
135        self
136    }
137    /// <p>The Amazon Resource Name (ARN) of the VPC connection.</p>
138    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
139        &self.arn
140    }
141    /// <p>The display name for the VPC connection.</p>
142    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The display name for the VPC connection.</p>
147    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.name = input;
149        self
150    }
151    /// <p>The display name for the VPC connection.</p>
152    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.name
154    }
155    /// <p>The Amazon EC2 VPC ID associated with the VPC connection.</p>
156    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.vpc_id = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The Amazon EC2 VPC ID associated with the VPC connection.</p>
161    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.vpc_id = input;
163        self
164    }
165    /// <p>The Amazon EC2 VPC ID associated with the VPC connection.</p>
166    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.vpc_id
168    }
169    /// Appends an item to `security_group_ids`.
170    ///
171    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
172    ///
173    /// <p>The Amazon EC2 security group IDs associated with the VPC connection.</p>
174    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        let mut v = self.security_group_ids.unwrap_or_default();
176        v.push(input.into());
177        self.security_group_ids = ::std::option::Option::Some(v);
178        self
179    }
180    /// <p>The Amazon EC2 security group IDs associated with the VPC connection.</p>
181    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
182        self.security_group_ids = input;
183        self
184    }
185    /// <p>The Amazon EC2 security group IDs associated with the VPC connection.</p>
186    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
187        &self.security_group_ids
188    }
189    /// Appends an item to `dns_resolvers`.
190    ///
191    /// To override the contents of this collection use [`set_dns_resolvers`](Self::set_dns_resolvers).
192    ///
193    /// <p>A list of IP addresses of DNS resolver endpoints for the VPC connection.</p>
194    pub fn dns_resolvers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        let mut v = self.dns_resolvers.unwrap_or_default();
196        v.push(input.into());
197        self.dns_resolvers = ::std::option::Option::Some(v);
198        self
199    }
200    /// <p>A list of IP addresses of DNS resolver endpoints for the VPC connection.</p>
201    pub fn set_dns_resolvers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
202        self.dns_resolvers = input;
203        self
204    }
205    /// <p>A list of IP addresses of DNS resolver endpoints for the VPC connection.</p>
206    pub fn get_dns_resolvers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
207        &self.dns_resolvers
208    }
209    /// <p>The status of the VPC connection.</p>
210    pub fn status(mut self, input: crate::types::VpcConnectionResourceStatus) -> Self {
211        self.status = ::std::option::Option::Some(input);
212        self
213    }
214    /// <p>The status of the VPC connection.</p>
215    pub fn set_status(mut self, input: ::std::option::Option<crate::types::VpcConnectionResourceStatus>) -> Self {
216        self.status = input;
217        self
218    }
219    /// <p>The status of the VPC connection.</p>
220    pub fn get_status(&self) -> &::std::option::Option<crate::types::VpcConnectionResourceStatus> {
221        &self.status
222    }
223    /// <p>The availability status of the VPC connection.</p>
224    pub fn availability_status(mut self, input: crate::types::VpcConnectionAvailabilityStatus) -> Self {
225        self.availability_status = ::std::option::Option::Some(input);
226        self
227    }
228    /// <p>The availability status of the VPC connection.</p>
229    pub fn set_availability_status(mut self, input: ::std::option::Option<crate::types::VpcConnectionAvailabilityStatus>) -> Self {
230        self.availability_status = input;
231        self
232    }
233    /// <p>The availability status of the VPC connection.</p>
234    pub fn get_availability_status(&self) -> &::std::option::Option<crate::types::VpcConnectionAvailabilityStatus> {
235        &self.availability_status
236    }
237    /// Appends an item to `network_interfaces`.
238    ///
239    /// To override the contents of this collection use [`set_network_interfaces`](Self::set_network_interfaces).
240    ///
241    /// <p>A list of network interfaces.</p>
242    pub fn network_interfaces(mut self, input: crate::types::NetworkInterface) -> Self {
243        let mut v = self.network_interfaces.unwrap_or_default();
244        v.push(input);
245        self.network_interfaces = ::std::option::Option::Some(v);
246        self
247    }
248    /// <p>A list of network interfaces.</p>
249    pub fn set_network_interfaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>>) -> Self {
250        self.network_interfaces = input;
251        self
252    }
253    /// <p>A list of network interfaces.</p>
254    pub fn get_network_interfaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NetworkInterface>> {
255        &self.network_interfaces
256    }
257    /// <p>The ARN of the IAM role associated with the VPC connection.</p>
258    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259        self.role_arn = ::std::option::Option::Some(input.into());
260        self
261    }
262    /// <p>The ARN of the IAM role associated with the VPC connection.</p>
263    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
264        self.role_arn = input;
265        self
266    }
267    /// <p>The ARN of the IAM role associated with the VPC connection.</p>
268    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
269        &self.role_arn
270    }
271    /// <p>The time that the VPC connection was created.</p>
272    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
273        self.created_time = ::std::option::Option::Some(input);
274        self
275    }
276    /// <p>The time that the VPC connection was created.</p>
277    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
278        self.created_time = input;
279        self
280    }
281    /// <p>The time that the VPC connection was created.</p>
282    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
283        &self.created_time
284    }
285    /// <p>The time that the VPC connection was last updated.</p>
286    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
287        self.last_updated_time = ::std::option::Option::Some(input);
288        self
289    }
290    /// <p>The time that the VPC connection was last updated.</p>
291    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
292        self.last_updated_time = input;
293        self
294    }
295    /// <p>The time that the VPC connection was last updated.</p>
296    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
297        &self.last_updated_time
298    }
299    /// Consumes the builder and constructs a [`VpcConnectionSummary`](crate::types::VpcConnectionSummary).
300    pub fn build(self) -> crate::types::VpcConnectionSummary {
301        crate::types::VpcConnectionSummary {
302            vpc_connection_id: self.vpc_connection_id,
303            arn: self.arn,
304            name: self.name,
305            vpc_id: self.vpc_id,
306            security_group_ids: self.security_group_ids,
307            dns_resolvers: self.dns_resolvers,
308            status: self.status,
309            availability_status: self.availability_status,
310            network_interfaces: self.network_interfaces,
311            role_arn: self.role_arn,
312            created_time: self.created_time,
313            last_updated_time: self.last_updated_time,
314        }
315    }
316}