Skip to main content

aws_sdk_connect/operation/update_task_template/
_update_task_template_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTaskTemplateOutput {
6    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the task template resource.</p>
9    pub id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) for the task template resource.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the task template.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The description of the task template.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The identifier of the flow that runs by default when a task is created by referencing this template.</p>
17    pub contact_flow_id: ::std::option::Option<::std::string::String>,
18    /// <p>The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.</p>
19    pub self_assign_flow_id: ::std::option::Option<::std::string::String>,
20    /// <p>Constraints that are applicable to the fields listed.</p>
21    pub constraints: ::std::option::Option<crate::types::TaskTemplateConstraints>,
22    /// <p>The default values for fields when a task is created by referencing this template.</p>
23    pub defaults: ::std::option::Option<crate::types::TaskTemplateDefaults>,
24    /// <p>Fields that are part of the template.</p>
25    pub fields: ::std::option::Option<::std::vec::Vec<crate::types::TaskTemplateField>>,
26    /// <p>Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.</p>
27    pub status: ::std::option::Option<crate::types::TaskTemplateStatus>,
28    /// <p>The timestamp when the task template was last modified.</p>
29    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
30    /// <p>The timestamp when the task template was created.</p>
31    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32    _request_id: Option<String>,
33}
34impl UpdateTaskTemplateOutput {
35    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
36    pub fn instance_id(&self) -> ::std::option::Option<&str> {
37        self.instance_id.as_deref()
38    }
39    /// <p>The identifier of the task template resource.</p>
40    pub fn id(&self) -> ::std::option::Option<&str> {
41        self.id.as_deref()
42    }
43    /// <p>The Amazon Resource Name (ARN) for the task template resource.</p>
44    pub fn arn(&self) -> ::std::option::Option<&str> {
45        self.arn.as_deref()
46    }
47    /// <p>The name of the task template.</p>
48    pub fn name(&self) -> ::std::option::Option<&str> {
49        self.name.as_deref()
50    }
51    /// <p>The description of the task template.</p>
52    pub fn description(&self) -> ::std::option::Option<&str> {
53        self.description.as_deref()
54    }
55    /// <p>The identifier of the flow that runs by default when a task is created by referencing this template.</p>
56    pub fn contact_flow_id(&self) -> ::std::option::Option<&str> {
57        self.contact_flow_id.as_deref()
58    }
59    /// <p>The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.</p>
60    pub fn self_assign_flow_id(&self) -> ::std::option::Option<&str> {
61        self.self_assign_flow_id.as_deref()
62    }
63    /// <p>Constraints that are applicable to the fields listed.</p>
64    pub fn constraints(&self) -> ::std::option::Option<&crate::types::TaskTemplateConstraints> {
65        self.constraints.as_ref()
66    }
67    /// <p>The default values for fields when a task is created by referencing this template.</p>
68    pub fn defaults(&self) -> ::std::option::Option<&crate::types::TaskTemplateDefaults> {
69        self.defaults.as_ref()
70    }
71    /// <p>Fields that are part of the template.</p>
72    ///
73    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.fields.is_none()`.
74    pub fn fields(&self) -> &[crate::types::TaskTemplateField] {
75        self.fields.as_deref().unwrap_or_default()
76    }
77    /// <p>Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.</p>
78    pub fn status(&self) -> ::std::option::Option<&crate::types::TaskTemplateStatus> {
79        self.status.as_ref()
80    }
81    /// <p>The timestamp when the task template was last modified.</p>
82    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
83        self.last_modified_time.as_ref()
84    }
85    /// <p>The timestamp when the task template was created.</p>
86    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
87        self.created_time.as_ref()
88    }
89}
90impl ::aws_types::request_id::RequestId for UpdateTaskTemplateOutput {
91    fn request_id(&self) -> Option<&str> {
92        self._request_id.as_deref()
93    }
94}
95impl UpdateTaskTemplateOutput {
96    /// Creates a new builder-style object to manufacture [`UpdateTaskTemplateOutput`](crate::operation::update_task_template::UpdateTaskTemplateOutput).
97    pub fn builder() -> crate::operation::update_task_template::builders::UpdateTaskTemplateOutputBuilder {
98        crate::operation::update_task_template::builders::UpdateTaskTemplateOutputBuilder::default()
99    }
100}
101
102/// A builder for [`UpdateTaskTemplateOutput`](crate::operation::update_task_template::UpdateTaskTemplateOutput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct UpdateTaskTemplateOutputBuilder {
106    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
107    pub(crate) id: ::std::option::Option<::std::string::String>,
108    pub(crate) arn: ::std::option::Option<::std::string::String>,
109    pub(crate) name: ::std::option::Option<::std::string::String>,
110    pub(crate) description: ::std::option::Option<::std::string::String>,
111    pub(crate) contact_flow_id: ::std::option::Option<::std::string::String>,
112    pub(crate) self_assign_flow_id: ::std::option::Option<::std::string::String>,
113    pub(crate) constraints: ::std::option::Option<crate::types::TaskTemplateConstraints>,
114    pub(crate) defaults: ::std::option::Option<crate::types::TaskTemplateDefaults>,
115    pub(crate) fields: ::std::option::Option<::std::vec::Vec<crate::types::TaskTemplateField>>,
116    pub(crate) status: ::std::option::Option<crate::types::TaskTemplateStatus>,
117    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
119    _request_id: Option<String>,
120}
121impl UpdateTaskTemplateOutputBuilder {
122    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
123    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.instance_id = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
128    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.instance_id = input;
130        self
131    }
132    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
133    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
134        &self.instance_id
135    }
136    /// <p>The identifier of the task template resource.</p>
137    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.id = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The identifier of the task template resource.</p>
142    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.id = input;
144        self
145    }
146    /// <p>The identifier of the task template resource.</p>
147    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
148        &self.id
149    }
150    /// <p>The Amazon Resource Name (ARN) for the task template resource.</p>
151    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.arn = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The Amazon Resource Name (ARN) for the task template resource.</p>
156    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.arn = input;
158        self
159    }
160    /// <p>The Amazon Resource Name (ARN) for the task template resource.</p>
161    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
162        &self.arn
163    }
164    /// <p>The name of the task template.</p>
165    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.name = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>The name of the task template.</p>
170    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.name = input;
172        self
173    }
174    /// <p>The name of the task template.</p>
175    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
176        &self.name
177    }
178    /// <p>The description of the task template.</p>
179    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.description = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The description of the task template.</p>
184    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.description = input;
186        self
187    }
188    /// <p>The description of the task template.</p>
189    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
190        &self.description
191    }
192    /// <p>The identifier of the flow that runs by default when a task is created by referencing this template.</p>
193    pub fn contact_flow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.contact_flow_id = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// <p>The identifier of the flow that runs by default when a task is created by referencing this template.</p>
198    pub fn set_contact_flow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.contact_flow_id = input;
200        self
201    }
202    /// <p>The identifier of the flow that runs by default when a task is created by referencing this template.</p>
203    pub fn get_contact_flow_id(&self) -> &::std::option::Option<::std::string::String> {
204        &self.contact_flow_id
205    }
206    /// <p>The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.</p>
207    pub fn self_assign_flow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.self_assign_flow_id = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <p>The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.</p>
212    pub fn set_self_assign_flow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.self_assign_flow_id = input;
214        self
215    }
216    /// <p>The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.</p>
217    pub fn get_self_assign_flow_id(&self) -> &::std::option::Option<::std::string::String> {
218        &self.self_assign_flow_id
219    }
220    /// <p>Constraints that are applicable to the fields listed.</p>
221    pub fn constraints(mut self, input: crate::types::TaskTemplateConstraints) -> Self {
222        self.constraints = ::std::option::Option::Some(input);
223        self
224    }
225    /// <p>Constraints that are applicable to the fields listed.</p>
226    pub fn set_constraints(mut self, input: ::std::option::Option<crate::types::TaskTemplateConstraints>) -> Self {
227        self.constraints = input;
228        self
229    }
230    /// <p>Constraints that are applicable to the fields listed.</p>
231    pub fn get_constraints(&self) -> &::std::option::Option<crate::types::TaskTemplateConstraints> {
232        &self.constraints
233    }
234    /// <p>The default values for fields when a task is created by referencing this template.</p>
235    pub fn defaults(mut self, input: crate::types::TaskTemplateDefaults) -> Self {
236        self.defaults = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The default values for fields when a task is created by referencing this template.</p>
240    pub fn set_defaults(mut self, input: ::std::option::Option<crate::types::TaskTemplateDefaults>) -> Self {
241        self.defaults = input;
242        self
243    }
244    /// <p>The default values for fields when a task is created by referencing this template.</p>
245    pub fn get_defaults(&self) -> &::std::option::Option<crate::types::TaskTemplateDefaults> {
246        &self.defaults
247    }
248    /// Appends an item to `fields`.
249    ///
250    /// To override the contents of this collection use [`set_fields`](Self::set_fields).
251    ///
252    /// <p>Fields that are part of the template.</p>
253    pub fn fields(mut self, input: crate::types::TaskTemplateField) -> Self {
254        let mut v = self.fields.unwrap_or_default();
255        v.push(input);
256        self.fields = ::std::option::Option::Some(v);
257        self
258    }
259    /// <p>Fields that are part of the template.</p>
260    pub fn set_fields(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TaskTemplateField>>) -> Self {
261        self.fields = input;
262        self
263    }
264    /// <p>Fields that are part of the template.</p>
265    pub fn get_fields(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaskTemplateField>> {
266        &self.fields
267    }
268    /// <p>Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.</p>
269    pub fn status(mut self, input: crate::types::TaskTemplateStatus) -> Self {
270        self.status = ::std::option::Option::Some(input);
271        self
272    }
273    /// <p>Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.</p>
274    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TaskTemplateStatus>) -> Self {
275        self.status = input;
276        self
277    }
278    /// <p>Marks a template as <code>ACTIVE</code> or <code>INACTIVE</code> for a task to refer to it. Tasks can only be created from <code>ACTIVE</code> templates. If a template is marked as <code>INACTIVE</code>, then a task that refers to this template cannot be created.</p>
279    pub fn get_status(&self) -> &::std::option::Option<crate::types::TaskTemplateStatus> {
280        &self.status
281    }
282    /// <p>The timestamp when the task template was last modified.</p>
283    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
284        self.last_modified_time = ::std::option::Option::Some(input);
285        self
286    }
287    /// <p>The timestamp when the task template was last modified.</p>
288    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
289        self.last_modified_time = input;
290        self
291    }
292    /// <p>The timestamp when the task template was last modified.</p>
293    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
294        &self.last_modified_time
295    }
296    /// <p>The timestamp when the task template was created.</p>
297    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
298        self.created_time = ::std::option::Option::Some(input);
299        self
300    }
301    /// <p>The timestamp when the task template was created.</p>
302    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
303        self.created_time = input;
304        self
305    }
306    /// <p>The timestamp when the task template was created.</p>
307    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
308        &self.created_time
309    }
310    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
311        self._request_id = Some(request_id.into());
312        self
313    }
314
315    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
316        self._request_id = request_id;
317        self
318    }
319    /// Consumes the builder and constructs a [`UpdateTaskTemplateOutput`](crate::operation::update_task_template::UpdateTaskTemplateOutput).
320    pub fn build(self) -> crate::operation::update_task_template::UpdateTaskTemplateOutput {
321        crate::operation::update_task_template::UpdateTaskTemplateOutput {
322            instance_id: self.instance_id,
323            id: self.id,
324            arn: self.arn,
325            name: self.name,
326            description: self.description,
327            contact_flow_id: self.contact_flow_id,
328            self_assign_flow_id: self.self_assign_flow_id,
329            constraints: self.constraints,
330            defaults: self.defaults,
331            fields: self.fields,
332            status: self.status,
333            last_modified_time: self.last_modified_time,
334            created_time: self.created_time,
335            _request_id: self._request_id,
336        }
337    }
338}