#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateWorkspaceOutput {
pub successful_list: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>>,
pub failed_list: ::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>>,
_request_id: Option<String>,
}
impl AssociateWorkspaceOutput {
pub fn successful_list(&self) -> &[crate::types::SuccessfulBatchAssociationSummary] {
self.successful_list.as_deref().unwrap_or_default()
}
pub fn failed_list(&self) -> &[crate::types::FailedBatchAssociationSummary] {
self.failed_list.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for AssociateWorkspaceOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl AssociateWorkspaceOutput {
pub fn builder() -> crate::operation::associate_workspace::builders::AssociateWorkspaceOutputBuilder {
crate::operation::associate_workspace::builders::AssociateWorkspaceOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateWorkspaceOutputBuilder {
pub(crate) successful_list: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>>,
pub(crate) failed_list: ::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>>,
_request_id: Option<String>,
}
impl AssociateWorkspaceOutputBuilder {
pub fn successful_list(mut self, input: crate::types::SuccessfulBatchAssociationSummary) -> Self {
let mut v = self.successful_list.unwrap_or_default();
v.push(input);
self.successful_list = ::std::option::Option::Some(v);
self
}
pub fn set_successful_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>>) -> Self {
self.successful_list = input;
self
}
pub fn get_successful_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>> {
&self.successful_list
}
pub fn failed_list(mut self, input: crate::types::FailedBatchAssociationSummary) -> Self {
let mut v = self.failed_list.unwrap_or_default();
v.push(input);
self.failed_list = ::std::option::Option::Some(v);
self
}
pub fn set_failed_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>>) -> Self {
self.failed_list = input;
self
}
pub fn get_failed_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>> {
&self.failed_list
}
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) -> crate::operation::associate_workspace::AssociateWorkspaceOutput {
crate::operation::associate_workspace::AssociateWorkspaceOutput {
successful_list: self.successful_list,
failed_list: self.failed_list,
_request_id: self._request_id,
}
}
}