aws_sdk_connect/types/
_quick_connect.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains information about a quick connect.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct QuickConnect {
7    /// <p>The Amazon Resource Name (ARN) of the quick connect.</p>
8    pub quick_connect_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The identifier for the quick connect.</p>
10    pub quick_connect_id: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the quick connect.</p>
12    pub name: ::std::option::Option<::std::string::String>,
13    /// <p>The description.</p>
14    pub description: ::std::option::Option<::std::string::String>,
15    /// <p>Contains information about the quick connect.</p>
16    pub quick_connect_config: ::std::option::Option<crate::types::QuickConnectConfig>,
17    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
18    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
19    /// <p>The timestamp when this resource was last modified.</p>
20    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
22    pub last_modified_region: ::std::option::Option<::std::string::String>,
23}
24impl QuickConnect {
25    /// <p>The Amazon Resource Name (ARN) of the quick connect.</p>
26    pub fn quick_connect_arn(&self) -> ::std::option::Option<&str> {
27        self.quick_connect_arn.as_deref()
28    }
29    /// <p>The identifier for the quick connect.</p>
30    pub fn quick_connect_id(&self) -> ::std::option::Option<&str> {
31        self.quick_connect_id.as_deref()
32    }
33    /// <p>The name of the quick connect.</p>
34    pub fn name(&self) -> ::std::option::Option<&str> {
35        self.name.as_deref()
36    }
37    /// <p>The description.</p>
38    pub fn description(&self) -> ::std::option::Option<&str> {
39        self.description.as_deref()
40    }
41    /// <p>Contains information about the quick connect.</p>
42    pub fn quick_connect_config(&self) -> ::std::option::Option<&crate::types::QuickConnectConfig> {
43        self.quick_connect_config.as_ref()
44    }
45    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
46    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
47        self.tags.as_ref()
48    }
49    /// <p>The timestamp when this resource was last modified.</p>
50    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.last_modified_time.as_ref()
52    }
53    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
54    pub fn last_modified_region(&self) -> ::std::option::Option<&str> {
55        self.last_modified_region.as_deref()
56    }
57}
58impl QuickConnect {
59    /// Creates a new builder-style object to manufacture [`QuickConnect`](crate::types::QuickConnect).
60    pub fn builder() -> crate::types::builders::QuickConnectBuilder {
61        crate::types::builders::QuickConnectBuilder::default()
62    }
63}
64
65/// A builder for [`QuickConnect`](crate::types::QuickConnect).
66#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct QuickConnectBuilder {
69    pub(crate) quick_connect_arn: ::std::option::Option<::std::string::String>,
70    pub(crate) quick_connect_id: ::std::option::Option<::std::string::String>,
71    pub(crate) name: ::std::option::Option<::std::string::String>,
72    pub(crate) description: ::std::option::Option<::std::string::String>,
73    pub(crate) quick_connect_config: ::std::option::Option<crate::types::QuickConnectConfig>,
74    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
75    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
76    pub(crate) last_modified_region: ::std::option::Option<::std::string::String>,
77}
78impl QuickConnectBuilder {
79    /// <p>The Amazon Resource Name (ARN) of the quick connect.</p>
80    pub fn quick_connect_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.quick_connect_arn = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The Amazon Resource Name (ARN) of the quick connect.</p>
85    pub fn set_quick_connect_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.quick_connect_arn = input;
87        self
88    }
89    /// <p>The Amazon Resource Name (ARN) of the quick connect.</p>
90    pub fn get_quick_connect_arn(&self) -> &::std::option::Option<::std::string::String> {
91        &self.quick_connect_arn
92    }
93    /// <p>The identifier for the quick connect.</p>
94    pub fn quick_connect_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.quick_connect_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The identifier for the quick connect.</p>
99    pub fn set_quick_connect_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.quick_connect_id = input;
101        self
102    }
103    /// <p>The identifier for the quick connect.</p>
104    pub fn get_quick_connect_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.quick_connect_id
106    }
107    /// <p>The name of the quick connect.</p>
108    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the quick connect.</p>
113    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.name = input;
115        self
116    }
117    /// <p>The name of the quick connect.</p>
118    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.name
120    }
121    /// <p>The description.</p>
122    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.description = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The description.</p>
127    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.description = input;
129        self
130    }
131    /// <p>The description.</p>
132    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133        &self.description
134    }
135    /// <p>Contains information about the quick connect.</p>
136    pub fn quick_connect_config(mut self, input: crate::types::QuickConnectConfig) -> Self {
137        self.quick_connect_config = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>Contains information about the quick connect.</p>
141    pub fn set_quick_connect_config(mut self, input: ::std::option::Option<crate::types::QuickConnectConfig>) -> Self {
142        self.quick_connect_config = input;
143        self
144    }
145    /// <p>Contains information about the quick connect.</p>
146    pub fn get_quick_connect_config(&self) -> &::std::option::Option<crate::types::QuickConnectConfig> {
147        &self.quick_connect_config
148    }
149    /// Adds a key-value pair to `tags`.
150    ///
151    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
152    ///
153    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
154    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
155        let mut hash_map = self.tags.unwrap_or_default();
156        hash_map.insert(k.into(), v.into());
157        self.tags = ::std::option::Option::Some(hash_map);
158        self
159    }
160    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
161    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
162        self.tags = input;
163        self
164    }
165    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
166    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
167        &self.tags
168    }
169    /// <p>The timestamp when this resource was last modified.</p>
170    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
171        self.last_modified_time = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The timestamp when this resource was last modified.</p>
175    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
176        self.last_modified_time = input;
177        self
178    }
179    /// <p>The timestamp when this resource was last modified.</p>
180    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
181        &self.last_modified_time
182    }
183    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
184    pub fn last_modified_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.last_modified_region = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
189    pub fn set_last_modified_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.last_modified_region = input;
191        self
192    }
193    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
194    pub fn get_last_modified_region(&self) -> &::std::option::Option<::std::string::String> {
195        &self.last_modified_region
196    }
197    /// Consumes the builder and constructs a [`QuickConnect`](crate::types::QuickConnect).
198    pub fn build(self) -> crate::types::QuickConnect {
199        crate::types::QuickConnect {
200            quick_connect_arn: self.quick_connect_arn,
201            quick_connect_id: self.quick_connect_id,
202            name: self.name,
203            description: self.description,
204            quick_connect_config: self.quick_connect_config,
205            tags: self.tags,
206            last_modified_time: self.last_modified_time,
207            last_modified_region: self.last_modified_region,
208        }
209    }
210}