#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Theme {
pub stack_name: ::std::option::Option<::std::string::String>,
pub state: ::std::option::Option<crate::types::ThemeState>,
pub theme_title_text: ::std::option::Option<::std::string::String>,
pub theme_styling: ::std::option::Option<crate::types::ThemeStyling>,
pub theme_footer_links: ::std::option::Option<::std::vec::Vec<crate::types::ThemeFooterLink>>,
pub theme_organization_logo_url: ::std::option::Option<::std::string::String>,
pub theme_favicon_url: ::std::option::Option<::std::string::String>,
pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Theme {
pub fn stack_name(&self) -> ::std::option::Option<&str> {
self.stack_name.as_deref()
}
pub fn state(&self) -> ::std::option::Option<&crate::types::ThemeState> {
self.state.as_ref()
}
pub fn theme_title_text(&self) -> ::std::option::Option<&str> {
self.theme_title_text.as_deref()
}
pub fn theme_styling(&self) -> ::std::option::Option<&crate::types::ThemeStyling> {
self.theme_styling.as_ref()
}
pub fn theme_footer_links(&self) -> &[crate::types::ThemeFooterLink] {
self.theme_footer_links.as_deref().unwrap_or_default()
}
pub fn theme_organization_logo_url(&self) -> ::std::option::Option<&str> {
self.theme_organization_logo_url.as_deref()
}
pub fn theme_favicon_url(&self) -> ::std::option::Option<&str> {
self.theme_favicon_url.as_deref()
}
pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_time.as_ref()
}
}
impl Theme {
pub fn builder() -> crate::types::builders::ThemeBuilder {
crate::types::builders::ThemeBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThemeBuilder {
pub(crate) stack_name: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::ThemeState>,
pub(crate) theme_title_text: ::std::option::Option<::std::string::String>,
pub(crate) theme_styling: ::std::option::Option<crate::types::ThemeStyling>,
pub(crate) theme_footer_links: ::std::option::Option<::std::vec::Vec<crate::types::ThemeFooterLink>>,
pub(crate) theme_organization_logo_url: ::std::option::Option<::std::string::String>,
pub(crate) theme_favicon_url: ::std::option::Option<::std::string::String>,
pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ThemeBuilder {
pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stack_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stack_name = input;
self
}
pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_name
}
pub fn state(mut self, input: crate::types::ThemeState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::ThemeState>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::ThemeState> {
&self.state
}
pub fn theme_title_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.theme_title_text = ::std::option::Option::Some(input.into());
self
}
pub fn set_theme_title_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.theme_title_text = input;
self
}
pub fn get_theme_title_text(&self) -> &::std::option::Option<::std::string::String> {
&self.theme_title_text
}
pub fn theme_styling(mut self, input: crate::types::ThemeStyling) -> Self {
self.theme_styling = ::std::option::Option::Some(input);
self
}
pub fn set_theme_styling(mut self, input: ::std::option::Option<crate::types::ThemeStyling>) -> Self {
self.theme_styling = input;
self
}
pub fn get_theme_styling(&self) -> &::std::option::Option<crate::types::ThemeStyling> {
&self.theme_styling
}
pub fn theme_footer_links(mut self, input: crate::types::ThemeFooterLink) -> Self {
let mut v = self.theme_footer_links.unwrap_or_default();
v.push(input);
self.theme_footer_links = ::std::option::Option::Some(v);
self
}
pub fn set_theme_footer_links(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThemeFooterLink>>) -> Self {
self.theme_footer_links = input;
self
}
pub fn get_theme_footer_links(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThemeFooterLink>> {
&self.theme_footer_links
}
pub fn theme_organization_logo_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.theme_organization_logo_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_theme_organization_logo_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.theme_organization_logo_url = input;
self
}
pub fn get_theme_organization_logo_url(&self) -> &::std::option::Option<::std::string::String> {
&self.theme_organization_logo_url
}
pub fn theme_favicon_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.theme_favicon_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_theme_favicon_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.theme_favicon_url = input;
self
}
pub fn get_theme_favicon_url(&self) -> &::std::option::Option<::std::string::String> {
&self.theme_favicon_url
}
pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_time = ::std::option::Option::Some(input);
self
}
pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_time = input;
self
}
pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_time
}
pub fn build(self) -> crate::types::Theme {
crate::types::Theme {
stack_name: self.stack_name,
state: self.state,
theme_title_text: self.theme_title_text,
theme_styling: self.theme_styling,
theme_footer_links: self.theme_footer_links,
theme_organization_logo_url: self.theme_organization_logo_url,
theme_favicon_url: self.theme_favicon_url,
created_time: self.created_time,
}
}
}