Skip to main content

aws_sdk_m2/operation/get_batch_job_execution/
_get_batch_job_execution_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 GetBatchJobExecutionOutput {
6    /// <p>The unique identifier for this batch job execution.</p>
7    pub execution_id: ::std::string::String,
8    /// <p>The identifier of the application.</p>
9    pub application_id: ::std::string::String,
10    /// <p>The unique identifier for this batch job.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12    /// <p>The name of this batch job.</p>
13    pub job_name: ::std::option::Option<::std::string::String>,
14    /// <p>The user for the job.</p>
15    pub job_user: ::std::option::Option<::std::string::String>,
16    /// <p>The type of job.</p>
17    pub job_type: ::std::option::Option<crate::types::BatchJobType>,
18    /// <p>The status of the batch job execution.</p>
19    pub status: crate::types::BatchJobExecutionStatus,
20    /// <p>The timestamp when the batch job execution started.</p>
21    pub start_time: ::aws_smithy_types::DateTime,
22    /// <p>The timestamp when the batch job execution ended.</p>
23    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>The reason for the reported status.</p>
25    pub status_reason: ::std::option::Option<::std::string::String>,
26    /// <p>The batch job return code from either the Blu Age or Micro Focus runtime engines. For more information, see <a href="https://www.ibm.com/docs/en/was/8.5.5?topic=model-batch-return-codes">Batch return codes</a> in the <i>IBM WebSphere Application Server</i> documentation.</p>
27    pub return_code: ::std::option::Option<::std::string::String>,
28    /// <p>The unique identifier of this batch job.</p>
29    pub batch_job_identifier: ::std::option::Option<crate::types::BatchJobIdentifier>,
30    /// <p>The step/procedure step information for the restart batch job operation.</p>
31    pub job_step_restart_marker: ::std::option::Option<crate::types::JobStepRestartMarker>,
32    _request_id: Option<String>,
33}
34impl GetBatchJobExecutionOutput {
35    /// <p>The unique identifier for this batch job execution.</p>
36    pub fn execution_id(&self) -> &str {
37        use std::ops::Deref;
38        self.execution_id.deref()
39    }
40    /// <p>The identifier of the application.</p>
41    pub fn application_id(&self) -> &str {
42        use std::ops::Deref;
43        self.application_id.deref()
44    }
45    /// <p>The unique identifier for this batch job.</p>
46    pub fn job_id(&self) -> ::std::option::Option<&str> {
47        self.job_id.as_deref()
48    }
49    /// <p>The name of this batch job.</p>
50    pub fn job_name(&self) -> ::std::option::Option<&str> {
51        self.job_name.as_deref()
52    }
53    /// <p>The user for the job.</p>
54    pub fn job_user(&self) -> ::std::option::Option<&str> {
55        self.job_user.as_deref()
56    }
57    /// <p>The type of job.</p>
58    pub fn job_type(&self) -> ::std::option::Option<&crate::types::BatchJobType> {
59        self.job_type.as_ref()
60    }
61    /// <p>The status of the batch job execution.</p>
62    pub fn status(&self) -> &crate::types::BatchJobExecutionStatus {
63        &self.status
64    }
65    /// <p>The timestamp when the batch job execution started.</p>
66    pub fn start_time(&self) -> &::aws_smithy_types::DateTime {
67        &self.start_time
68    }
69    /// <p>The timestamp when the batch job execution ended.</p>
70    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
71        self.end_time.as_ref()
72    }
73    /// <p>The reason for the reported status.</p>
74    pub fn status_reason(&self) -> ::std::option::Option<&str> {
75        self.status_reason.as_deref()
76    }
77    /// <p>The batch job return code from either the Blu Age or Micro Focus runtime engines. For more information, see <a href="https://www.ibm.com/docs/en/was/8.5.5?topic=model-batch-return-codes">Batch return codes</a> in the <i>IBM WebSphere Application Server</i> documentation.</p>
78    pub fn return_code(&self) -> ::std::option::Option<&str> {
79        self.return_code.as_deref()
80    }
81    /// <p>The unique identifier of this batch job.</p>
82    pub fn batch_job_identifier(&self) -> ::std::option::Option<&crate::types::BatchJobIdentifier> {
83        self.batch_job_identifier.as_ref()
84    }
85    /// <p>The step/procedure step information for the restart batch job operation.</p>
86    pub fn job_step_restart_marker(&self) -> ::std::option::Option<&crate::types::JobStepRestartMarker> {
87        self.job_step_restart_marker.as_ref()
88    }
89}
90impl ::aws_types::request_id::RequestId for GetBatchJobExecutionOutput {
91    fn request_id(&self) -> Option<&str> {
92        self._request_id.as_deref()
93    }
94}
95impl GetBatchJobExecutionOutput {
96    /// Creates a new builder-style object to manufacture [`GetBatchJobExecutionOutput`](crate::operation::get_batch_job_execution::GetBatchJobExecutionOutput).
97    pub fn builder() -> crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder {
98        crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder::default()
99    }
100}
101
102/// A builder for [`GetBatchJobExecutionOutput`](crate::operation::get_batch_job_execution::GetBatchJobExecutionOutput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct GetBatchJobExecutionOutputBuilder {
106    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
107    pub(crate) application_id: ::std::option::Option<::std::string::String>,
108    pub(crate) job_id: ::std::option::Option<::std::string::String>,
109    pub(crate) job_name: ::std::option::Option<::std::string::String>,
110    pub(crate) job_user: ::std::option::Option<::std::string::String>,
111    pub(crate) job_type: ::std::option::Option<crate::types::BatchJobType>,
112    pub(crate) status: ::std::option::Option<crate::types::BatchJobExecutionStatus>,
113    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
114    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
115    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
116    pub(crate) return_code: ::std::option::Option<::std::string::String>,
117    pub(crate) batch_job_identifier: ::std::option::Option<crate::types::BatchJobIdentifier>,
118    pub(crate) job_step_restart_marker: ::std::option::Option<crate::types::JobStepRestartMarker>,
119    _request_id: Option<String>,
120}
121impl GetBatchJobExecutionOutputBuilder {
122    /// <p>The unique identifier for this batch job execution.</p>
123    /// This field is required.
124    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.execution_id = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The unique identifier for this batch job execution.</p>
129    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.execution_id = input;
131        self
132    }
133    /// <p>The unique identifier for this batch job execution.</p>
134    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
135        &self.execution_id
136    }
137    /// <p>The identifier of the application.</p>
138    /// This field is required.
139    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.application_id = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The identifier of the application.</p>
144    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.application_id = input;
146        self
147    }
148    /// <p>The identifier of the application.</p>
149    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
150        &self.application_id
151    }
152    /// <p>The unique identifier for this batch job.</p>
153    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.job_id = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The unique identifier for this batch job.</p>
158    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.job_id = input;
160        self
161    }
162    /// <p>The unique identifier for this batch job.</p>
163    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
164        &self.job_id
165    }
166    /// <p>The name of this batch job.</p>
167    pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.job_name = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <p>The name of this batch job.</p>
172    pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.job_name = input;
174        self
175    }
176    /// <p>The name of this batch job.</p>
177    pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
178        &self.job_name
179    }
180    /// <p>The user for the job.</p>
181    pub fn job_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.job_user = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>The user for the job.</p>
186    pub fn set_job_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.job_user = input;
188        self
189    }
190    /// <p>The user for the job.</p>
191    pub fn get_job_user(&self) -> &::std::option::Option<::std::string::String> {
192        &self.job_user
193    }
194    /// <p>The type of job.</p>
195    pub fn job_type(mut self, input: crate::types::BatchJobType) -> Self {
196        self.job_type = ::std::option::Option::Some(input);
197        self
198    }
199    /// <p>The type of job.</p>
200    pub fn set_job_type(mut self, input: ::std::option::Option<crate::types::BatchJobType>) -> Self {
201        self.job_type = input;
202        self
203    }
204    /// <p>The type of job.</p>
205    pub fn get_job_type(&self) -> &::std::option::Option<crate::types::BatchJobType> {
206        &self.job_type
207    }
208    /// <p>The status of the batch job execution.</p>
209    /// This field is required.
210    pub fn status(mut self, input: crate::types::BatchJobExecutionStatus) -> Self {
211        self.status = ::std::option::Option::Some(input);
212        self
213    }
214    /// <p>The status of the batch job execution.</p>
215    pub fn set_status(mut self, input: ::std::option::Option<crate::types::BatchJobExecutionStatus>) -> Self {
216        self.status = input;
217        self
218    }
219    /// <p>The status of the batch job execution.</p>
220    pub fn get_status(&self) -> &::std::option::Option<crate::types::BatchJobExecutionStatus> {
221        &self.status
222    }
223    /// <p>The timestamp when the batch job execution started.</p>
224    /// This field is required.
225    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
226        self.start_time = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>The timestamp when the batch job execution started.</p>
230    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
231        self.start_time = input;
232        self
233    }
234    /// <p>The timestamp when the batch job execution started.</p>
235    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
236        &self.start_time
237    }
238    /// <p>The timestamp when the batch job execution ended.</p>
239    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
240        self.end_time = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>The timestamp when the batch job execution ended.</p>
244    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
245        self.end_time = input;
246        self
247    }
248    /// <p>The timestamp when the batch job execution ended.</p>
249    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
250        &self.end_time
251    }
252    /// <p>The reason for the reported status.</p>
253    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        self.status_reason = ::std::option::Option::Some(input.into());
255        self
256    }
257    /// <p>The reason for the reported status.</p>
258    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.status_reason = input;
260        self
261    }
262    /// <p>The reason for the reported status.</p>
263    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
264        &self.status_reason
265    }
266    /// <p>The batch job return code from either the Blu Age or Micro Focus runtime engines. For more information, see <a href="https://www.ibm.com/docs/en/was/8.5.5?topic=model-batch-return-codes">Batch return codes</a> in the <i>IBM WebSphere Application Server</i> documentation.</p>
267    pub fn return_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268        self.return_code = ::std::option::Option::Some(input.into());
269        self
270    }
271    /// <p>The batch job return code from either the Blu Age or Micro Focus runtime engines. For more information, see <a href="https://www.ibm.com/docs/en/was/8.5.5?topic=model-batch-return-codes">Batch return codes</a> in the <i>IBM WebSphere Application Server</i> documentation.</p>
272    pub fn set_return_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.return_code = input;
274        self
275    }
276    /// <p>The batch job return code from either the Blu Age or Micro Focus runtime engines. For more information, see <a href="https://www.ibm.com/docs/en/was/8.5.5?topic=model-batch-return-codes">Batch return codes</a> in the <i>IBM WebSphere Application Server</i> documentation.</p>
277    pub fn get_return_code(&self) -> &::std::option::Option<::std::string::String> {
278        &self.return_code
279    }
280    /// <p>The unique identifier of this batch job.</p>
281    pub fn batch_job_identifier(mut self, input: crate::types::BatchJobIdentifier) -> Self {
282        self.batch_job_identifier = ::std::option::Option::Some(input);
283        self
284    }
285    /// <p>The unique identifier of this batch job.</p>
286    pub fn set_batch_job_identifier(mut self, input: ::std::option::Option<crate::types::BatchJobIdentifier>) -> Self {
287        self.batch_job_identifier = input;
288        self
289    }
290    /// <p>The unique identifier of this batch job.</p>
291    pub fn get_batch_job_identifier(&self) -> &::std::option::Option<crate::types::BatchJobIdentifier> {
292        &self.batch_job_identifier
293    }
294    /// <p>The step/procedure step information for the restart batch job operation.</p>
295    pub fn job_step_restart_marker(mut self, input: crate::types::JobStepRestartMarker) -> Self {
296        self.job_step_restart_marker = ::std::option::Option::Some(input);
297        self
298    }
299    /// <p>The step/procedure step information for the restart batch job operation.</p>
300    pub fn set_job_step_restart_marker(mut self, input: ::std::option::Option<crate::types::JobStepRestartMarker>) -> Self {
301        self.job_step_restart_marker = input;
302        self
303    }
304    /// <p>The step/procedure step information for the restart batch job operation.</p>
305    pub fn get_job_step_restart_marker(&self) -> &::std::option::Option<crate::types::JobStepRestartMarker> {
306        &self.job_step_restart_marker
307    }
308    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
309        self._request_id = Some(request_id.into());
310        self
311    }
312
313    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
314        self._request_id = request_id;
315        self
316    }
317    /// Consumes the builder and constructs a [`GetBatchJobExecutionOutput`](crate::operation::get_batch_job_execution::GetBatchJobExecutionOutput).
318    /// This method will fail if any of the following fields are not set:
319    /// - [`execution_id`](crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder::execution_id)
320    /// - [`application_id`](crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder::application_id)
321    /// - [`status`](crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder::status)
322    /// - [`start_time`](crate::operation::get_batch_job_execution::builders::GetBatchJobExecutionOutputBuilder::start_time)
323    pub fn build(
324        self,
325    ) -> ::std::result::Result<crate::operation::get_batch_job_execution::GetBatchJobExecutionOutput, ::aws_smithy_types::error::operation::BuildError>
326    {
327        ::std::result::Result::Ok(crate::operation::get_batch_job_execution::GetBatchJobExecutionOutput {
328            execution_id: self.execution_id.ok_or_else(|| {
329                ::aws_smithy_types::error::operation::BuildError::missing_field(
330                    "execution_id",
331                    "execution_id was not specified but it is required when building GetBatchJobExecutionOutput",
332                )
333            })?,
334            application_id: self.application_id.ok_or_else(|| {
335                ::aws_smithy_types::error::operation::BuildError::missing_field(
336                    "application_id",
337                    "application_id was not specified but it is required when building GetBatchJobExecutionOutput",
338                )
339            })?,
340            job_id: self.job_id,
341            job_name: self.job_name,
342            job_user: self.job_user,
343            job_type: self.job_type,
344            status: self.status.ok_or_else(|| {
345                ::aws_smithy_types::error::operation::BuildError::missing_field(
346                    "status",
347                    "status was not specified but it is required when building GetBatchJobExecutionOutput",
348                )
349            })?,
350            start_time: self.start_time.ok_or_else(|| {
351                ::aws_smithy_types::error::operation::BuildError::missing_field(
352                    "start_time",
353                    "start_time was not specified but it is required when building GetBatchJobExecutionOutput",
354                )
355            })?,
356            end_time: self.end_time,
357            status_reason: self.status_reason,
358            return_code: self.return_code,
359            batch_job_identifier: self.batch_job_identifier,
360            job_step_restart_marker: self.job_step_restart_marker,
361            _request_id: self._request_id,
362        })
363    }
364}