aws-sdk-quicksight 1.129.0

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

/// <p>Dashboard.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Dashboard {
    /// <p>Dashboard ID.</p>
    pub dashboard_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>A display name for the dashboard.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Version.</p>
    pub version: ::std::option::Option<crate::types::DashboardVersion>,
    /// <p>The time that this dashboard was created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time that this dashboard was published.</p>
    pub last_published_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last time that this dashboard was updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
    pub link_entities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Dashboard {
    /// <p>Dashboard ID.</p>
    pub fn dashboard_id(&self) -> ::std::option::Option<&str> {
        self.dashboard_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>A display name for the dashboard.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Version.</p>
    pub fn version(&self) -> ::std::option::Option<&crate::types::DashboardVersion> {
        self.version.as_ref()
    }
    /// <p>The time that this dashboard was created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
    /// <p>The last time that this dashboard was published.</p>
    pub fn last_published_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_published_time.as_ref()
    }
    /// <p>The last time that this dashboard was updated.</p>
    pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_time.as_ref()
    }
    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</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 `.link_entities.is_none()`.
    pub fn link_entities(&self) -> &[::std::string::String] {
        self.link_entities.as_deref().unwrap_or_default()
    }
}
impl Dashboard {
    /// Creates a new builder-style object to manufacture [`Dashboard`](crate::types::Dashboard).
    pub fn builder() -> crate::types::builders::DashboardBuilder {
        crate::types::builders::DashboardBuilder::default()
    }
}

/// A builder for [`Dashboard`](crate::types::Dashboard).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DashboardBuilder {
    pub(crate) dashboard_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) version: ::std::option::Option<crate::types::DashboardVersion>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_published_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) link_entities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DashboardBuilder {
    /// <p>Dashboard ID.</p>
    pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dashboard_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Dashboard ID.</p>
    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dashboard_id = input;
        self
    }
    /// <p>Dashboard ID.</p>
    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dashboard_id
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</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) of the resource.</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) of the resource.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>A display name for the dashboard.</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 dashboard.</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 dashboard.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Version.</p>
    pub fn version(mut self, input: crate::types::DashboardVersion) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Version.</p>
    pub fn set_version(mut self, input: ::std::option::Option<crate::types::DashboardVersion>) -> Self {
        self.version = input;
        self
    }
    /// <p>Version.</p>
    pub fn get_version(&self) -> &::std::option::Option<crate::types::DashboardVersion> {
        &self.version
    }
    /// <p>The time that this dashboard 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 this dashboard 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 this dashboard was created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The last time that this dashboard was published.</p>
    pub fn last_published_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_published_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time that this dashboard was published.</p>
    pub fn set_last_published_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_published_time = input;
        self
    }
    /// <p>The last time that this dashboard was published.</p>
    pub fn get_last_published_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_published_time
    }
    /// <p>The last time that this dashboard was 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 last time that this dashboard was 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 last time that this dashboard was updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// Appends an item to `link_entities`.
    ///
    /// To override the contents of this collection use [`set_link_entities`](Self::set_link_entities).
    ///
    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
    pub fn link_entities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.link_entities.unwrap_or_default();
        v.push(input.into());
        self.link_entities = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
    pub fn set_link_entities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.link_entities = input;
        self
    }
    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
    pub fn get_link_entities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.link_entities
    }
    /// Consumes the builder and constructs a [`Dashboard`](crate::types::Dashboard).
    pub fn build(self) -> crate::types::Dashboard {
        crate::types::Dashboard {
            dashboard_id: self.dashboard_id,
            arn: self.arn,
            name: self.name,
            version: self.version,
            created_time: self.created_time,
            last_published_time: self.last_published_time,
            last_updated_time: self.last_updated_time,
            link_entities: self.link_entities,
        }
    }
}