aws_sdk_deadline/operation/get_job/
_get_job_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 GetJobInput {
6    /// <p>The farm ID of the farm in the job.</p>
7    pub farm_id: ::std::option::Option<::std::string::String>,
8    /// <p>The queue ID associated with the job.</p>
9    pub queue_id: ::std::option::Option<::std::string::String>,
10    /// <p>The job ID.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12}
13impl GetJobInput {
14    /// <p>The farm ID of the farm in the job.</p>
15    pub fn farm_id(&self) -> ::std::option::Option<&str> {
16        self.farm_id.as_deref()
17    }
18    /// <p>The queue ID associated with the job.</p>
19    pub fn queue_id(&self) -> ::std::option::Option<&str> {
20        self.queue_id.as_deref()
21    }
22    /// <p>The job ID.</p>
23    pub fn job_id(&self) -> ::std::option::Option<&str> {
24        self.job_id.as_deref()
25    }
26}
27impl GetJobInput {
28    /// Creates a new builder-style object to manufacture [`GetJobInput`](crate::operation::get_job::GetJobInput).
29    pub fn builder() -> crate::operation::get_job::builders::GetJobInputBuilder {
30        crate::operation::get_job::builders::GetJobInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetJobInput`](crate::operation::get_job::GetJobInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetJobInputBuilder {
38    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
39    pub(crate) queue_id: ::std::option::Option<::std::string::String>,
40    pub(crate) job_id: ::std::option::Option<::std::string::String>,
41}
42impl GetJobInputBuilder {
43    /// <p>The farm ID of the farm in the job.</p>
44    /// This field is required.
45    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.farm_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The farm ID of the farm in the job.</p>
50    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.farm_id = input;
52        self
53    }
54    /// <p>The farm ID of the farm in the job.</p>
55    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.farm_id
57    }
58    /// <p>The queue ID associated with the job.</p>
59    /// This field is required.
60    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.queue_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The queue ID associated with the job.</p>
65    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.queue_id = input;
67        self
68    }
69    /// <p>The queue ID associated with the job.</p>
70    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.queue_id
72    }
73    /// <p>The job ID.</p>
74    /// This field is required.
75    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.job_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The job ID.</p>
80    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.job_id = input;
82        self
83    }
84    /// <p>The job ID.</p>
85    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.job_id
87    }
88    /// Consumes the builder and constructs a [`GetJobInput`](crate::operation::get_job::GetJobInput).
89    pub fn build(self) -> ::std::result::Result<crate::operation::get_job::GetJobInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::get_job::GetJobInput {
91            farm_id: self.farm_id,
92            queue_id: self.queue_id,
93            job_id: self.job_id,
94        })
95    }
96}