#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetStepOutput {
pub steps: ::std::vec::Vec<crate::types::BatchGetStepItem>,
pub errors: ::std::vec::Vec<crate::types::BatchGetStepError>,
_request_id: Option<String>,
}
impl BatchGetStepOutput {
pub fn steps(&self) -> &[crate::types::BatchGetStepItem] {
use std::ops::Deref;
self.steps.deref()
}
pub fn errors(&self) -> &[crate::types::BatchGetStepError] {
use std::ops::Deref;
self.errors.deref()
}
}
impl ::aws_types::request_id::RequestId for BatchGetStepOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl BatchGetStepOutput {
pub fn builder() -> crate::operation::batch_get_step::builders::BatchGetStepOutputBuilder {
crate::operation::batch_get_step::builders::BatchGetStepOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetStepOutputBuilder {
pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepItem>>,
pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepError>>,
_request_id: Option<String>,
}
impl BatchGetStepOutputBuilder {
pub fn steps(mut self, input: crate::types::BatchGetStepItem) -> Self {
let mut v = self.steps.unwrap_or_default();
v.push(input);
self.steps = ::std::option::Option::Some(v);
self
}
pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepItem>>) -> Self {
self.steps = input;
self
}
pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepItem>> {
&self.steps
}
pub fn errors(mut self, input: crate::types::BatchGetStepError) -> Self {
let mut v = self.errors.unwrap_or_default();
v.push(input);
self.errors = ::std::option::Option::Some(v);
self
}
pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepError>>) -> Self {
self.errors = input;
self
}
pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchGetStepError>> {
&self.errors
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::batch_get_step::BatchGetStepOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_get_step::BatchGetStepOutput {
steps: self.steps.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"steps",
"steps was not specified but it is required when building BatchGetStepOutput",
)
})?,
errors: self.errors.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"errors",
"errors was not specified but it is required when building BatchGetStepOutput",
)
})?,
_request_id: self._request_id,
})
}
}