aws_sdk_quicksight/types/
_topic_template.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TopicTemplate {
pub template_type: ::std::option::Option<::std::string::String>,
pub slots: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>,
}
impl TopicTemplate {
pub fn template_type(&self) -> ::std::option::Option<&str> {
self.template_type.as_deref()
}
pub fn slots(&self) -> &[crate::types::Slot] {
self.slots.as_deref().unwrap_or_default()
}
}
impl TopicTemplate {
pub fn builder() -> crate::types::builders::TopicTemplateBuilder {
crate::types::builders::TopicTemplateBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TopicTemplateBuilder {
pub(crate) template_type: ::std::option::Option<::std::string::String>,
pub(crate) slots: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>,
}
impl TopicTemplateBuilder {
pub fn template_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_template_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template_type = input;
self
}
pub fn get_template_type(&self) -> &::std::option::Option<::std::string::String> {
&self.template_type
}
pub fn slots(mut self, input: crate::types::Slot) -> Self {
let mut v = self.slots.unwrap_or_default();
v.push(input);
self.slots = ::std::option::Option::Some(v);
self
}
pub fn set_slots(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Slot>>) -> Self {
self.slots = input;
self
}
pub fn get_slots(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Slot>> {
&self.slots
}
pub fn build(self) -> crate::types::TopicTemplate {
crate::types::TopicTemplate {
template_type: self.template_type,
slots: self.slots,
}
}
}