aws_sdk_cloudformation/types/
_parameter_declaration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The ParameterDeclaration data type.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ParameterDeclaration {
7    /// <p>The name that's associated with the parameter.</p>
8    pub parameter_key: ::std::option::Option<::std::string::String>,
9    /// <p>The default value of the parameter.</p>
10    pub default_value: ::std::option::Option<::std::string::String>,
11    /// <p>The type of parameter.</p>
12    pub parameter_type: ::std::option::Option<::std::string::String>,
13    /// <p>Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.</p>
14    pub no_echo: ::std::option::Option<bool>,
15    /// <p>The description that's associate with the parameter.</p>
16    pub description: ::std::option::Option<::std::string::String>,
17    /// <p>The criteria that CloudFormation uses to validate parameter values.</p>
18    pub parameter_constraints: ::std::option::Option<crate::types::ParameterConstraints>,
19}
20impl ParameterDeclaration {
21    /// <p>The name that's associated with the parameter.</p>
22    pub fn parameter_key(&self) -> ::std::option::Option<&str> {
23        self.parameter_key.as_deref()
24    }
25    /// <p>The default value of the parameter.</p>
26    pub fn default_value(&self) -> ::std::option::Option<&str> {
27        self.default_value.as_deref()
28    }
29    /// <p>The type of parameter.</p>
30    pub fn parameter_type(&self) -> ::std::option::Option<&str> {
31        self.parameter_type.as_deref()
32    }
33    /// <p>Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.</p>
34    pub fn no_echo(&self) -> ::std::option::Option<bool> {
35        self.no_echo
36    }
37    /// <p>The description that's associate with the parameter.</p>
38    pub fn description(&self) -> ::std::option::Option<&str> {
39        self.description.as_deref()
40    }
41    /// <p>The criteria that CloudFormation uses to validate parameter values.</p>
42    pub fn parameter_constraints(&self) -> ::std::option::Option<&crate::types::ParameterConstraints> {
43        self.parameter_constraints.as_ref()
44    }
45}
46impl ParameterDeclaration {
47    /// Creates a new builder-style object to manufacture [`ParameterDeclaration`](crate::types::ParameterDeclaration).
48    pub fn builder() -> crate::types::builders::ParameterDeclarationBuilder {
49        crate::types::builders::ParameterDeclarationBuilder::default()
50    }
51}
52
53/// A builder for [`ParameterDeclaration`](crate::types::ParameterDeclaration).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct ParameterDeclarationBuilder {
57    pub(crate) parameter_key: ::std::option::Option<::std::string::String>,
58    pub(crate) default_value: ::std::option::Option<::std::string::String>,
59    pub(crate) parameter_type: ::std::option::Option<::std::string::String>,
60    pub(crate) no_echo: ::std::option::Option<bool>,
61    pub(crate) description: ::std::option::Option<::std::string::String>,
62    pub(crate) parameter_constraints: ::std::option::Option<crate::types::ParameterConstraints>,
63}
64impl ParameterDeclarationBuilder {
65    /// <p>The name that's associated with the parameter.</p>
66    pub fn parameter_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.parameter_key = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name that's associated with the parameter.</p>
71    pub fn set_parameter_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.parameter_key = input;
73        self
74    }
75    /// <p>The name that's associated with the parameter.</p>
76    pub fn get_parameter_key(&self) -> &::std::option::Option<::std::string::String> {
77        &self.parameter_key
78    }
79    /// <p>The default value of the parameter.</p>
80    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.default_value = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The default value of the parameter.</p>
85    pub fn set_default_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.default_value = input;
87        self
88    }
89    /// <p>The default value of the parameter.</p>
90    pub fn get_default_value(&self) -> &::std::option::Option<::std::string::String> {
91        &self.default_value
92    }
93    /// <p>The type of parameter.</p>
94    pub fn parameter_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.parameter_type = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The type of parameter.</p>
99    pub fn set_parameter_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.parameter_type = input;
101        self
102    }
103    /// <p>The type of parameter.</p>
104    pub fn get_parameter_type(&self) -> &::std::option::Option<::std::string::String> {
105        &self.parameter_type
106    }
107    /// <p>Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.</p>
108    pub fn no_echo(mut self, input: bool) -> Self {
109        self.no_echo = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.</p>
113    pub fn set_no_echo(mut self, input: ::std::option::Option<bool>) -> Self {
114        self.no_echo = input;
115        self
116    }
117    /// <p>Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.</p>
118    pub fn get_no_echo(&self) -> &::std::option::Option<bool> {
119        &self.no_echo
120    }
121    /// <p>The description that's associate with the parameter.</p>
122    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.description = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The description that's associate with the parameter.</p>
127    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.description = input;
129        self
130    }
131    /// <p>The description that's associate with the parameter.</p>
132    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133        &self.description
134    }
135    /// <p>The criteria that CloudFormation uses to validate parameter values.</p>
136    pub fn parameter_constraints(mut self, input: crate::types::ParameterConstraints) -> Self {
137        self.parameter_constraints = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The criteria that CloudFormation uses to validate parameter values.</p>
141    pub fn set_parameter_constraints(mut self, input: ::std::option::Option<crate::types::ParameterConstraints>) -> Self {
142        self.parameter_constraints = input;
143        self
144    }
145    /// <p>The criteria that CloudFormation uses to validate parameter values.</p>
146    pub fn get_parameter_constraints(&self) -> &::std::option::Option<crate::types::ParameterConstraints> {
147        &self.parameter_constraints
148    }
149    /// Consumes the builder and constructs a [`ParameterDeclaration`](crate::types::ParameterDeclaration).
150    pub fn build(self) -> crate::types::ParameterDeclaration {
151        crate::types::ParameterDeclaration {
152            parameter_key: self.parameter_key,
153            default_value: self.default_value,
154            parameter_type: self.parameter_type,
155            no_echo: self.no_echo,
156            description: self.description,
157            parameter_constraints: self.parameter_constraints,
158        }
159    }
160}