aws-sdk-proton 1.101.0

AWS SDK for AWS Proton
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)]
pub struct UpdateServiceTemplateInput {
    /// <p>The name of the service template to update.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the service template to update that's displayed in the developer interface.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the service template update.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateServiceTemplateInput {
    /// <p>The name of the service template to update.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The name of the service template to update that's displayed in the developer interface.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>A description of the service template update.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateServiceTemplateInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateServiceTemplateInput");
        formatter.field("name", &self.name);
        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl UpdateServiceTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateServiceTemplateInput`](crate::operation::update_service_template::UpdateServiceTemplateInput).
    pub fn builder() -> crate::operation::update_service_template::builders::UpdateServiceTemplateInputBuilder {
        crate::operation::update_service_template::builders::UpdateServiceTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateServiceTemplateInput`](crate::operation::update_service_template::UpdateServiceTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateServiceTemplateInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateServiceTemplateInputBuilder {
    /// <p>The name of the service template to update.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the service template to update.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the service template to update.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The name of the service template to update that's displayed in the developer interface.</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the service template to update that's displayed in the developer interface.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The name of the service template to update that's displayed in the developer interface.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>A description of the service template update.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the service template update.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the service template update.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateServiceTemplateInput`](crate::operation::update_service_template::UpdateServiceTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_service_template::UpdateServiceTemplateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_service_template::UpdateServiceTemplateInput {
            name: self.name,
            display_name: self.display_name,
            description: self.description,
        })
    }
}
impl ::std::fmt::Debug for UpdateServiceTemplateInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateServiceTemplateInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}