#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateDashboardOutput {
pub dashboard_arn: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub r#type: ::std::option::Option<crate::types::DashboardType>,
pub widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
pub tags_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
pub termination_protection_enabled: ::std::option::Option<bool>,
_request_id: Option<String>,
}
impl CreateDashboardOutput {
pub fn dashboard_arn(&self) -> ::std::option::Option<&str> {
self.dashboard_arn.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn r#type(&self) -> ::std::option::Option<&crate::types::DashboardType> {
self.r#type.as_ref()
}
pub fn widgets(&self) -> &[crate::types::Widget] {
self.widgets.as_deref().unwrap_or_default()
}
pub fn tags_list(&self) -> &[crate::types::Tag] {
self.tags_list.as_deref().unwrap_or_default()
}
pub fn refresh_schedule(&self) -> ::std::option::Option<&crate::types::RefreshSchedule> {
self.refresh_schedule.as_ref()
}
pub fn termination_protection_enabled(&self) -> ::std::option::Option<bool> {
self.termination_protection_enabled
}
}
impl ::aws_types::request_id::RequestId for CreateDashboardOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateDashboardOutput {
pub fn builder() -> crate::operation::create_dashboard::builders::CreateDashboardOutputBuilder {
crate::operation::create_dashboard::builders::CreateDashboardOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDashboardOutputBuilder {
pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::DashboardType>,
pub(crate) widgets: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>,
pub(crate) tags_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) refresh_schedule: ::std::option::Option<crate::types::RefreshSchedule>,
pub(crate) termination_protection_enabled: ::std::option::Option<bool>,
_request_id: Option<String>,
}
impl CreateDashboardOutputBuilder {
pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dashboard_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dashboard_arn = input;
self
}
pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.dashboard_arn
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn r#type(mut self, input: crate::types::DashboardType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::DashboardType>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::DashboardType> {
&self.r#type
}
pub fn widgets(mut self, input: crate::types::Widget) -> Self {
let mut v = self.widgets.unwrap_or_default();
v.push(input);
self.widgets = ::std::option::Option::Some(v);
self
}
pub fn set_widgets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Widget>>) -> Self {
self.widgets = input;
self
}
pub fn get_widgets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Widget>> {
&self.widgets
}
pub fn tags_list(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags_list.unwrap_or_default();
v.push(input);
self.tags_list = ::std::option::Option::Some(v);
self
}
pub fn set_tags_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags_list = input;
self
}
pub fn get_tags_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags_list
}
pub fn refresh_schedule(mut self, input: crate::types::RefreshSchedule) -> Self {
self.refresh_schedule = ::std::option::Option::Some(input);
self
}
pub fn set_refresh_schedule(mut self, input: ::std::option::Option<crate::types::RefreshSchedule>) -> Self {
self.refresh_schedule = input;
self
}
pub fn get_refresh_schedule(&self) -> &::std::option::Option<crate::types::RefreshSchedule> {
&self.refresh_schedule
}
pub fn termination_protection_enabled(mut self, input: bool) -> Self {
self.termination_protection_enabled = ::std::option::Option::Some(input);
self
}
pub fn set_termination_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.termination_protection_enabled = input;
self
}
pub fn get_termination_protection_enabled(&self) -> &::std::option::Option<bool> {
&self.termination_protection_enabled
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::create_dashboard::CreateDashboardOutput {
crate::operation::create_dashboard::CreateDashboardOutput {
dashboard_arn: self.dashboard_arn,
name: self.name,
r#type: self.r#type,
widgets: self.widgets,
tags_list: self.tags_list,
refresh_schedule: self.refresh_schedule,
termination_protection_enabled: self.termination_protection_enabled,
_request_id: self._request_id,
}
}
}