#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetJobOutput {
pub jobs: ::std::vec::Vec<crate::types::BatchGetJobItem>,
pub errors: ::std::vec::Vec<crate::types::BatchGetJobError>,
_request_id: Option<String>,
}
impl BatchGetJobOutput {
pub fn jobs(&self) -> &[crate::types::BatchGetJobItem] {
use std::ops::Deref;
self.jobs.deref()
}
pub fn errors(&self) -> &[crate::types::BatchGetJobError] {
use std::ops::Deref;
self.errors.deref()
}
}
impl ::aws_types::request_id::RequestId for BatchGetJobOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl BatchGetJobOutput {
pub fn builder() -> crate::operation::batch_get_job::builders::BatchGetJobOutputBuilder {
crate::operation::batch_get_job::builders::BatchGetJobOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetJobOutputBuilder {
pub(crate) jobs: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetJobItem>>,
pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetJobError>>,
_request_id: Option<String>,
}
impl BatchGetJobOutputBuilder {
pub fn jobs(mut self, input: crate::types::BatchGetJobItem) -> Self {
let mut v = self.jobs.unwrap_or_default();
v.push(input);
self.jobs = ::std::option::Option::Some(v);
self
}
pub fn set_jobs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchGetJobItem>>) -> Self {
self.jobs = input;
self
}
pub fn get_jobs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchGetJobItem>> {
&self.jobs
}
pub fn errors(mut self, input: crate::types::BatchGetJobError) -> 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::BatchGetJobError>>) -> Self {
self.errors = input;
self
}
pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchGetJobError>> {
&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_job::BatchGetJobOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_get_job::BatchGetJobOutput {
jobs: self.jobs.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"jobs",
"jobs was not specified but it is required when building BatchGetJobOutput",
)
})?,
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 BatchGetJobOutput",
)
})?,
_request_id: self._request_id,
})
}
}