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.

/// <p>An infrastructure as code defined resource output.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Output {
    /// <p>The output key.</p>
    pub key: ::std::option::Option<::std::string::String>,
    /// <p>The output value.</p>
    pub value_string: ::std::option::Option<::std::string::String>,
}
impl Output {
    /// <p>The output key.</p>
    pub fn key(&self) -> ::std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The output value.</p>
    pub fn value_string(&self) -> ::std::option::Option<&str> {
        self.value_string.as_deref()
    }
}
impl ::std::fmt::Debug for Output {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Output");
        formatter.field("key", &"*** Sensitive Data Redacted ***");
        formatter.field("value_string", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Output {
    /// Creates a new builder-style object to manufacture [`Output`](crate::types::Output).
    pub fn builder() -> crate::types::builders::OutputBuilder {
        crate::types::builders::OutputBuilder::default()
    }
}

/// A builder for [`Output`](crate::types::Output).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct OutputBuilder {
    pub(crate) key: ::std::option::Option<::std::string::String>,
    pub(crate) value_string: ::std::option::Option<::std::string::String>,
}
impl OutputBuilder {
    /// <p>The output key.</p>
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The output key.</p>
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key = input;
        self
    }
    /// <p>The output key.</p>
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.key
    }
    /// <p>The output value.</p>
    pub fn value_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value_string = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The output value.</p>
    pub fn set_value_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value_string = input;
        self
    }
    /// <p>The output value.</p>
    pub fn get_value_string(&self) -> &::std::option::Option<::std::string::String> {
        &self.value_string
    }
    /// Consumes the builder and constructs a [`Output`](crate::types::Output).
    pub fn build(self) -> crate::types::Output {
        crate::types::Output {
            key: self.key,
            value_string: self.value_string,
        }
    }
}
impl ::std::fmt::Debug for OutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("OutputBuilder");
        formatter.field("key", &"*** Sensitive Data Redacted ***");
        formatter.field("value_string", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}