aws_sdk_connect/types/
_agent_status.rs

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