1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>An Amazon Web Services Systems Manager parameter in Parameter Store.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
|
6 + | pub struct Parameter {
|
7 + | /// <p>The name of the parameter.</p>
|
8 + | pub name: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The type of parameter. Valid values include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p><note>
|
10 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
11 + | /// </note>
|
12 + | pub r#type: ::std::option::Option<crate::types::ParameterType>,
|
13 + | /// <p>The parameter value.</p><note>
|
14 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
15 + | /// </note>
|
16 + | pub value: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The parameter version.</p>
|
18 + | pub version: i64,
|
19 + | /// <p>Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:</p>
|
20 + | /// <p>parameter_name:version</p>
|
21 + | /// <p>parameter_name:label</p>
|
22 + | pub selector: ::std::option::Option<::std::string::String>,
|
23 + | /// <p>Applies to parameters that reference information in other Amazon Web Services services. <code>SourceResult</code> is the raw result or response from the source.</p>
|
24 + | pub source_result: ::std::option::Option<::std::string::String>,
|
25 + | /// <p>Date the parameter was last changed or updated and the parameter version was created.</p>
|
26 + | pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
27 + | /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
|
28 + | pub arn: ::std::option::Option<::std::string::String>,
|
29 + | /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
|
30 + | pub data_type: ::std::option::Option<::std::string::String>,
|
31 + | }
|
32 + | impl Parameter {
|
33 + | /// <p>The name of the parameter.</p>
|
34 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
35 + | self.name.as_deref()
|
36 + | }
|
37 + | /// <p>The type of parameter. Valid values include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p><note>
|
38 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
39 + | /// </note>
|
40 + | pub fn r#type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
|
41 + | self.r#type.as_ref()
|
42 + | }
|
43 + | /// <p>The parameter value.</p><note>
|
44 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
45 + | /// </note>
|
46 + | pub fn value(&self) -> ::std::option::Option<&str> {
|
47 + | self.value.as_deref()
|
48 + | }
|
49 + | /// <p>The parameter version.</p>
|
50 + | pub fn version(&self) -> i64 {
|
51 + | self.version
|
52 + | }
|
53 + | /// <p>Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:</p>
|
54 + | /// <p>parameter_name:version</p>
|
55 + | /// <p>parameter_name:label</p>
|
56 + | pub fn selector(&self) -> ::std::option::Option<&str> {
|
57 + | self.selector.as_deref()
|
58 + | }
|
59 + | /// <p>Applies to parameters that reference information in other Amazon Web Services services. <code>SourceResult</code> is the raw result or response from the source.</p>
|
60 + | pub fn source_result(&self) -> ::std::option::Option<&str> {
|
61 + | self.source_result.as_deref()
|
62 + | }
|
63 + | /// <p>Date the parameter was last changed or updated and the parameter version was created.</p>
|
64 + | pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
65 + | self.last_modified_date.as_ref()
|
66 + | }
|
67 + | /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
|
68 + | pub fn arn(&self) -> ::std::option::Option<&str> {
|
69 + | self.arn.as_deref()
|
70 + | }
|
71 + | /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
|
72 + | pub fn data_type(&self) -> ::std::option::Option<&str> {
|
73 + | self.data_type.as_deref()
|
74 + | }
|
75 + | }
|
76 + | impl ::std::fmt::Debug for Parameter {
|
77 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
78 + | let mut formatter = f.debug_struct("Parameter");
|
79 + | formatter.field("name", &self.name);
|
80 + | formatter.field("r#type", &self.r#type);
|
81 + | formatter.field("value", &"*** Sensitive Data Redacted ***");
|
82 + | formatter.field("version", &self.version);
|
83 + | formatter.field("selector", &self.selector);
|
84 + | formatter.field("source_result", &self.source_result);
|
85 + | formatter.field("last_modified_date", &self.last_modified_date);
|
86 + | formatter.field("arn", &self.arn);
|
87 + | formatter.field("data_type", &self.data_type);
|
88 + | formatter.finish()
|
89 + | }
|
90 + | }
|
91 + | static PARAMETER_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
92 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$Name", "com.amazonaws.ssm", "Parameter"),
|
93 + | ::aws_smithy_schema::ShapeType::String,
|
94 + | "Name",
|
95 + | 0,
|
96 + | );
|
97 + | static PARAMETER_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
98 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$Type", "com.amazonaws.ssm", "Parameter"),
|
99 + | ::aws_smithy_schema::ShapeType::String,
|
100 + | "Type",
|
101 + | 1,
|
102 + | );
|
103 + | static PARAMETER_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
104 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$Value", "com.amazonaws.ssm", "Parameter"),
|
105 + | ::aws_smithy_schema::ShapeType::String,
|
106 + | "Value",
|
107 + | 2,
|
108 + | );
|
109 + | static PARAMETER_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
110 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$Version", "com.amazonaws.ssm", "Parameter"),
|
111 + | ::aws_smithy_schema::ShapeType::Long,
|
112 + | "Version",
|
113 + | 3,
|
114 + | );
|
115 + | static PARAMETER_MEMBER_SELECTOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
116 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$Selector", "com.amazonaws.ssm", "Parameter"),
|
117 + | ::aws_smithy_schema::ShapeType::String,
|
118 + | "Selector",
|
119 + | 4,
|
120 + | );
|
121 + | static PARAMETER_MEMBER_SOURCE_RESULT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
122 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$SourceResult", "com.amazonaws.ssm", "Parameter"),
|
123 + | ::aws_smithy_schema::ShapeType::String,
|
124 + | "SourceResult",
|
125 + | 5,
|
126 + | );
|
127 + | static PARAMETER_MEMBER_LAST_MODIFIED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
128 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$LastModifiedDate", "com.amazonaws.ssm", "Parameter"),
|
129 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
130 + | "LastModifiedDate",
|
131 + | 6,
|
132 + | );
|
133 + | static PARAMETER_MEMBER_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
134 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$ARN", "com.amazonaws.ssm", "Parameter"),
|
135 + | ::aws_smithy_schema::ShapeType::String,
|
136 + | "ARN",
|
137 + | 7,
|
138 + | );
|
139 + | static PARAMETER_MEMBER_DATA_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
140 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter$DataType", "com.amazonaws.ssm", "Parameter"),
|
141 + | ::aws_smithy_schema::ShapeType::String,
|
142 + | "DataType",
|
143 + | 8,
|
144 + | );
|
145 + | static PARAMETER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
146 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameter", "com.amazonaws.ssm", "Parameter"),
|
147 + | ::aws_smithy_schema::ShapeType::Structure,
|
148 + | &[
|
149 + | &PARAMETER_MEMBER_NAME,
|
150 + | &PARAMETER_MEMBER_TYPE,
|
151 + | &PARAMETER_MEMBER_VALUE,
|
152 + | &PARAMETER_MEMBER_VERSION,
|
153 + | &PARAMETER_MEMBER_SELECTOR,
|
154 + | &PARAMETER_MEMBER_SOURCE_RESULT,
|
155 + | &PARAMETER_MEMBER_LAST_MODIFIED_DATE,
|
156 + | &PARAMETER_MEMBER_ARN,
|
157 + | &PARAMETER_MEMBER_DATA_TYPE,
|
158 + | ],
|
159 + | );
|
160 + | impl Parameter {
|
161 + | /// The schema for this shape.
|
162 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETER_SCHEMA;
|
163 + | }
|
164 + | impl ::aws_smithy_schema::serde::SerializableStruct for Parameter {
|
165 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
166 + | fn serialize_members(
|
167 + | &self,
|
168 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
169 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
170 + | if let Some(ref val) = self.name {
|
171 + | ser.write_string(&PARAMETER_MEMBER_NAME, val)?;
|
172 + | }
|
173 + | if let Some(ref val) = self.r#type {
|
174 + | ser.write_string(&PARAMETER_MEMBER_TYPE, val.as_str())?;
|
175 + | }
|
176 + | if let Some(ref val) = self.value {
|
177 + | ser.write_string(&PARAMETER_MEMBER_VALUE, val)?;
|
178 + | }
|
179 + | {
|
180 + | let val = &self.version;
|
181 + | ser.write_long(&PARAMETER_MEMBER_VERSION, *val)?;
|
182 + | }
|
183 + | if let Some(ref val) = self.selector {
|
184 + | ser.write_string(&PARAMETER_MEMBER_SELECTOR, val)?;
|
185 + | }
|
186 + | if let Some(ref val) = self.source_result {
|
187 + | ser.write_string(&PARAMETER_MEMBER_SOURCE_RESULT, val)?;
|
188 + | }
|
189 + | if let Some(ref val) = self.last_modified_date {
|
190 + | ser.write_timestamp(&PARAMETER_MEMBER_LAST_MODIFIED_DATE, val)?;
|
191 + | }
|
192 + | if let Some(ref val) = self.arn {
|
193 + | ser.write_string(&PARAMETER_MEMBER_ARN, val)?;
|
194 + | }
|
195 + | if let Some(ref val) = self.data_type {
|
196 + | ser.write_string(&PARAMETER_MEMBER_DATA_TYPE, val)?;
|
197 + | }
|
198 + | Ok(())
|
199 + | }
|
200 + | }
|
201 + | impl Parameter {
|
202 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
203 + | pub fn deserialize(
|
204 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
205 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
206 + | #[allow(unused_variables, unused_mut)]
|
207 + | let mut builder = Self::builder();
|
208 + | #[allow(
|
209 + | unused_variables,
|
210 + | unreachable_code,
|
211 + | clippy::single_match,
|
212 + | clippy::match_single_binding,
|
213 + | clippy::diverging_sub_expression
|
214 + | )]
|
215 + | deserializer.read_struct(&PARAMETER_SCHEMA, &mut |member, deser| {
|
216 + | match member.member_index() {
|
217 + | Some(0) => {
|
218 + | if deser.is_null() {
|
219 + | deser.read_null()?;
|
220 + | } else {
|
221 + | builder.name = Some(deser.read_string(member)?);
|
222 + | }
|
223 + | }
|
224 + | Some(1) => {
|
225 + | if deser.is_null() {
|
226 + | deser.read_null()?;
|
227 + | } else {
|
228 + | builder.r#type = Some(crate::types::ParameterType::from(deser.read_string(member)?.as_str()));
|
229 + | }
|
230 + | }
|
231 + | Some(2) => {
|
232 + | if deser.is_null() {
|
233 + | deser.read_null()?;
|
234 + | } else {
|
235 + | builder.value = Some(deser.read_string(member)?);
|
236 + | }
|
237 + | }
|
238 + | Some(3) => {
|
239 + | builder.version = Some(deser.read_long(member)?);
|
240 + | }
|
241 + | Some(4) => {
|
242 + | if deser.is_null() {
|
243 + | deser.read_null()?;
|
244 + | } else {
|
245 + | builder.selector = Some(deser.read_string(member)?);
|
246 + | }
|
247 + | }
|
248 + | Some(5) => {
|
249 + | if deser.is_null() {
|
250 + | deser.read_null()?;
|
251 + | } else {
|
252 + | builder.source_result = Some(deser.read_string(member)?);
|
253 + | }
|
254 + | }
|
255 + | Some(6) => {
|
256 + | if deser.is_null() {
|
257 + | deser.read_null()?;
|
258 + | } else {
|
259 + | builder.last_modified_date = Some(deser.read_timestamp(member)?);
|
260 + | }
|
261 + | }
|
262 + | Some(7) => {
|
263 + | if deser.is_null() {
|
264 + | deser.read_null()?;
|
265 + | } else {
|
266 + | builder.arn = Some(deser.read_string(member)?);
|
267 + | }
|
268 + | }
|
269 + | Some(8) => {
|
270 + | if deser.is_null() {
|
271 + | deser.read_null()?;
|
272 + | } else {
|
273 + | builder.data_type = Some(deser.read_string(member)?);
|
274 + | }
|
275 + | }
|
276 + | _ => {}
|
277 + | }
|
278 + | Ok(())
|
279 + | })?;
|
280 + | Ok(builder.build())
|
281 + | }
|
282 + | }
|
283 + | impl Parameter {
|
284 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
285 + | pub fn deserialize_with_response(
|
286 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
287 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
288 + | _status: u16,
|
289 + | _body: &[u8],
|
290 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
291 + | Self::deserialize(deserializer)
|
292 + | }
|
293 + | }
|
294 + | impl Parameter {
|
295 + | /// Creates a new builder-style object to manufacture [`Parameter`](crate::types::Parameter).
|
296 + | pub fn builder() -> crate::types::builders::ParameterBuilder {
|
297 + | crate::types::builders::ParameterBuilder::default()
|
298 + | }
|
299 + | }
|
300 + |
|
301 + | /// A builder for [`Parameter`](crate::types::Parameter).
|
302 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
303 + | #[non_exhaustive]
|
304 + | pub struct ParameterBuilder {
|
305 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
306 + | pub(crate) r#type: ::std::option::Option<crate::types::ParameterType>,
|
307 + | pub(crate) value: ::std::option::Option<::std::string::String>,
|
308 + | pub(crate) version: ::std::option::Option<i64>,
|
309 + | pub(crate) selector: ::std::option::Option<::std::string::String>,
|
310 + | pub(crate) source_result: ::std::option::Option<::std::string::String>,
|
311 + | pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
312 + | pub(crate) arn: ::std::option::Option<::std::string::String>,
|
313 + | pub(crate) data_type: ::std::option::Option<::std::string::String>,
|
314 + | }
|
315 + | impl ParameterBuilder {
|
316 + | /// <p>The name of the parameter.</p>
|
317 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
318 + | self.name = ::std::option::Option::Some(input.into());
|
319 + | self
|
320 + | }
|
321 + | /// <p>The name of the parameter.</p>
|
322 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
323 + | self.name = input;
|
324 + | self
|
325 + | }
|
326 + | /// <p>The name of the parameter.</p>
|
327 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
328 + | &self.name
|
329 + | }
|
330 + | /// <p>The type of parameter. Valid values include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p><note>
|
331 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
332 + | /// </note>
|
333 + | pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
|
334 + | self.r#type = ::std::option::Option::Some(input);
|
335 + | self
|
336 + | }
|
337 + | /// <p>The type of parameter. Valid values include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p><note>
|
338 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
339 + | /// </note>
|
340 + | pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
|
341 + | self.r#type = input;
|
342 + | self
|
343 + | }
|
344 + | /// <p>The type of parameter. Valid values include the following: <code>String</code>, <code>StringList</code>, and <code>SecureString</code>.</p><note>
|
345 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
346 + | /// </note>
|
347 + | pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
|
348 + | &self.r#type
|
349 + | }
|
350 + | /// <p>The parameter value.</p><note>
|
351 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
352 + | /// </note>
|
353 + | pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
354 + | self.value = ::std::option::Option::Some(input.into());
|
355 + | self
|
356 + | }
|
357 + | /// <p>The parameter value.</p><note>
|
358 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
359 + | /// </note>
|
360 + | pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
361 + | self.value = input;
|
362 + | self
|
363 + | }
|
364 + | /// <p>The parameter value.</p><note>
|
365 + | /// <p>If type is <code>StringList</code>, the system returns a comma-separated string with no spaces between commas in the <code>Value</code> field.</p>
|
366 + | /// </note>
|
367 + | pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
|
368 + | &self.value
|
369 + | }
|
370 + | /// <p>The parameter version.</p>
|
371 + | pub fn version(mut self, input: i64) -> Self {
|
372 + | self.version = ::std::option::Option::Some(input);
|
373 + | self
|
374 + | }
|
375 + | /// <p>The parameter version.</p>
|
376 + | pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
|
377 + | self.version = input;
|
378 + | self
|
379 + | }
|
380 + | /// <p>The parameter version.</p>
|
381 + | pub fn get_version(&self) -> &::std::option::Option<i64> {
|
382 + | &self.version
|
383 + | }
|
384 + | /// <p>Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:</p>
|
385 + | /// <p>parameter_name:version</p>
|
386 + | /// <p>parameter_name:label</p>
|
387 + | pub fn selector(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
388 + | self.selector = ::std::option::Option::Some(input.into());
|
389 + | self
|
390 + | }
|
391 + | /// <p>Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:</p>
|
392 + | /// <p>parameter_name:version</p>
|
393 + | /// <p>parameter_name:label</p>
|
394 + | pub fn set_selector(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
395 + | self.selector = input;
|
396 + | self
|
397 + | }
|
398 + | /// <p>Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:</p>
|
399 + | /// <p>parameter_name:version</p>
|
400 + | /// <p>parameter_name:label</p>
|
401 + | pub fn get_selector(&self) -> &::std::option::Option<::std::string::String> {
|
402 + | &self.selector
|
403 + | }
|
404 + | /// <p>Applies to parameters that reference information in other Amazon Web Services services. <code>SourceResult</code> is the raw result or response from the source.</p>
|
405 + | pub fn source_result(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
406 + | self.source_result = ::std::option::Option::Some(input.into());
|
407 + | self
|
408 + | }
|
409 + | /// <p>Applies to parameters that reference information in other Amazon Web Services services. <code>SourceResult</code> is the raw result or response from the source.</p>
|
410 + | pub fn set_source_result(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
411 + | self.source_result = input;
|
412 + | self
|
413 + | }
|
414 + | /// <p>Applies to parameters that reference information in other Amazon Web Services services. <code>SourceResult</code> is the raw result or response from the source.</p>
|
415 + | pub fn get_source_result(&self) -> &::std::option::Option<::std::string::String> {
|
416 + | &self.source_result
|
417 + | }
|
418 + | /// <p>Date the parameter was last changed or updated and the parameter version was created.</p>
|
419 + | pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
420 + | self.last_modified_date = ::std::option::Option::Some(input);
|
421 + | self
|
422 + | }
|
423 + | /// <p>Date the parameter was last changed or updated and the parameter version was created.</p>
|
424 + | pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
425 + | self.last_modified_date = input;
|
426 + | self
|
427 + | }
|
428 + | /// <p>Date the parameter was last changed or updated and the parameter version was created.</p>
|
429 + | pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
430 + | &self.last_modified_date
|
431 + | }
|
432 + | /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
|
433 + | pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
434 + | self.arn = ::std::option::Option::Some(input.into());
|
435 + | self
|
436 + | }
|
437 + | /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
|
438 + | pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
439 + | self.arn = input;
|
440 + | self
|
441 + | }
|
442 + | /// <p>The Amazon Resource Name (ARN) of the parameter.</p>
|
443 + | pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
|
444 + | &self.arn
|
445 + | }
|
446 + | /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
|
447 + | pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
448 + | self.data_type = ::std::option::Option::Some(input.into());
|
449 + | self
|
450 + | }
|
451 + | /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
|
452 + | pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
453 + | self.data_type = input;
|
454 + | self
|
455 + | }
|
456 + | /// <p>The data type of the parameter, such as <code>text</code> or <code>aws:ec2:image</code>. The default is <code>text</code>.</p>
|
457 + | pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
|
458 + | &self.data_type
|
459 + | }
|
460 + | /// Consumes the builder and constructs a [`Parameter`](crate::types::Parameter).
|
461 + | pub fn build(self) -> crate::types::Parameter {
|
462 + | crate::types::Parameter {
|
463 + | name: self.name,
|
464 + | r#type: self.r#type,
|
465 + | value: self.value,
|
466 + | version: self.version.unwrap_or_default(),
|
467 + | selector: self.selector,
|
468 + | source_result: self.source_result,
|
469 + | last_modified_date: self.last_modified_date,
|
470 + | arn: self.arn,
|
471 + | data_type: self.data_type,
|
472 + | }
|
473 + | }
|
474 + | }
|
475 + | impl ::std::fmt::Debug for ParameterBuilder {
|
476 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
477 + | let mut formatter = f.debug_struct("ParameterBuilder");
|
478 + | formatter.field("name", &self.name);
|
479 + | formatter.field("r#type", &self.r#type);
|
480 + | formatter.field("value", &"*** Sensitive Data Redacted ***");
|
481 + | formatter.field("version", &self.version);
|
482 + | formatter.field("selector", &self.selector);
|
483 + | formatter.field("source_result", &self.source_result);
|
484 + | formatter.field("last_modified_date", &self.last_modified_date);
|
485 + | formatter.field("arn", &self.arn);
|
486 + | formatter.field("data_type", &self.data_type);
|
487 + | formatter.finish()
|
488 + | }
|
489 + | }
|