aws_sdk_batch/operation/submit_job/
_submit_job_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, ::std::fmt::Debug)]
5pub struct SubmitJobOutput {
6    /// <p>The Amazon Resource Name (ARN) for the job.</p>
7    pub job_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the job.</p>
9    pub job_name: ::std::option::Option<::std::string::String>,
10    /// <p>The unique identifier for the job.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl SubmitJobOutput {
15    /// <p>The Amazon Resource Name (ARN) for the job.</p>
16    pub fn job_arn(&self) -> ::std::option::Option<&str> {
17        self.job_arn.as_deref()
18    }
19    /// <p>The name of the job.</p>
20    pub fn job_name(&self) -> ::std::option::Option<&str> {
21        self.job_name.as_deref()
22    }
23    /// <p>The unique identifier for the job.</p>
24    pub fn job_id(&self) -> ::std::option::Option<&str> {
25        self.job_id.as_deref()
26    }
27}
28impl ::aws_types::request_id::RequestId for SubmitJobOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl SubmitJobOutput {
34    /// Creates a new builder-style object to manufacture [`SubmitJobOutput`](crate::operation::submit_job::SubmitJobOutput).
35    pub fn builder() -> crate::operation::submit_job::builders::SubmitJobOutputBuilder {
36        crate::operation::submit_job::builders::SubmitJobOutputBuilder::default()
37    }
38}
39
40/// A builder for [`SubmitJobOutput`](crate::operation::submit_job::SubmitJobOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SubmitJobOutputBuilder {
44    pub(crate) job_arn: ::std::option::Option<::std::string::String>,
45    pub(crate) job_name: ::std::option::Option<::std::string::String>,
46    pub(crate) job_id: ::std::option::Option<::std::string::String>,
47    _request_id: Option<String>,
48}
49impl SubmitJobOutputBuilder {
50    /// <p>The Amazon Resource Name (ARN) for the job.</p>
51    pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.job_arn = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) for the job.</p>
56    pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.job_arn = input;
58        self
59    }
60    /// <p>The Amazon Resource Name (ARN) for the job.</p>
61    pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
62        &self.job_arn
63    }
64    /// <p>The name of the job.</p>
65    /// This field is required.
66    pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.job_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the job.</p>
71    pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.job_name = input;
73        self
74    }
75    /// <p>The name of the job.</p>
76    pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.job_name
78    }
79    /// <p>The unique identifier for the job.</p>
80    /// This field is required.
81    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.job_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The unique identifier for the job.</p>
86    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.job_id = input;
88        self
89    }
90    /// <p>The unique identifier for the job.</p>
91    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.job_id
93    }
94    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
95        self._request_id = Some(request_id.into());
96        self
97    }
98
99    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
100        self._request_id = request_id;
101        self
102    }
103    /// Consumes the builder and constructs a [`SubmitJobOutput`](crate::operation::submit_job::SubmitJobOutput).
104    pub fn build(self) -> crate::operation::submit_job::SubmitJobOutput {
105        crate::operation::submit_job::SubmitJobOutput {
106            job_arn: self.job_arn,
107            job_name: self.job_name,
108            job_id: self.job_id,
109            _request_id: self._request_id,
110        }
111    }
112}