aws-sdk-quicksight 1.133.0

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

/// <p>Summary information about a theme.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Theme {
    /// <p>The Amazon Resource Name (ARN) of the theme.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name that the user gives to the theme.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The identifier that the user gives to the theme.</p>
    pub theme_id: ::std::option::Option<::std::string::String>,
    /// <p>A version of a theme.</p>
    pub version: ::std::option::Option<crate::types::ThemeVersion>,
    /// <p>The date and time that the theme was created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time that the theme was last updated.</p>
    pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The type of theme, based on how it was created. Valid values include: <code>QUICKSIGHT</code> and <code>CUSTOM</code>.</p>
    pub r#type: ::std::option::Option<crate::types::ThemeType>,
}
impl Theme {
    /// <p>The Amazon Resource Name (ARN) of the theme.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name that the user gives to the theme.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The identifier that the user gives to the theme.</p>
    pub fn theme_id(&self) -> ::std::option::Option<&str> {
        self.theme_id.as_deref()
    }
    /// <p>A version of a theme.</p>
    pub fn version(&self) -> ::std::option::Option<&crate::types::ThemeVersion> {
        self.version.as_ref()
    }
    /// <p>The date and time that the theme was created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
    /// <p>The date and time that the theme 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 type of theme, based on how it was created. Valid values include: <code>QUICKSIGHT</code> and <code>CUSTOM</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ThemeType> {
        self.r#type.as_ref()
    }
}
impl Theme {
    /// Creates a new builder-style object to manufacture [`Theme`](crate::types::Theme).
    pub fn builder() -> crate::types::builders::ThemeBuilder {
        crate::types::builders::ThemeBuilder::default()
    }
}

/// A builder for [`Theme`](crate::types::Theme).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThemeBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) theme_id: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<crate::types::ThemeVersion>,
    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) r#type: ::std::option::Option<crate::types::ThemeType>,
}
impl ThemeBuilder {
    /// <p>The Amazon Resource Name (ARN) of the theme.</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 theme.</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 theme.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name that the user gives to the theme.</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 that the user gives to the theme.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name that the user gives to the theme.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The identifier that the user gives to the theme.</p>
    pub fn theme_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.theme_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier that the user gives to the theme.</p>
    pub fn set_theme_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.theme_id = input;
        self
    }
    /// <p>The identifier that the user gives to the theme.</p>
    pub fn get_theme_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.theme_id
    }
    /// <p>A version of a theme.</p>
    pub fn version(mut self, input: crate::types::ThemeVersion) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>A version of a theme.</p>
    pub fn set_version(mut self, input: ::std::option::Option<crate::types::ThemeVersion>) -> Self {
        self.version = input;
        self
    }
    /// <p>A version of a theme.</p>
    pub fn get_version(&self) -> &::std::option::Option<crate::types::ThemeVersion> {
        &self.version
    }
    /// <p>The date and time that the theme 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 date and time that the theme 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 date and time that the theme was created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>The date and time that the theme 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 date and time that the theme 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 date and time that the theme was last updated.</p>
    pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_time
    }
    /// <p>The type of theme, based on how it was created. Valid values include: <code>QUICKSIGHT</code> and <code>CUSTOM</code>.</p>
    pub fn r#type(mut self, input: crate::types::ThemeType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of theme, based on how it was created. Valid values include: <code>QUICKSIGHT</code> and <code>CUSTOM</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ThemeType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of theme, based on how it was created. Valid values include: <code>QUICKSIGHT</code> and <code>CUSTOM</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ThemeType> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`Theme`](crate::types::Theme).
    pub fn build(self) -> crate::types::Theme {
        crate::types::Theme {
            arn: self.arn,
            name: self.name,
            theme_id: self.theme_id,
            version: self.version,
            created_time: self.created_time,
            last_updated_time: self.last_updated_time,
            r#type: self.r#type,
        }
    }
}