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 UpdateAccessProfileInput {
    /// The unique ID of the space.
    pub space_id: ::std::option::Option<::std::string::String>,
    /// The unique ID of the access profile to update.
    pub profile_id: ::std::option::Option<::std::string::String>,
    /// A new name for the access profile. Omit to leave unchanged.
    pub name: ::std::option::Option<::std::string::String>,
    /// A new description of the access profile. Omit to leave unchanged.
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateAccessProfileInput {
    /// 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 access profile to update.
    pub fn profile_id(&self) -> ::std::option::Option<&str> {
        self.profile_id.as_deref()
    }
    /// A new name for the access profile. Omit to leave unchanged.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// A new description of the access profile. Omit to leave unchanged.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl UpdateAccessProfileInput {
    /// Creates a new builder-style object to manufacture [`UpdateAccessProfileInput`](crate::operation::update_access_profile::UpdateAccessProfileInput).
    pub fn builder() -> crate::operation::update_access_profile::builders::UpdateAccessProfileInputBuilder {
        crate::operation::update_access_profile::builders::UpdateAccessProfileInputBuilder::default()
    }
}

/// A builder for [`UpdateAccessProfileInput`](crate::operation::update_access_profile::UpdateAccessProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAccessProfileInputBuilder {
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) profile_id: ::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 UpdateAccessProfileInputBuilder {
    /// 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 access profile to update.
    /// This field is required.
    pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique ID of the access profile to update.
    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_id = input;
        self
    }
    /// The unique ID of the access profile to update.
    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_id
    }
    /// A new name for the access profile. 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 access profile. 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 access profile. Omit to leave unchanged.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// A new description of the access profile. 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 access profile. 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 access profile. Omit to leave unchanged.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateAccessProfileInput`](crate::operation::update_access_profile::UpdateAccessProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_access_profile::UpdateAccessProfileInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_access_profile::UpdateAccessProfileInput {
            space_id: self.space_id,
            profile_id: self.profile_id,
            name: self.name,
            description: self.description,
        })
    }
}