aws-sdk-appconfig 1.101.0

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

/// <p>A value such as an Amazon Resource Name (ARN) or an Amazon Simple Notification Service topic entered in an extension when invoked. Parameter values are specified in an extension association. For more information about extensions, see <a href="https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions.html">Extending workflows</a> in the <i>AppConfig User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parameter {
    /// <p>Information about the parameter.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>A parameter value must be specified in the extension association.</p>
    pub required: bool,
    /// <p>Indicates whether this parameter's value can be supplied at the extension's action point instead of during extension association. Dynamic parameters can't be marked <code>Required</code>.</p>
    pub dynamic: bool,
}
impl Parameter {
    /// <p>Information about the parameter.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A parameter value must be specified in the extension association.</p>
    pub fn required(&self) -> bool {
        self.required
    }
    /// <p>Indicates whether this parameter's value can be supplied at the extension's action point instead of during extension association. Dynamic parameters can't be marked <code>Required</code>.</p>
    pub fn dynamic(&self) -> bool {
        self.dynamic
    }
}
impl Parameter {
    /// Creates a new builder-style object to manufacture [`Parameter`](crate::types::Parameter).
    pub fn builder() -> crate::types::builders::ParameterBuilder {
        crate::types::builders::ParameterBuilder::default()
    }
}

/// A builder for [`Parameter`](crate::types::Parameter).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParameterBuilder {
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) required: ::std::option::Option<bool>,
    pub(crate) dynamic: ::std::option::Option<bool>,
}
impl ParameterBuilder {
    /// <p>Information about the parameter.</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>Information about the parameter.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Information about the parameter.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>A parameter value must be specified in the extension association.</p>
    pub fn required(mut self, input: bool) -> Self {
        self.required = ::std::option::Option::Some(input);
        self
    }
    /// <p>A parameter value must be specified in the extension association.</p>
    pub fn set_required(mut self, input: ::std::option::Option<bool>) -> Self {
        self.required = input;
        self
    }
    /// <p>A parameter value must be specified in the extension association.</p>
    pub fn get_required(&self) -> &::std::option::Option<bool> {
        &self.required
    }
    /// <p>Indicates whether this parameter's value can be supplied at the extension's action point instead of during extension association. Dynamic parameters can't be marked <code>Required</code>.</p>
    pub fn dynamic(mut self, input: bool) -> Self {
        self.dynamic = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this parameter's value can be supplied at the extension's action point instead of during extension association. Dynamic parameters can't be marked <code>Required</code>.</p>
    pub fn set_dynamic(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dynamic = input;
        self
    }
    /// <p>Indicates whether this parameter's value can be supplied at the extension's action point instead of during extension association. Dynamic parameters can't be marked <code>Required</code>.</p>
    pub fn get_dynamic(&self) -> &::std::option::Option<bool> {
        &self.dynamic
    }
    /// Consumes the builder and constructs a [`Parameter`](crate::types::Parameter).
    pub fn build(self) -> crate::types::Parameter {
        crate::types::Parameter {
            description: self.description,
            required: self.required.unwrap_or_default(),
            dynamic: self.dynamic.unwrap_or_default(),
        }
    }
}