aws-sdk-quicksight 1.131.0

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

/// <p>A <i>sheet</i>, which is an object that contains a set of visuals that are viewed together on one page in Quick Sight. Every analysis and dashboard contains at least one sheet. Each sheet contains at least one visualization widget, for example a chart, pivot table, or narrative insight. Sheets can be associated with other components, such as controls, filters, and so on.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Sheet {
    /// <p>The unique identifier associated with a sheet.</p>
    pub sheet_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of a sheet. This name is displayed on the sheet's tab in the Quick Sight console.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A list of images on a sheet.</p>
    pub images: ::std::option::Option<::std::vec::Vec<crate::types::SheetImage>>,
}
impl Sheet {
    /// <p>The unique identifier associated with a sheet.</p>
    pub fn sheet_id(&self) -> ::std::option::Option<&str> {
        self.sheet_id.as_deref()
    }
    /// <p>The name of a sheet. This name is displayed on the sheet's tab in the Quick Sight console.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A list of images on a sheet.</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 `.images.is_none()`.
    pub fn images(&self) -> &[crate::types::SheetImage] {
        self.images.as_deref().unwrap_or_default()
    }
}
impl Sheet {
    /// Creates a new builder-style object to manufacture [`Sheet`](crate::types::Sheet).
    pub fn builder() -> crate::types::builders::SheetBuilder {
        crate::types::builders::SheetBuilder::default()
    }
}

/// A builder for [`Sheet`](crate::types::Sheet).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SheetBuilder {
    pub(crate) sheet_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) images: ::std::option::Option<::std::vec::Vec<crate::types::SheetImage>>,
}
impl SheetBuilder {
    /// <p>The unique identifier associated with a sheet.</p>
    pub fn sheet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sheet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier associated with a sheet.</p>
    pub fn set_sheet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sheet_id = input;
        self
    }
    /// <p>The unique identifier associated with a sheet.</p>
    pub fn get_sheet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.sheet_id
    }
    /// <p>The name of a sheet. This name is displayed on the sheet's tab in the Quick Sight console.</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>The name of a sheet. This name is displayed on the sheet's tab in the Quick Sight console.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of a sheet. This name is displayed on the sheet's tab in the Quick Sight console.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `images`.
    ///
    /// To override the contents of this collection use [`set_images`](Self::set_images).
    ///
    /// <p>A list of images on a sheet.</p>
    pub fn images(mut self, input: crate::types::SheetImage) -> Self {
        let mut v = self.images.unwrap_or_default();
        v.push(input);
        self.images = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of images on a sheet.</p>
    pub fn set_images(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SheetImage>>) -> Self {
        self.images = input;
        self
    }
    /// <p>A list of images on a sheet.</p>
    pub fn get_images(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SheetImage>> {
        &self.images
    }
    /// Consumes the builder and constructs a [`Sheet`](crate::types::Sheet).
    pub fn build(self) -> crate::types::Sheet {
        crate::types::Sheet {
            sheet_id: self.sheet_id,
            name: self.name,
            images: self.images,
        }
    }
}