aws-sdk-quicksight 1.130.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A folder in Quick Sight.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Folder {
    /// <p>The ID of the folder.</p>
    pub folder_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) for the folder.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>A display name for the folder.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of folder it is.</p>
    pub folder_type: ::std::option::Option<crate::types::FolderType>,
    /// <p>An array of ancestor ARN strings for the folder.</p>
    pub folder_path: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The time that the folder was created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time that the folder was last updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The sharing scope of the folder.</p>
    pub sharing_model: ::std::option::Option<crate::types::SharingModel>,
}
impl Folder {
    /// <p>The ID of the folder.</p>
    pub fn folder_id(&self) -> ::std::option::Option<&str> {
        self.folder_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) for the folder.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>A display name for the folder.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of folder it is.</p>
    pub fn folder_type(&self) -> ::std::option::Option<&crate::types::FolderType> {
        self.folder_type.as_ref()
    }
    /// <p>An array of ancestor ARN strings for the folder.</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 `.folder_path.is_none()`.
    pub fn folder_path(&self) -> &[::std::string::String] {
        self.folder_path.as_deref().unwrap_or_default()
    }
    /// <p>The time that the folder was created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
    /// <p>The time that the folder was last updated.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>The sharing scope of the folder.</p>
    pub fn sharing_model(&self) -> ::std::option::Option<&crate::types::SharingModel> {
        self.sharing_model.as_ref()
    }
}
impl Folder {
    /// Creates a new builder-style object to manufacture [`Folder`](crate::types::Folder).
    pub fn builder() -> crate::types::builders::FolderBuilder {
        crate::types::builders::FolderBuilder::default()
    }
}

/// A builder for [`Folder`](crate::types::Folder).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FolderBuilder {
    pub(crate) folder_id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) folder_type: ::std::option::Option<crate::types::FolderType>,
    pub(crate) folder_path: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) sharing_model: ::std::option::Option<crate::types::SharingModel>,
}
impl FolderBuilder {
    /// <p>The ID of the folder.</p>
    pub fn folder_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.folder_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the folder.</p>
    pub fn set_folder_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.folder_id = input;
        self
    }
    /// <p>The ID of the folder.</p>
    pub fn get_folder_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.folder_id
    }
    /// <p>The Amazon Resource Name (ARN) for the folder.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the folder.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the folder.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>A display name for the folder.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A display name for the folder.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A display name for the folder.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of folder it is.</p>
    pub fn folder_type(mut self, input: crate::types::FolderType) -> Self {
        self.folder_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of folder it is.</p>
    pub fn set_folder_type(mut self, input: ::std::option::Option<crate::types::FolderType>) -> Self {
        self.folder_type = input;
        self
    }
    /// <p>The type of folder it is.</p>
    pub fn get_folder_type(&self) -> &::std::option::Option<crate::types::FolderType> {
        &self.folder_type
    }
    /// Appends an item to `folder_path`.
    ///
    /// To override the contents of this collection use [`set_folder_path`](Self::set_folder_path).
    ///
    /// <p>An array of ancestor ARN strings for the folder.</p>
    pub fn folder_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.folder_path.unwrap_or_default();
        v.push(input.into());
        self.folder_path = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of ancestor ARN strings for the folder.</p>
    pub fn set_folder_path(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.folder_path = input;
        self
    }
    /// <p>An array of ancestor ARN strings for the folder.</p>
    pub fn get_folder_path(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.folder_path
    }
    /// <p>The time that the folder was created.</p>
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the folder was created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>The time that the folder was created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The time that the folder was last updated.</p>
    pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that the folder was last updated.</p>
    pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_time = input;
        self
    }
    /// <p>The time that the folder was last updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>The sharing scope of the folder.</p>
    pub fn sharing_model(mut self, input: crate::types::SharingModel) -> Self {
        self.sharing_model = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sharing scope of the folder.</p>
    pub fn set_sharing_model(mut self, input: ::std::option::Option<crate::types::SharingModel>) -> Self {
        self.sharing_model = input;
        self
    }
    /// <p>The sharing scope of the folder.</p>
    pub fn get_sharing_model(&self) -> &::std::option::Option<crate::types::SharingModel> {
        &self.sharing_model
    }
    /// Consumes the builder and constructs a [`Folder`](crate::types::Folder).
    pub fn build(self) -> crate::types::Folder {
        crate::types::Folder {
            folder_id: self.folder_id,
            arn: self.arn,
            name: self.name,
            folder_type: self.folder_type,
            folder_path: self.folder_path,
            created_time: self.created_time,
            last_updated_time: self.last_updated_time,
            sharing_model: self.sharing_model,
        }
    }
}