aws_sdk_m2/types/
_restart_batch_job_identifier.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RestartBatchJobIdentifier {
7 pub execution_id: ::std::string::String,
9 pub job_step_restart_marker: ::std::option::Option<crate::types::JobStepRestartMarker>,
11}
12impl RestartBatchJobIdentifier {
13 pub fn execution_id(&self) -> &str {
15 use std::ops::Deref;
16 self.execution_id.deref()
17 }
18 pub fn job_step_restart_marker(&self) -> ::std::option::Option<&crate::types::JobStepRestartMarker> {
20 self.job_step_restart_marker.as_ref()
21 }
22}
23impl RestartBatchJobIdentifier {
24 pub fn builder() -> crate::types::builders::RestartBatchJobIdentifierBuilder {
26 crate::types::builders::RestartBatchJobIdentifierBuilder::default()
27 }
28}
29
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct RestartBatchJobIdentifierBuilder {
34 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
35 pub(crate) job_step_restart_marker: ::std::option::Option<crate::types::JobStepRestartMarker>,
36}
37impl RestartBatchJobIdentifierBuilder {
38 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.execution_id = ::std::option::Option::Some(input.into());
42 self
43 }
44 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.execution_id = input;
47 self
48 }
49 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
51 &self.execution_id
52 }
53 pub fn job_step_restart_marker(mut self, input: crate::types::JobStepRestartMarker) -> Self {
56 self.job_step_restart_marker = ::std::option::Option::Some(input);
57 self
58 }
59 pub fn set_job_step_restart_marker(mut self, input: ::std::option::Option<crate::types::JobStepRestartMarker>) -> Self {
61 self.job_step_restart_marker = input;
62 self
63 }
64 pub fn get_job_step_restart_marker(&self) -> &::std::option::Option<crate::types::JobStepRestartMarker> {
66 &self.job_step_restart_marker
67 }
68 pub fn build(self) -> ::std::result::Result<crate::types::RestartBatchJobIdentifier, ::aws_smithy_types::error::operation::BuildError> {
72 ::std::result::Result::Ok(crate::types::RestartBatchJobIdentifier {
73 execution_id: self.execution_id.ok_or_else(|| {
74 ::aws_smithy_types::error::operation::BuildError::missing_field(
75 "execution_id",
76 "execution_id was not specified but it is required when building RestartBatchJobIdentifier",
77 )
78 })?,
79 job_step_restart_marker: self.job_step_restart_marker,
80 })
81 }
82}