aws_sdk_deadline/operation/get_task/
_get_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 GetTaskInput {
6    /// <p>The farm ID of the farm connected to the task.</p>
7    pub farm_id: ::std::option::Option<::std::string::String>,
8    /// <p>The queue ID for the queue connected to the task.</p>
9    pub queue_id: ::std::option::Option<::std::string::String>,
10    /// <p>The job ID of the job connected to the task.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12    /// <p>The step ID for the step connected to the task.</p>
13    pub step_id: ::std::option::Option<::std::string::String>,
14    /// <p>The task ID.</p>
15    pub task_id: ::std::option::Option<::std::string::String>,
16}
17impl GetTaskInput {
18    /// <p>The farm ID of the farm connected to the task.</p>
19    pub fn farm_id(&self) -> ::std::option::Option<&str> {
20        self.farm_id.as_deref()
21    }
22    /// <p>The queue ID for the queue connected to the task.</p>
23    pub fn queue_id(&self) -> ::std::option::Option<&str> {
24        self.queue_id.as_deref()
25    }
26    /// <p>The job ID of the job connected to the task.</p>
27    pub fn job_id(&self) -> ::std::option::Option<&str> {
28        self.job_id.as_deref()
29    }
30    /// <p>The step ID for the step connected to the task.</p>
31    pub fn step_id(&self) -> ::std::option::Option<&str> {
32        self.step_id.as_deref()
33    }
34    /// <p>The task ID.</p>
35    pub fn task_id(&self) -> ::std::option::Option<&str> {
36        self.task_id.as_deref()
37    }
38}
39impl GetTaskInput {
40    /// Creates a new builder-style object to manufacture [`GetTaskInput`](crate::operation::get_task::GetTaskInput).
41    pub fn builder() -> crate::operation::get_task::builders::GetTaskInputBuilder {
42        crate::operation::get_task::builders::GetTaskInputBuilder::default()
43    }
44}
45
46/// A builder for [`GetTaskInput`](crate::operation::get_task::GetTaskInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetTaskInputBuilder {
50    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
51    pub(crate) queue_id: ::std::option::Option<::std::string::String>,
52    pub(crate) job_id: ::std::option::Option<::std::string::String>,
53    pub(crate) step_id: ::std::option::Option<::std::string::String>,
54    pub(crate) task_id: ::std::option::Option<::std::string::String>,
55}
56impl GetTaskInputBuilder {
57    /// <p>The farm ID of the farm connected to the task.</p>
58    /// This field is required.
59    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.farm_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The farm ID of the farm connected to the task.</p>
64    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.farm_id = input;
66        self
67    }
68    /// <p>The farm ID of the farm connected to the task.</p>
69    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.farm_id
71    }
72    /// <p>The queue ID for the queue connected to the task.</p>
73    /// This field is required.
74    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.queue_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The queue ID for the queue connected to the task.</p>
79    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.queue_id = input;
81        self
82    }
83    /// <p>The queue ID for the queue connected to the task.</p>
84    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.queue_id
86    }
87    /// <p>The job ID of the job connected to the task.</p>
88    /// This field is required.
89    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.job_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The job ID of the job connected to the task.</p>
94    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.job_id = input;
96        self
97    }
98    /// <p>The job ID of the job connected to the task.</p>
99    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.job_id
101    }
102    /// <p>The step ID for the step connected to the task.</p>
103    /// This field is required.
104    pub fn step_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.step_id = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The step ID for the step connected to the task.</p>
109    pub fn set_step_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.step_id = input;
111        self
112    }
113    /// <p>The step ID for the step connected to the task.</p>
114    pub fn get_step_id(&self) -> &::std::option::Option<::std::string::String> {
115        &self.step_id
116    }
117    /// <p>The task ID.</p>
118    /// This field is required.
119    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.task_id = ::std::option::Option::Some(input.into());
121        self
122    }
123    /// <p>The task ID.</p>
124    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.task_id = input;
126        self
127    }
128    /// <p>The task ID.</p>
129    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
130        &self.task_id
131    }
132    /// Consumes the builder and constructs a [`GetTaskInput`](crate::operation::get_task::GetTaskInput).
133    pub fn build(self) -> ::std::result::Result<crate::operation::get_task::GetTaskInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::get_task::GetTaskInput {
135            farm_id: self.farm_id,
136            queue_id: self.queue_id,
137            job_id: self.job_id,
138            step_id: self.step_id,
139            task_id: self.task_id,
140        })
141    }
142}