aws-sdk-connect 1.171.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DisassociateWorkspaceOutput {
    /// <p>A list of resources that were successfully disassociated from the workspace.</p>
    pub successful_list: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>>,
    /// <p>A list of resources that failed to be disassociated from the workspace, including error details.</p>
    pub failed_list: ::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>>,
    _request_id: Option<String>,
}
impl DisassociateWorkspaceOutput {
    /// <p>A list of resources that were successfully disassociated from the workspace.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.successful_list.is_none()`.
    pub fn successful_list(&self) -> &[crate::types::SuccessfulBatchAssociationSummary] {
        self.successful_list.as_deref().unwrap_or_default()
    }
    /// <p>A list of resources that failed to be disassociated from the workspace, including error details.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.failed_list.is_none()`.
    pub fn failed_list(&self) -> &[crate::types::FailedBatchAssociationSummary] {
        self.failed_list.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DisassociateWorkspaceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DisassociateWorkspaceOutput {
    /// Creates a new builder-style object to manufacture [`DisassociateWorkspaceOutput`](crate::operation::disassociate_workspace::DisassociateWorkspaceOutput).
    pub fn builder() -> crate::operation::disassociate_workspace::builders::DisassociateWorkspaceOutputBuilder {
        crate::operation::disassociate_workspace::builders::DisassociateWorkspaceOutputBuilder::default()
    }
}

/// A builder for [`DisassociateWorkspaceOutput`](crate::operation::disassociate_workspace::DisassociateWorkspaceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateWorkspaceOutputBuilder {
    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 DisassociateWorkspaceOutputBuilder {
    /// Appends an item to `successful_list`.
    ///
    /// To override the contents of this collection use [`set_successful_list`](Self::set_successful_list).
    ///
    /// <p>A list of resources that were successfully disassociated from the workspace.</p>
    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
    }
    /// <p>A list of resources that were successfully disassociated from the workspace.</p>
    pub fn set_successful_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>>) -> Self {
        self.successful_list = input;
        self
    }
    /// <p>A list of resources that were successfully disassociated from the workspace.</p>
    pub fn get_successful_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SuccessfulBatchAssociationSummary>> {
        &self.successful_list
    }
    /// Appends an item to `failed_list`.
    ///
    /// To override the contents of this collection use [`set_failed_list`](Self::set_failed_list).
    ///
    /// <p>A list of resources that failed to be disassociated from the workspace, including error details.</p>
    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
    }
    /// <p>A list of resources that failed to be disassociated from the workspace, including error details.</p>
    pub fn set_failed_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedBatchAssociationSummary>>) -> Self {
        self.failed_list = input;
        self
    }
    /// <p>A list of resources that failed to be disassociated from the workspace, including error details.</p>
    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
    }
    /// Consumes the builder and constructs a [`DisassociateWorkspaceOutput`](crate::operation::disassociate_workspace::DisassociateWorkspaceOutput).
    pub fn build(self) -> crate::operation::disassociate_workspace::DisassociateWorkspaceOutput {
        crate::operation::disassociate_workspace::DisassociateWorkspaceOutput {
            successful_list: self.successful_list,
            failed_list: self.failed_list,
            _request_id: self._request_id,
        }
    }
}