aws-sdk-cloudextensions 1.0.0

AWS SDK for AWS Cloud Extensions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The identifier of the profile to update and the fields to change.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateProfileInput {
    /// The identifier (id or name) of the profile to update.
    pub identifier: ::std::option::Option<::std::string::String>,
    /// The new name of the profile. Must be unique within the account.
    pub name: ::std::option::Option<::std::string::String>,
    /// A human-readable description of the profile's purpose or target environment. An empty string removes the description.
    pub description: ::std::option::Option<::std::string::String>,
    /// Default values used by the extensions in this profile. These can be overridden at the profile entry level.
    pub extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
}
impl UpdateProfileInput {
    /// The identifier (id or name) of the profile to update.
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// The new name of the profile. Must be unique within the account.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// A human-readable description of the profile's purpose or target environment. An empty string removes the description.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// Default values used by the extensions in this profile. These can be overridden at the profile entry level.
    pub fn extension_defaults(&self) -> ::std::option::Option<&crate::types::ExtensionDefaults> {
        self.extension_defaults.as_ref()
    }
}
impl UpdateProfileInput {
    /// Creates a new builder-style object to manufacture [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
        crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
    }
}

/// A builder for [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProfileInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
}
impl UpdateProfileInputBuilder {
    /// The identifier (id or name) of the profile to update.
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// The identifier (id or name) of the profile to update.
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// The identifier (id or name) of the profile to update.
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// The new name of the profile. Must be unique within the account.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The new name of the profile. Must be unique within the account.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The new name of the profile. Must be unique within the account.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// A human-readable description of the profile's purpose or target environment. An empty string removes the description.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// A human-readable description of the profile's purpose or target environment. An empty string removes the description.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// A human-readable description of the profile's purpose or target environment. An empty string removes the description.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Default values used by the extensions in this profile. These can be overridden at the profile entry level.
    pub fn extension_defaults(mut self, input: crate::types::ExtensionDefaults) -> Self {
        self.extension_defaults = ::std::option::Option::Some(input);
        self
    }
    /// Default values used by the extensions in this profile. These can be overridden at the profile entry level.
    pub fn set_extension_defaults(mut self, input: ::std::option::Option<crate::types::ExtensionDefaults>) -> Self {
        self.extension_defaults = input;
        self
    }
    /// Default values used by the extensions in this profile. These can be overridden at the profile entry level.
    pub fn get_extension_defaults(&self) -> &::std::option::Option<crate::types::ExtensionDefaults> {
        &self.extension_defaults
    }
    /// Consumes the builder and constructs a [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
            identifier: self.identifier,
            name: self.name,
            description: self.description,
            extension_defaults: self.extension_defaults,
        })
    }
}