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