aws-sdk-quicksight 1.136.0

AWS SDK for Amazon QuickSight
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 UpdateSpaceResourcesInput {
    /// <p>The ID of the Amazon Web Services account that contains the space.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the space that you want to update resources for.</p>
    pub space_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of resources to add to the space.</p>
    pub add_resources: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>,
    /// <p>A list of resources to remove from the space.</p>
    pub remove_resources: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>,
}
impl UpdateSpaceResourcesInput {
    /// <p>The ID of the Amazon Web Services account that contains the space.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The ID of the space that you want to update resources for.</p>
    pub fn space_id(&self) -> ::std::option::Option<&str> {
        self.space_id.as_deref()
    }
    /// <p>A list of resources to add to the space.</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 `.add_resources.is_none()`.
    pub fn add_resources(&self) -> &[crate::types::SpaceResourceOperation] {
        self.add_resources.as_deref().unwrap_or_default()
    }
    /// <p>A list of resources to remove from the space.</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 `.remove_resources.is_none()`.
    pub fn remove_resources(&self) -> &[crate::types::SpaceResourceOperation] {
        self.remove_resources.as_deref().unwrap_or_default()
    }
}
impl UpdateSpaceResourcesInput {
    /// Creates a new builder-style object to manufacture [`UpdateSpaceResourcesInput`](crate::operation::update_space_resources::UpdateSpaceResourcesInput).
    pub fn builder() -> crate::operation::update_space_resources::builders::UpdateSpaceResourcesInputBuilder {
        crate::operation::update_space_resources::builders::UpdateSpaceResourcesInputBuilder::default()
    }
}

/// A builder for [`UpdateSpaceResourcesInput`](crate::operation::update_space_resources::UpdateSpaceResourcesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSpaceResourcesInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) add_resources: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>,
    pub(crate) remove_resources: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>,
}
impl UpdateSpaceResourcesInputBuilder {
    /// <p>The ID of the Amazon Web Services account that contains the space.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the space.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the space.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The ID of the space that you want to update resources for.</p>
    /// This field is required.
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the space that you want to update resources for.</p>
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_id = input;
        self
    }
    /// <p>The ID of the space that you want to update resources for.</p>
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_id
    }
    /// Appends an item to `add_resources`.
    ///
    /// To override the contents of this collection use [`set_add_resources`](Self::set_add_resources).
    ///
    /// <p>A list of resources to add to the space.</p>
    pub fn add_resources(mut self, input: crate::types::SpaceResourceOperation) -> Self {
        let mut v = self.add_resources.unwrap_or_default();
        v.push(input);
        self.add_resources = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resources to add to the space.</p>
    pub fn set_add_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>) -> Self {
        self.add_resources = input;
        self
    }
    /// <p>A list of resources to add to the space.</p>
    pub fn get_add_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>> {
        &self.add_resources
    }
    /// Appends an item to `remove_resources`.
    ///
    /// To override the contents of this collection use [`set_remove_resources`](Self::set_remove_resources).
    ///
    /// <p>A list of resources to remove from the space.</p>
    pub fn remove_resources(mut self, input: crate::types::SpaceResourceOperation) -> Self {
        let mut v = self.remove_resources.unwrap_or_default();
        v.push(input);
        self.remove_resources = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resources to remove from the space.</p>
    pub fn set_remove_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>>) -> Self {
        self.remove_resources = input;
        self
    }
    /// <p>A list of resources to remove from the space.</p>
    pub fn get_remove_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SpaceResourceOperation>> {
        &self.remove_resources
    }
    /// Consumes the builder and constructs a [`UpdateSpaceResourcesInput`](crate::operation::update_space_resources::UpdateSpaceResourcesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_space_resources::UpdateSpaceResourcesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_space_resources::UpdateSpaceResourcesInput {
            aws_account_id: self.aws_account_id,
            space_id: self.space_id,
            add_resources: self.add_resources,
            remove_resources: self.remove_resources,
        })
    }
}