aws_sdk_cloudformation/types/
_parameter_declaration.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ParameterDeclaration {
7 pub parameter_key: ::std::option::Option<::std::string::String>,
9 pub default_value: ::std::option::Option<::std::string::String>,
11 pub parameter_type: ::std::option::Option<::std::string::String>,
13 pub no_echo: ::std::option::Option<bool>,
15 pub description: ::std::option::Option<::std::string::String>,
17 pub parameter_constraints: ::std::option::Option<crate::types::ParameterConstraints>,
19}
20impl ParameterDeclaration {
21 pub fn parameter_key(&self) -> ::std::option::Option<&str> {
23 self.parameter_key.as_deref()
24 }
25 pub fn default_value(&self) -> ::std::option::Option<&str> {
27 self.default_value.as_deref()
28 }
29 pub fn parameter_type(&self) -> ::std::option::Option<&str> {
31 self.parameter_type.as_deref()
32 }
33 pub fn no_echo(&self) -> ::std::option::Option<bool> {
35 self.no_echo
36 }
37 pub fn description(&self) -> ::std::option::Option<&str> {
39 self.description.as_deref()
40 }
41 pub fn parameter_constraints(&self) -> ::std::option::Option<&crate::types::ParameterConstraints> {
43 self.parameter_constraints.as_ref()
44 }
45}
46impl ParameterDeclaration {
47 pub fn builder() -> crate::types::builders::ParameterDeclarationBuilder {
49 crate::types::builders::ParameterDeclarationBuilder::default()
50 }
51}
52
53#[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 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 pub fn set_parameter_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.parameter_key = input;
73 self
74 }
75 pub fn get_parameter_key(&self) -> &::std::option::Option<::std::string::String> {
77 &self.parameter_key
78 }
79 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 pub fn set_default_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.default_value = input;
87 self
88 }
89 pub fn get_default_value(&self) -> &::std::option::Option<::std::string::String> {
91 &self.default_value
92 }
93 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 pub fn set_parameter_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.parameter_type = input;
101 self
102 }
103 pub fn get_parameter_type(&self) -> &::std::option::Option<::std::string::String> {
105 &self.parameter_type
106 }
107 pub fn no_echo(mut self, input: bool) -> Self {
109 self.no_echo = ::std::option::Option::Some(input);
110 self
111 }
112 pub fn set_no_echo(mut self, input: ::std::option::Option<bool>) -> Self {
114 self.no_echo = input;
115 self
116 }
117 pub fn get_no_echo(&self) -> &::std::option::Option<bool> {
119 &self.no_echo
120 }
121 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.description = input;
129 self
130 }
131 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133 &self.description
134 }
135 pub fn parameter_constraints(mut self, input: crate::types::ParameterConstraints) -> Self {
137 self.parameter_constraints = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_parameter_constraints(mut self, input: ::std::option::Option<crate::types::ParameterConstraints>) -> Self {
142 self.parameter_constraints = input;
143 self
144 }
145 pub fn get_parameter_constraints(&self) -> &::std::option::Option<crate::types::ParameterConstraints> {
147 &self.parameter_constraints
148 }
149 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}