aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateOmniDashboardInput {
    /// The unique ID of the space.
    pub space_id: ::std::option::Option<::std::string::String>,
    /// The unique ID of the dashboard.
    pub dashboard_id: ::std::option::Option<::std::string::String>,
    /// The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.
    pub body: ::std::option::Option<::std::string::String>,
    /// A new name for the dashboard. Omit to leave unchanged.
    pub name: ::std::option::Option<::std::string::String>,
    /// A new description of the dashboard. Omit to leave unchanged.
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateOmniDashboardInput {
    /// The unique ID of the space.
    pub fn space_id(&self) -> ::std::option::Option<&str> {
        self.space_id.as_deref()
    }
    /// The unique ID of the dashboard.
    pub fn dashboard_id(&self) -> ::std::option::Option<&str> {
        self.dashboard_id.as_deref()
    }
    /// The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.
    pub fn body(&self) -> ::std::option::Option<&str> {
        self.body.as_deref()
    }
    /// A new name for the dashboard. Omit to leave unchanged.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// A new description of the dashboard. Omit to leave unchanged.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl UpdateOmniDashboardInput {
    /// Creates a new builder-style object to manufacture [`UpdateOmniDashboardInput`](crate::operation::update_omni_dashboard::UpdateOmniDashboardInput).
    pub fn builder() -> crate::operation::update_omni_dashboard::builders::UpdateOmniDashboardInputBuilder {
        crate::operation::update_omni_dashboard::builders::UpdateOmniDashboardInputBuilder::default()
    }
}

/// A builder for [`UpdateOmniDashboardInput`](crate::operation::update_omni_dashboard::UpdateOmniDashboardInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateOmniDashboardInputBuilder {
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) dashboard_id: ::std::option::Option<::std::string::String>,
    pub(crate) body: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateOmniDashboardInputBuilder {
    /// The unique ID of the space.
    /// This field is required.
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique ID of the space.
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_id = input;
        self
    }
    /// The unique ID of the space.
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_id
    }
    /// The unique ID of the dashboard.
    /// This field is required.
    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
    }
    /// The unique ID of the dashboard.
    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dashboard_id = input;
        self
    }
    /// The unique ID of the dashboard.
    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dashboard_id
    }
    /// The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.
    pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.body = ::std::option::Option::Some(input.into());
        self
    }
    /// The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.
    pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.body = input;
        self
    }
    /// The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.
    pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
        &self.body
    }
    /// A new name for the dashboard. Omit to leave unchanged.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// A new name for the dashboard. Omit to leave unchanged.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// A new name for the dashboard. Omit to leave unchanged.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// A new description of the dashboard. Omit to leave unchanged.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// A new description of the dashboard. Omit to leave unchanged.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// A new description of the dashboard. Omit to leave unchanged.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateOmniDashboardInput`](crate::operation::update_omni_dashboard::UpdateOmniDashboardInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_omni_dashboard::UpdateOmniDashboardInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_omni_dashboard::UpdateOmniDashboardInput {
            space_id: self.space_id,
            dashboard_id: self.dashboard_id,
            body: self.body,
            name: self.name,
            description: self.description,
        })
    }
}