Skip to main content

aws_sdk_context/operation/cancel_task/
_cancel_task_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)]
5pub struct CancelTaskOutput {
6    /// <p>The ID of the task. Pass it as <code>taskId</code> to GetTask or CancelTask.</p>
7    pub id: ::std::string::String,
8    /// <p>The Amazon Resource Name (ARN) of the task.</p>
9    pub arn: ::std::string::String,
10    /// <p>The agent context's ID.</p>
11    pub agent_context_id: ::std::string::String,
12    /// <p>The type of the task. It is set by the <code>inputConfiguration</code> member that the task was started with: <code>IMPORT_DATA_DICTIONARY</code>, <code>IMPORT_VERIFIED_QUERIES</code>, or <code>IMPORT_ONTOLOGY</code>.</p>
13    pub r#type: crate::types::TaskType,
14    /// <p>The status of the task. A task moves from <code>PENDING</code> to <code>IN_PROGRESS</code> and ends <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>. After CancelTask, it is <code>CANCELLING</code> until it stops.</p>
15    pub status: crate::types::TaskStatus,
16    /// <p>The description of the task, as given to StartTask.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18    /// <p>The date and time when the task was created.</p>
19    pub created_at: ::aws_smithy_types::DateTime,
20    /// <p>The date and time when the task was last updated, such as when its status changed. Equal to <code>createdAt</code> until the task first changes.</p>
21    pub updated_at: ::aws_smithy_types::DateTime,
22    /// <p>The code for why the task failed. Present only when <code>status</code> is <code>FAILED</code>.</p>
23    /// <p>Valid values:</p>
24    /// <ul>
25    /// <li>
26    /// <p><code>GRAPH_NOT_ACTIVE</code> - The agent context was deleted, or was not yet available, while the task ran.</p></li>
27    /// <li>
28    /// <p><code>ONTOLOGY_INVALID</code> - An ontology is missing, has no loadable source, or its source is unsafe or too large.</p></li>
29    /// <li>
30    /// <p><code>ONTOLOGY_IMPORT_UNAVAILABLE</code> - An ontology couldn't be imported because of a temporary problem. Start a new task.</p></li>
31    /// <li>
32    /// <p><code>ONTOLOGY_ALREADY_IMPORTED</code> - This ontology version is already imported into the agent context.</p></li>
33    /// </ul>
34    pub status_reason_code: ::std::option::Option<crate::types::TaskStatusReasonCode>,
35    /// <p>The reason the task failed. Present only when status is FAILED.</p>
36    pub status_message: ::std::option::Option<::std::string::String>,
37    /// <p>Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>.</p>
38    pub statistics: ::std::option::Option<crate::types::TaskStatistics>,
39    /// <p>A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.</p>
40    pub input_configuration: ::std::option::Option<crate::types::TaskInputConfigurationSummary>,
41    /// <p>What the task created, in creation order. Set when it finishes.</p>
42    pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::TaskOutput>>,
43    _request_id: Option<String>,
44}
45impl CancelTaskOutput {
46    /// <p>The ID of the task. Pass it as <code>taskId</code> to GetTask or CancelTask.</p>
47    pub fn id(&self) -> &str {
48        use std::ops::Deref;
49        self.id.deref()
50    }
51    /// <p>The Amazon Resource Name (ARN) of the task.</p>
52    pub fn arn(&self) -> &str {
53        use std::ops::Deref;
54        self.arn.deref()
55    }
56    /// <p>The agent context's ID.</p>
57    pub fn agent_context_id(&self) -> &str {
58        use std::ops::Deref;
59        self.agent_context_id.deref()
60    }
61    /// <p>The type of the task. It is set by the <code>inputConfiguration</code> member that the task was started with: <code>IMPORT_DATA_DICTIONARY</code>, <code>IMPORT_VERIFIED_QUERIES</code>, or <code>IMPORT_ONTOLOGY</code>.</p>
62    pub fn r#type(&self) -> &crate::types::TaskType {
63        &self.r#type
64    }
65    /// <p>The status of the task. A task moves from <code>PENDING</code> to <code>IN_PROGRESS</code> and ends <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>. After CancelTask, it is <code>CANCELLING</code> until it stops.</p>
66    pub fn status(&self) -> &crate::types::TaskStatus {
67        &self.status
68    }
69    /// <p>The description of the task, as given to StartTask.</p>
70    pub fn description(&self) -> ::std::option::Option<&str> {
71        self.description.as_deref()
72    }
73    /// <p>The date and time when the task was created.</p>
74    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
75        &self.created_at
76    }
77    /// <p>The date and time when the task was last updated, such as when its status changed. Equal to <code>createdAt</code> until the task first changes.</p>
78    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
79        &self.updated_at
80    }
81    /// <p>The code for why the task failed. Present only when <code>status</code> is <code>FAILED</code>.</p>
82    /// <p>Valid values:</p>
83    /// <ul>
84    /// <li>
85    /// <p><code>GRAPH_NOT_ACTIVE</code> - The agent context was deleted, or was not yet available, while the task ran.</p></li>
86    /// <li>
87    /// <p><code>ONTOLOGY_INVALID</code> - An ontology is missing, has no loadable source, or its source is unsafe or too large.</p></li>
88    /// <li>
89    /// <p><code>ONTOLOGY_IMPORT_UNAVAILABLE</code> - An ontology couldn't be imported because of a temporary problem. Start a new task.</p></li>
90    /// <li>
91    /// <p><code>ONTOLOGY_ALREADY_IMPORTED</code> - This ontology version is already imported into the agent context.</p></li>
92    /// </ul>
93    pub fn status_reason_code(&self) -> ::std::option::Option<&crate::types::TaskStatusReasonCode> {
94        self.status_reason_code.as_ref()
95    }
96    /// <p>The reason the task failed. Present only when status is FAILED.</p>
97    pub fn status_message(&self) -> ::std::option::Option<&str> {
98        self.status_message.as_deref()
99    }
100    /// <p>Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>.</p>
101    pub fn statistics(&self) -> ::std::option::Option<&crate::types::TaskStatistics> {
102        self.statistics.as_ref()
103    }
104    /// <p>A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.</p>
105    pub fn input_configuration(&self) -> ::std::option::Option<&crate::types::TaskInputConfigurationSummary> {
106        self.input_configuration.as_ref()
107    }
108    /// <p>What the task created, in creation order. Set when it finishes.</p>
109    ///
110    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.outputs.is_none()`.
111    pub fn outputs(&self) -> &[crate::types::TaskOutput] {
112        self.outputs.as_deref().unwrap_or_default()
113    }
114}
115impl ::std::fmt::Debug for CancelTaskOutput {
116    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
117        let mut formatter = f.debug_struct("CancelTaskOutput");
118        formatter.field("id", &self.id);
119        formatter.field("arn", &self.arn);
120        formatter.field("agent_context_id", &self.agent_context_id);
121        formatter.field("r#type", &self.r#type);
122        formatter.field("status", &self.status);
123        formatter.field("description", &"*** Sensitive Data Redacted ***");
124        formatter.field("created_at", &self.created_at);
125        formatter.field("updated_at", &self.updated_at);
126        formatter.field("status_reason_code", &self.status_reason_code);
127        formatter.field("status_message", &"*** Sensitive Data Redacted ***");
128        formatter.field("statistics", &self.statistics);
129        formatter.field("input_configuration", &self.input_configuration);
130        formatter.field("outputs", &self.outputs);
131        formatter.field("_request_id", &self._request_id);
132        formatter.finish()
133    }
134}
135impl ::aws_types::request_id::RequestId for CancelTaskOutput {
136    fn request_id(&self) -> Option<&str> {
137        self._request_id.as_deref()
138    }
139}
140impl CancelTaskOutput {
141    /// Creates a new builder-style object to manufacture [`CancelTaskOutput`](crate::operation::cancel_task::CancelTaskOutput).
142    pub fn builder() -> crate::operation::cancel_task::builders::CancelTaskOutputBuilder {
143        crate::operation::cancel_task::builders::CancelTaskOutputBuilder::default()
144    }
145}
146
147/// A builder for [`CancelTaskOutput`](crate::operation::cancel_task::CancelTaskOutput).
148#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
149#[non_exhaustive]
150pub struct CancelTaskOutputBuilder {
151    pub(crate) id: ::std::option::Option<::std::string::String>,
152    pub(crate) arn: ::std::option::Option<::std::string::String>,
153    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
154    pub(crate) r#type: ::std::option::Option<crate::types::TaskType>,
155    pub(crate) status: ::std::option::Option<crate::types::TaskStatus>,
156    pub(crate) description: ::std::option::Option<::std::string::String>,
157    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
158    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
159    pub(crate) status_reason_code: ::std::option::Option<crate::types::TaskStatusReasonCode>,
160    pub(crate) status_message: ::std::option::Option<::std::string::String>,
161    pub(crate) statistics: ::std::option::Option<crate::types::TaskStatistics>,
162    pub(crate) input_configuration: ::std::option::Option<crate::types::TaskInputConfigurationSummary>,
163    pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::TaskOutput>>,
164    _request_id: Option<String>,
165}
166impl CancelTaskOutputBuilder {
167    /// <p>The ID of the task. Pass it as <code>taskId</code> to GetTask or CancelTask.</p>
168    /// This field is required.
169    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.id = ::std::option::Option::Some(input.into());
171        self
172    }
173    /// <p>The ID of the task. Pass it as <code>taskId</code> to GetTask or CancelTask.</p>
174    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175        self.id = input;
176        self
177    }
178    /// <p>The ID of the task. Pass it as <code>taskId</code> to GetTask or CancelTask.</p>
179    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
180        &self.id
181    }
182    /// <p>The Amazon Resource Name (ARN) of the task.</p>
183    /// This field is required.
184    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.arn = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The Amazon Resource Name (ARN) of the task.</p>
189    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.arn = input;
191        self
192    }
193    /// <p>The Amazon Resource Name (ARN) of the task.</p>
194    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
195        &self.arn
196    }
197    /// <p>The agent context's ID.</p>
198    /// This field is required.
199    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.agent_context_id = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The agent context's ID.</p>
204    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.agent_context_id = input;
206        self
207    }
208    /// <p>The agent context's ID.</p>
209    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
210        &self.agent_context_id
211    }
212    /// <p>The type of the task. It is set by the <code>inputConfiguration</code> member that the task was started with: <code>IMPORT_DATA_DICTIONARY</code>, <code>IMPORT_VERIFIED_QUERIES</code>, or <code>IMPORT_ONTOLOGY</code>.</p>
213    /// This field is required.
214    pub fn r#type(mut self, input: crate::types::TaskType) -> Self {
215        self.r#type = ::std::option::Option::Some(input);
216        self
217    }
218    /// <p>The type of the task. It is set by the <code>inputConfiguration</code> member that the task was started with: <code>IMPORT_DATA_DICTIONARY</code>, <code>IMPORT_VERIFIED_QUERIES</code>, or <code>IMPORT_ONTOLOGY</code>.</p>
219    pub fn set_type(mut self, input: ::std::option::Option<crate::types::TaskType>) -> Self {
220        self.r#type = input;
221        self
222    }
223    /// <p>The type of the task. It is set by the <code>inputConfiguration</code> member that the task was started with: <code>IMPORT_DATA_DICTIONARY</code>, <code>IMPORT_VERIFIED_QUERIES</code>, or <code>IMPORT_ONTOLOGY</code>.</p>
224    pub fn get_type(&self) -> &::std::option::Option<crate::types::TaskType> {
225        &self.r#type
226    }
227    /// <p>The status of the task. A task moves from <code>PENDING</code> to <code>IN_PROGRESS</code> and ends <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>. After CancelTask, it is <code>CANCELLING</code> until it stops.</p>
228    /// This field is required.
229    pub fn status(mut self, input: crate::types::TaskStatus) -> Self {
230        self.status = ::std::option::Option::Some(input);
231        self
232    }
233    /// <p>The status of the task. A task moves from <code>PENDING</code> to <code>IN_PROGRESS</code> and ends <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>. After CancelTask, it is <code>CANCELLING</code> until it stops.</p>
234    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TaskStatus>) -> Self {
235        self.status = input;
236        self
237    }
238    /// <p>The status of the task. A task moves from <code>PENDING</code> to <code>IN_PROGRESS</code> and ends <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>. After CancelTask, it is <code>CANCELLING</code> until it stops.</p>
239    pub fn get_status(&self) -> &::std::option::Option<crate::types::TaskStatus> {
240        &self.status
241    }
242    /// <p>The description of the task, as given to StartTask.</p>
243    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.description = ::std::option::Option::Some(input.into());
245        self
246    }
247    /// <p>The description of the task, as given to StartTask.</p>
248    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.description = input;
250        self
251    }
252    /// <p>The description of the task, as given to StartTask.</p>
253    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
254        &self.description
255    }
256    /// <p>The date and time when the task was created.</p>
257    /// This field is required.
258    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
259        self.created_at = ::std::option::Option::Some(input);
260        self
261    }
262    /// <p>The date and time when the task was created.</p>
263    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
264        self.created_at = input;
265        self
266    }
267    /// <p>The date and time when the task was created.</p>
268    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
269        &self.created_at
270    }
271    /// <p>The date and time when the task was last updated, such as when its status changed. Equal to <code>createdAt</code> until the task first changes.</p>
272    /// This field is required.
273    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
274        self.updated_at = ::std::option::Option::Some(input);
275        self
276    }
277    /// <p>The date and time when the task was last updated, such as when its status changed. Equal to <code>createdAt</code> until the task first changes.</p>
278    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
279        self.updated_at = input;
280        self
281    }
282    /// <p>The date and time when the task was last updated, such as when its status changed. Equal to <code>createdAt</code> until the task first changes.</p>
283    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
284        &self.updated_at
285    }
286    /// <p>The code for why the task failed. Present only when <code>status</code> is <code>FAILED</code>.</p>
287    /// <p>Valid values:</p>
288    /// <ul>
289    /// <li>
290    /// <p><code>GRAPH_NOT_ACTIVE</code> - The agent context was deleted, or was not yet available, while the task ran.</p></li>
291    /// <li>
292    /// <p><code>ONTOLOGY_INVALID</code> - An ontology is missing, has no loadable source, or its source is unsafe or too large.</p></li>
293    /// <li>
294    /// <p><code>ONTOLOGY_IMPORT_UNAVAILABLE</code> - An ontology couldn't be imported because of a temporary problem. Start a new task.</p></li>
295    /// <li>
296    /// <p><code>ONTOLOGY_ALREADY_IMPORTED</code> - This ontology version is already imported into the agent context.</p></li>
297    /// </ul>
298    pub fn status_reason_code(mut self, input: crate::types::TaskStatusReasonCode) -> Self {
299        self.status_reason_code = ::std::option::Option::Some(input);
300        self
301    }
302    /// <p>The code for why the task failed. Present only when <code>status</code> is <code>FAILED</code>.</p>
303    /// <p>Valid values:</p>
304    /// <ul>
305    /// <li>
306    /// <p><code>GRAPH_NOT_ACTIVE</code> - The agent context was deleted, or was not yet available, while the task ran.</p></li>
307    /// <li>
308    /// <p><code>ONTOLOGY_INVALID</code> - An ontology is missing, has no loadable source, or its source is unsafe or too large.</p></li>
309    /// <li>
310    /// <p><code>ONTOLOGY_IMPORT_UNAVAILABLE</code> - An ontology couldn't be imported because of a temporary problem. Start a new task.</p></li>
311    /// <li>
312    /// <p><code>ONTOLOGY_ALREADY_IMPORTED</code> - This ontology version is already imported into the agent context.</p></li>
313    /// </ul>
314    pub fn set_status_reason_code(mut self, input: ::std::option::Option<crate::types::TaskStatusReasonCode>) -> Self {
315        self.status_reason_code = input;
316        self
317    }
318    /// <p>The code for why the task failed. Present only when <code>status</code> is <code>FAILED</code>.</p>
319    /// <p>Valid values:</p>
320    /// <ul>
321    /// <li>
322    /// <p><code>GRAPH_NOT_ACTIVE</code> - The agent context was deleted, or was not yet available, while the task ran.</p></li>
323    /// <li>
324    /// <p><code>ONTOLOGY_INVALID</code> - An ontology is missing, has no loadable source, or its source is unsafe or too large.</p></li>
325    /// <li>
326    /// <p><code>ONTOLOGY_IMPORT_UNAVAILABLE</code> - An ontology couldn't be imported because of a temporary problem. Start a new task.</p></li>
327    /// <li>
328    /// <p><code>ONTOLOGY_ALREADY_IMPORTED</code> - This ontology version is already imported into the agent context.</p></li>
329    /// </ul>
330    pub fn get_status_reason_code(&self) -> &::std::option::Option<crate::types::TaskStatusReasonCode> {
331        &self.status_reason_code
332    }
333    /// <p>The reason the task failed. Present only when status is FAILED.</p>
334    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
335        self.status_message = ::std::option::Option::Some(input.into());
336        self
337    }
338    /// <p>The reason the task failed. Present only when status is FAILED.</p>
339    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
340        self.status_message = input;
341        self
342    }
343    /// <p>The reason the task failed. Present only when status is FAILED.</p>
344    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
345        &self.status_message
346    }
347    /// <p>Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>.</p>
348    pub fn statistics(mut self, input: crate::types::TaskStatistics) -> Self {
349        self.statistics = ::std::option::Option::Some(input);
350        self
351    }
352    /// <p>Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>.</p>
353    pub fn set_statistics(mut self, input: ::std::option::Option<crate::types::TaskStatistics>) -> Self {
354        self.statistics = input;
355        self
356    }
357    /// <p>Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is <code>COMPLETED</code>, <code>FAILED</code>, or <code>CANCELLED</code>.</p>
358    pub fn get_statistics(&self) -> &::std::option::Option<crate::types::TaskStatistics> {
359        &self.statistics
360    }
361    /// <p>A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.</p>
362    /// This field is required.
363    pub fn input_configuration(mut self, input: crate::types::TaskInputConfigurationSummary) -> Self {
364        self.input_configuration = ::std::option::Option::Some(input);
365        self
366    }
367    /// <p>A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.</p>
368    pub fn set_input_configuration(mut self, input: ::std::option::Option<crate::types::TaskInputConfigurationSummary>) -> Self {
369        self.input_configuration = input;
370        self
371    }
372    /// <p>A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.</p>
373    pub fn get_input_configuration(&self) -> &::std::option::Option<crate::types::TaskInputConfigurationSummary> {
374        &self.input_configuration
375    }
376    /// Appends an item to `outputs`.
377    ///
378    /// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
379    ///
380    /// <p>What the task created, in creation order. Set when it finishes.</p>
381    pub fn outputs(mut self, input: crate::types::TaskOutput) -> Self {
382        let mut v = self.outputs.unwrap_or_default();
383        v.push(input);
384        self.outputs = ::std::option::Option::Some(v);
385        self
386    }
387    /// <p>What the task created, in creation order. Set when it finishes.</p>
388    pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TaskOutput>>) -> Self {
389        self.outputs = input;
390        self
391    }
392    /// <p>What the task created, in creation order. Set when it finishes.</p>
393    pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaskOutput>> {
394        &self.outputs
395    }
396    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
397        self._request_id = Some(request_id.into());
398        self
399    }
400
401    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
402        self._request_id = request_id;
403        self
404    }
405    /// Consumes the builder and constructs a [`CancelTaskOutput`](crate::operation::cancel_task::CancelTaskOutput).
406    /// This method will fail if any of the following fields are not set:
407    /// - [`id`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::id)
408    /// - [`arn`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::arn)
409    /// - [`agent_context_id`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::agent_context_id)
410    /// - [`r#type`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::type)
411    /// - [`status`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::status)
412    /// - [`created_at`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::created_at)
413    /// - [`updated_at`](crate::operation::cancel_task::builders::CancelTaskOutputBuilder::updated_at)
414    pub fn build(self) -> ::std::result::Result<crate::operation::cancel_task::CancelTaskOutput, ::aws_smithy_types::error::operation::BuildError> {
415        ::std::result::Result::Ok(crate::operation::cancel_task::CancelTaskOutput {
416            id: self.id.ok_or_else(|| {
417                ::aws_smithy_types::error::operation::BuildError::missing_field(
418                    "id",
419                    "id was not specified but it is required when building CancelTaskOutput",
420                )
421            })?,
422            arn: self.arn.ok_or_else(|| {
423                ::aws_smithy_types::error::operation::BuildError::missing_field(
424                    "arn",
425                    "arn was not specified but it is required when building CancelTaskOutput",
426                )
427            })?,
428            agent_context_id: self.agent_context_id.ok_or_else(|| {
429                ::aws_smithy_types::error::operation::BuildError::missing_field(
430                    "agent_context_id",
431                    "agent_context_id was not specified but it is required when building CancelTaskOutput",
432                )
433            })?,
434            r#type: self.r#type.ok_or_else(|| {
435                ::aws_smithy_types::error::operation::BuildError::missing_field(
436                    "r#type",
437                    "r#type was not specified but it is required when building CancelTaskOutput",
438                )
439            })?,
440            status: self.status.ok_or_else(|| {
441                ::aws_smithy_types::error::operation::BuildError::missing_field(
442                    "status",
443                    "status was not specified but it is required when building CancelTaskOutput",
444                )
445            })?,
446            description: self.description,
447            created_at: self.created_at.ok_or_else(|| {
448                ::aws_smithy_types::error::operation::BuildError::missing_field(
449                    "created_at",
450                    "created_at was not specified but it is required when building CancelTaskOutput",
451                )
452            })?,
453            updated_at: self.updated_at.ok_or_else(|| {
454                ::aws_smithy_types::error::operation::BuildError::missing_field(
455                    "updated_at",
456                    "updated_at was not specified but it is required when building CancelTaskOutput",
457                )
458            })?,
459            status_reason_code: self.status_reason_code,
460            status_message: self.status_message,
461            statistics: self.statistics,
462            input_configuration: self.input_configuration,
463            outputs: self.outputs,
464            _request_id: self._request_id,
465        })
466    }
467}
468impl ::std::fmt::Debug for CancelTaskOutputBuilder {
469    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
470        let mut formatter = f.debug_struct("CancelTaskOutputBuilder");
471        formatter.field("id", &self.id);
472        formatter.field("arn", &self.arn);
473        formatter.field("agent_context_id", &self.agent_context_id);
474        formatter.field("r#type", &self.r#type);
475        formatter.field("status", &self.status);
476        formatter.field("description", &"*** Sensitive Data Redacted ***");
477        formatter.field("created_at", &self.created_at);
478        formatter.field("updated_at", &self.updated_at);
479        formatter.field("status_reason_code", &self.status_reason_code);
480        formatter.field("status_message", &"*** Sensitive Data Redacted ***");
481        formatter.field("statistics", &self.statistics);
482        formatter.field("input_configuration", &self.input_configuration);
483        formatter.field("outputs", &self.outputs);
484        formatter.field("_request_id", &self._request_id);
485        formatter.finish()
486    }
487}