aws_sdk_deadline/operation/update_task/
_update_task_input.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 UpdateTaskInput {
6    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The run status with which to start the task.</p>
9    pub target_run_status: ::std::option::Option<crate::types::TaskTargetRunStatus>,
10    /// <p>The farm ID to update.</p>
11    pub farm_id: ::std::option::Option<::std::string::String>,
12    /// <p>The queue ID to update.</p>
13    pub queue_id: ::std::option::Option<::std::string::String>,
14    /// <p>The job ID to update.</p>
15    pub job_id: ::std::option::Option<::std::string::String>,
16    /// <p>The step ID to update.</p>
17    pub step_id: ::std::option::Option<::std::string::String>,
18    /// <p>The task ID to update.</p>
19    pub task_id: ::std::option::Option<::std::string::String>,
20}
21impl UpdateTaskInput {
22    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
23    pub fn client_token(&self) -> ::std::option::Option<&str> {
24        self.client_token.as_deref()
25    }
26    /// <p>The run status with which to start the task.</p>
27    pub fn target_run_status(&self) -> ::std::option::Option<&crate::types::TaskTargetRunStatus> {
28        self.target_run_status.as_ref()
29    }
30    /// <p>The farm ID to update.</p>
31    pub fn farm_id(&self) -> ::std::option::Option<&str> {
32        self.farm_id.as_deref()
33    }
34    /// <p>The queue ID to update.</p>
35    pub fn queue_id(&self) -> ::std::option::Option<&str> {
36        self.queue_id.as_deref()
37    }
38    /// <p>The job ID to update.</p>
39    pub fn job_id(&self) -> ::std::option::Option<&str> {
40        self.job_id.as_deref()
41    }
42    /// <p>The step ID to update.</p>
43    pub fn step_id(&self) -> ::std::option::Option<&str> {
44        self.step_id.as_deref()
45    }
46    /// <p>The task ID to update.</p>
47    pub fn task_id(&self) -> ::std::option::Option<&str> {
48        self.task_id.as_deref()
49    }
50}
51impl UpdateTaskInput {
52    /// Creates a new builder-style object to manufacture [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
53    pub fn builder() -> crate::operation::update_task::builders::UpdateTaskInputBuilder {
54        crate::operation::update_task::builders::UpdateTaskInputBuilder::default()
55    }
56}
57
58/// A builder for [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdateTaskInputBuilder {
62    pub(crate) client_token: ::std::option::Option<::std::string::String>,
63    pub(crate) target_run_status: ::std::option::Option<crate::types::TaskTargetRunStatus>,
64    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
65    pub(crate) queue_id: ::std::option::Option<::std::string::String>,
66    pub(crate) job_id: ::std::option::Option<::std::string::String>,
67    pub(crate) step_id: ::std::option::Option<::std::string::String>,
68    pub(crate) task_id: ::std::option::Option<::std::string::String>,
69}
70impl UpdateTaskInputBuilder {
71    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
72    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.client_token = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
77    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.client_token = input;
79        self
80    }
81    /// <p>The unique token which the server uses to recognize retries of the same request.</p>
82    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
83        &self.client_token
84    }
85    /// <p>The run status with which to start the task.</p>
86    /// This field is required.
87    pub fn target_run_status(mut self, input: crate::types::TaskTargetRunStatus) -> Self {
88        self.target_run_status = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The run status with which to start the task.</p>
92    pub fn set_target_run_status(mut self, input: ::std::option::Option<crate::types::TaskTargetRunStatus>) -> Self {
93        self.target_run_status = input;
94        self
95    }
96    /// <p>The run status with which to start the task.</p>
97    pub fn get_target_run_status(&self) -> &::std::option::Option<crate::types::TaskTargetRunStatus> {
98        &self.target_run_status
99    }
100    /// <p>The farm ID to update.</p>
101    /// This field is required.
102    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.farm_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The farm ID to update.</p>
107    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.farm_id = input;
109        self
110    }
111    /// <p>The farm ID to update.</p>
112    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.farm_id
114    }
115    /// <p>The queue ID to update.</p>
116    /// This field is required.
117    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.queue_id = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The queue ID to update.</p>
122    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.queue_id = input;
124        self
125    }
126    /// <p>The queue ID to update.</p>
127    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.queue_id
129    }
130    /// <p>The job ID to update.</p>
131    /// This field is required.
132    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.job_id = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The job ID to update.</p>
137    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.job_id = input;
139        self
140    }
141    /// <p>The job ID to update.</p>
142    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
143        &self.job_id
144    }
145    /// <p>The step ID to update.</p>
146    /// This field is required.
147    pub fn step_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.step_id = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The step ID to update.</p>
152    pub fn set_step_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.step_id = input;
154        self
155    }
156    /// <p>The step ID to update.</p>
157    pub fn get_step_id(&self) -> &::std::option::Option<::std::string::String> {
158        &self.step_id
159    }
160    /// <p>The task ID to update.</p>
161    /// This field is required.
162    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.task_id = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>The task ID to update.</p>
167    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.task_id = input;
169        self
170    }
171    /// <p>The task ID to update.</p>
172    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
173        &self.task_id
174    }
175    /// Consumes the builder and constructs a [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
176    pub fn build(self) -> ::std::result::Result<crate::operation::update_task::UpdateTaskInput, ::aws_smithy_types::error::operation::BuildError> {
177        ::std::result::Result::Ok(crate::operation::update_task::UpdateTaskInput {
178            client_token: self.client_token,
179            target_run_status: self.target_run_status,
180            farm_id: self.farm_id,
181            queue_id: self.queue_id,
182            job_id: self.job_id,
183            step_id: self.step_id,
184            task_id: self.task_id,
185        })
186    }
187}