1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Information about parameter usage.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
|
6 + | pub struct ParameterHistory {
|
7 + | /// <p>The name of the parameter.</p>
|
8 + | pub name: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The type of parameter used.</p>
|
10 + | pub r#type: ::std::option::Option<crate::types::ParameterType>,
|
11 + | /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
|
12 + | pub key_id: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>Date the parameter was last changed or updated.</p>
|
14 + | pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
15 + | /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
|
16 + | pub last_modified_user: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>Information about the parameter.</p>
|
18 + | pub description: ::std::option::Option<::std::string::String>,
|
19 + | /// <p>The parameter value.</p>
|
20 + | pub value: ::std::option::Option<::std::string::String>,
|
21 + | /// <p>Parameter names can include the following letters and symbols.</p>
|
22 + | /// <p>a-zA-Z0-9_.-</p>
|
23 + | pub allowed_pattern: ::std::option::Option<::std::string::String>,
|
24 + | /// <p>The parameter version.</p>
|
25 + | pub version: i64,
|
26 + | /// <p>Labels assigned to the parameter version.</p>
|
27 + | pub labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
28 + | /// <p>The parameter tier.</p>
|
29 + | pub tier: ::std::option::Option<crate::types::ParameterTier>,
|
30 + | /// <p>Information about the policies assigned to a parameter.</p>
|
31 + | /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
32 + | pub policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
|
33 + | /// <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>
|
34 + | pub data_type: ::std::option::Option<::std::string::String>,
|
35 + | }
|
36 + | impl ParameterHistory {
|
37 + | /// <p>The name of the parameter.</p>
|
38 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
39 + | self.name.as_deref()
|
40 + | }
|
41 + | /// <p>The type of parameter used.</p>
|
42 + | pub fn r#type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
|
43 + | self.r#type.as_ref()
|
44 + | }
|
45 + | /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
|
46 + | pub fn key_id(&self) -> ::std::option::Option<&str> {
|
47 + | self.key_id.as_deref()
|
48 + | }
|
49 + | /// <p>Date the parameter was last changed or updated.</p>
|
50 + | pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
51 + | self.last_modified_date.as_ref()
|
52 + | }
|
53 + | /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
|
54 + | pub fn last_modified_user(&self) -> ::std::option::Option<&str> {
|
55 + | self.last_modified_user.as_deref()
|
56 + | }
|
57 + | /// <p>Information about the parameter.</p>
|
58 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
59 + | self.description.as_deref()
|
60 + | }
|
61 + | /// <p>The parameter value.</p>
|
62 + | pub fn value(&self) -> ::std::option::Option<&str> {
|
63 + | self.value.as_deref()
|
64 + | }
|
65 + | /// <p>Parameter names can include the following letters and symbols.</p>
|
66 + | /// <p>a-zA-Z0-9_.-</p>
|
67 + | pub fn allowed_pattern(&self) -> ::std::option::Option<&str> {
|
68 + | self.allowed_pattern.as_deref()
|
69 + | }
|
70 + | /// <p>The parameter version.</p>
|
71 + | pub fn version(&self) -> i64 {
|
72 + | self.version
|
73 + | }
|
74 + | /// <p>Labels assigned to the parameter version.</p>
|
75 + | ///
|
76 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.labels.is_none()`.
|
77 + | pub fn labels(&self) -> &[::std::string::String] {
|
78 + | self.labels.as_deref().unwrap_or_default()
|
79 + | }
|
80 + | /// <p>The parameter tier.</p>
|
81 + | pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
|
82 + | self.tier.as_ref()
|
83 + | }
|
84 + | /// <p>Information about the policies assigned to a parameter.</p>
|
85 + | /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
86 + | ///
|
87 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.policies.is_none()`.
|
88 + | pub fn policies(&self) -> &[crate::types::ParameterInlinePolicy] {
|
89 + | self.policies.as_deref().unwrap_or_default()
|
90 + | }
|
91 + | /// <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>
|
92 + | pub fn data_type(&self) -> ::std::option::Option<&str> {
|
93 + | self.data_type.as_deref()
|
94 + | }
|
95 + | }
|
96 + | impl ::std::fmt::Debug for ParameterHistory {
|
97 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
98 + | let mut formatter = f.debug_struct("ParameterHistory");
|
99 + | formatter.field("name", &self.name);
|
100 + | formatter.field("r#type", &self.r#type);
|
101 + | formatter.field("key_id", &self.key_id);
|
102 + | formatter.field("last_modified_date", &self.last_modified_date);
|
103 + | formatter.field("last_modified_user", &self.last_modified_user);
|
104 + | formatter.field("description", &self.description);
|
105 + | formatter.field("value", &"*** Sensitive Data Redacted ***");
|
106 + | formatter.field("allowed_pattern", &self.allowed_pattern);
|
107 + | formatter.field("version", &self.version);
|
108 + | formatter.field("labels", &self.labels);
|
109 + | formatter.field("tier", &self.tier);
|
110 + | formatter.field("policies", &self.policies);
|
111 + | formatter.field("data_type", &self.data_type);
|
112 + | formatter.finish()
|
113 + | }
|
114 + | }
|
115 + | static PARAMETERHISTORY_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
116 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Name", "com.amazonaws.ssm", "ParameterHistory"),
|
117 + | ::aws_smithy_schema::ShapeType::String,
|
118 + | "Name",
|
119 + | 0,
|
120 + | );
|
121 + | static PARAMETERHISTORY_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
122 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Type", "com.amazonaws.ssm", "ParameterHistory"),
|
123 + | ::aws_smithy_schema::ShapeType::String,
|
124 + | "Type",
|
125 + | 1,
|
126 + | );
|
127 + | static PARAMETERHISTORY_MEMBER_KEY_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
128 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$KeyId", "com.amazonaws.ssm", "ParameterHistory"),
|
129 + | ::aws_smithy_schema::ShapeType::String,
|
130 + | "KeyId",
|
131 + | 2,
|
132 + | );
|
133 + | static PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
134 + | ::aws_smithy_schema::ShapeId::from_parts(
|
135 + | "com.amazonaws.ssm#ParameterHistory$LastModifiedDate",
|
136 + | "com.amazonaws.ssm",
|
137 + | "ParameterHistory",
|
138 + | ),
|
139 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
140 + | "LastModifiedDate",
|
141 + | 3,
|
142 + | );
|
143 + | static PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
144 + | ::aws_smithy_schema::ShapeId::from_parts(
|
145 + | "com.amazonaws.ssm#ParameterHistory$LastModifiedUser",
|
146 + | "com.amazonaws.ssm",
|
147 + | "ParameterHistory",
|
148 + | ),
|
149 + | ::aws_smithy_schema::ShapeType::String,
|
150 + | "LastModifiedUser",
|
151 + | 4,
|
152 + | );
|
153 + | static PARAMETERHISTORY_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
154 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Description", "com.amazonaws.ssm", "ParameterHistory"),
|
155 + | ::aws_smithy_schema::ShapeType::String,
|
156 + | "Description",
|
157 + | 5,
|
158 + | );
|
159 + | static PARAMETERHISTORY_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
160 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Value", "com.amazonaws.ssm", "ParameterHistory"),
|
161 + | ::aws_smithy_schema::ShapeType::String,
|
162 + | "Value",
|
163 + | 6,
|
164 + | );
|
165 + | static PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
166 + | ::aws_smithy_schema::ShapeId::from_parts(
|
167 + | "com.amazonaws.ssm#ParameterHistory$AllowedPattern",
|
168 + | "com.amazonaws.ssm",
|
169 + | "ParameterHistory",
|
170 + | ),
|
171 + | ::aws_smithy_schema::ShapeType::String,
|
172 + | "AllowedPattern",
|
173 + | 7,
|
174 + | );
|
175 + | static PARAMETERHISTORY_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
176 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Version", "com.amazonaws.ssm", "ParameterHistory"),
|
177 + | ::aws_smithy_schema::ShapeType::Long,
|
178 + | "Version",
|
179 + | 8,
|
180 + | );
|
181 + | static PARAMETERHISTORY_MEMBER_LABELS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
182 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterLabelList$member", "com.amazonaws.ssm", "ParameterLabelList"),
|
183 + | ::aws_smithy_schema::ShapeType::String,
|
184 + | "member",
|
185 + | 0,
|
186 + | );
|
187 + | static PARAMETERHISTORY_MEMBER_LABELS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
188 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Labels", "com.amazonaws.ssm", "ParameterHistory"),
|
189 + | ::aws_smithy_schema::ShapeType::List,
|
190 + | "Labels",
|
191 + | 9,
|
192 + | )
|
193 + | .with_list_member(&PARAMETERHISTORY_MEMBER_LABELS_MEMBER);
|
194 + | static PARAMETERHISTORY_MEMBER_TIER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
195 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Tier", "com.amazonaws.ssm", "ParameterHistory"),
|
196 + | ::aws_smithy_schema::ShapeType::String,
|
197 + | "Tier",
|
198 + | 10,
|
199 + | );
|
200 + | static PARAMETERHISTORY_MEMBER_POLICIES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
201 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterPolicyList$member", "com.amazonaws.ssm", "ParameterPolicyList"),
|
202 + | ::aws_smithy_schema::ShapeType::Structure,
|
203 + | "member",
|
204 + | 0,
|
205 + | );
|
206 + | static PARAMETERHISTORY_MEMBER_POLICIES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
207 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$Policies", "com.amazonaws.ssm", "ParameterHistory"),
|
208 + | ::aws_smithy_schema::ShapeType::List,
|
209 + | "Policies",
|
210 + | 11,
|
211 + | )
|
212 + | .with_list_member(&PARAMETERHISTORY_MEMBER_POLICIES_MEMBER);
|
213 + | static PARAMETERHISTORY_MEMBER_DATA_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
214 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory$DataType", "com.amazonaws.ssm", "ParameterHistory"),
|
215 + | ::aws_smithy_schema::ShapeType::String,
|
216 + | "DataType",
|
217 + | 12,
|
218 + | );
|
219 + | static PARAMETERHISTORY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
220 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterHistory", "com.amazonaws.ssm", "ParameterHistory"),
|
221 + | ::aws_smithy_schema::ShapeType::Structure,
|
222 + | &[
|
223 + | &PARAMETERHISTORY_MEMBER_NAME,
|
224 + | &PARAMETERHISTORY_MEMBER_TYPE,
|
225 + | &PARAMETERHISTORY_MEMBER_KEY_ID,
|
226 + | &PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE,
|
227 + | &PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER,
|
228 + | &PARAMETERHISTORY_MEMBER_DESCRIPTION,
|
229 + | &PARAMETERHISTORY_MEMBER_VALUE,
|
230 + | &PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN,
|
231 + | &PARAMETERHISTORY_MEMBER_VERSION,
|
232 + | &PARAMETERHISTORY_MEMBER_LABELS,
|
233 + | &PARAMETERHISTORY_MEMBER_TIER,
|
234 + | &PARAMETERHISTORY_MEMBER_POLICIES,
|
235 + | &PARAMETERHISTORY_MEMBER_DATA_TYPE,
|
236 + | ],
|
237 + | );
|
238 + | impl ParameterHistory {
|
239 + | /// The schema for this shape.
|
240 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PARAMETERHISTORY_SCHEMA;
|
241 + | }
|
242 + | impl ::aws_smithy_schema::serde::SerializableStruct for ParameterHistory {
|
243 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
244 + | fn serialize_members(
|
245 + | &self,
|
246 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
247 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
248 + | if let Some(ref val) = self.name {
|
249 + | ser.write_string(&PARAMETERHISTORY_MEMBER_NAME, val)?;
|
250 + | }
|
251 + | if let Some(ref val) = self.r#type {
|
252 + | ser.write_string(&PARAMETERHISTORY_MEMBER_TYPE, val.as_str())?;
|
253 + | }
|
254 + | if let Some(ref val) = self.key_id {
|
255 + | ser.write_string(&PARAMETERHISTORY_MEMBER_KEY_ID, val)?;
|
256 + | }
|
257 + | if let Some(ref val) = self.last_modified_date {
|
258 + | ser.write_timestamp(&PARAMETERHISTORY_MEMBER_LAST_MODIFIED_DATE, val)?;
|
259 + | }
|
260 + | if let Some(ref val) = self.last_modified_user {
|
261 + | ser.write_string(&PARAMETERHISTORY_MEMBER_LAST_MODIFIED_USER, val)?;
|
262 + | }
|
263 + | if let Some(ref val) = self.description {
|
264 + | ser.write_string(&PARAMETERHISTORY_MEMBER_DESCRIPTION, val)?;
|
265 + | }
|
266 + | if let Some(ref val) = self.value {
|
267 + | ser.write_string(&PARAMETERHISTORY_MEMBER_VALUE, val)?;
|
268 + | }
|
269 + | if let Some(ref val) = self.allowed_pattern {
|
270 + | ser.write_string(&PARAMETERHISTORY_MEMBER_ALLOWED_PATTERN, val)?;
|
271 + | }
|
272 + | {
|
273 + | let val = &self.version;
|
274 + | ser.write_long(&PARAMETERHISTORY_MEMBER_VERSION, *val)?;
|
275 + | }
|
276 + | if let Some(ref val) = self.labels {
|
277 + | ser.write_list(
|
278 + | &PARAMETERHISTORY_MEMBER_LABELS,
|
279 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
280 + | for item in val {
|
281 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
282 + | }
|
283 + | Ok(())
|
284 + | },
|
285 + | )?;
|
286 + | }
|
287 + | if let Some(ref val) = self.tier {
|
288 + | ser.write_string(&PARAMETERHISTORY_MEMBER_TIER, val.as_str())?;
|
289 + | }
|
290 + | if let Some(ref val) = self.policies {
|
291 + | ser.write_list(
|
292 + | &PARAMETERHISTORY_MEMBER_POLICIES,
|
293 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
294 + | for item in val {
|
295 + | ser.write_struct(crate::types::ParameterInlinePolicy::SCHEMA, item)?;
|
296 + | }
|
297 + | Ok(())
|
298 + | },
|
299 + | )?;
|
300 + | }
|
301 + | if let Some(ref val) = self.data_type {
|
302 + | ser.write_string(&PARAMETERHISTORY_MEMBER_DATA_TYPE, val)?;
|
303 + | }
|
304 + | Ok(())
|
305 + | }
|
306 + | }
|
307 + | impl ParameterHistory {
|
308 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
309 + | pub fn deserialize(
|
310 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
311 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
312 + | #[allow(unused_variables, unused_mut)]
|
313 + | let mut builder = Self::builder();
|
314 + | #[allow(
|
315 + | unused_variables,
|
316 + | unreachable_code,
|
317 + | clippy::single_match,
|
318 + | clippy::match_single_binding,
|
319 + | clippy::diverging_sub_expression
|
320 + | )]
|
321 + | deserializer.read_struct(&PARAMETERHISTORY_SCHEMA, &mut |member, deser| {
|
322 + | match member.member_index() {
|
323 + | Some(0) => {
|
324 + | if deser.is_null() {
|
325 + | deser.read_null()?;
|
326 + | } else {
|
327 + | builder.name = Some(deser.read_string(member)?);
|
328 + | }
|
329 + | }
|
330 + | Some(1) => {
|
331 + | if deser.is_null() {
|
332 + | deser.read_null()?;
|
333 + | } else {
|
334 + | builder.r#type = Some(crate::types::ParameterType::from(deser.read_string(member)?.as_str()));
|
335 + | }
|
336 + | }
|
337 + | Some(2) => {
|
338 + | if deser.is_null() {
|
339 + | deser.read_null()?;
|
340 + | } else {
|
341 + | builder.key_id = Some(deser.read_string(member)?);
|
342 + | }
|
343 + | }
|
344 + | Some(3) => {
|
345 + | if deser.is_null() {
|
346 + | deser.read_null()?;
|
347 + | } else {
|
348 + | builder.last_modified_date = Some(deser.read_timestamp(member)?);
|
349 + | }
|
350 + | }
|
351 + | Some(4) => {
|
352 + | if deser.is_null() {
|
353 + | deser.read_null()?;
|
354 + | } else {
|
355 + | builder.last_modified_user = Some(deser.read_string(member)?);
|
356 + | }
|
357 + | }
|
358 + | Some(5) => {
|
359 + | if deser.is_null() {
|
360 + | deser.read_null()?;
|
361 + | } else {
|
362 + | builder.description = Some(deser.read_string(member)?);
|
363 + | }
|
364 + | }
|
365 + | Some(6) => {
|
366 + | if deser.is_null() {
|
367 + | deser.read_null()?;
|
368 + | } else {
|
369 + | builder.value = Some(deser.read_string(member)?);
|
370 + | }
|
371 + | }
|
372 + | Some(7) => {
|
373 + | if deser.is_null() {
|
374 + | deser.read_null()?;
|
375 + | } else {
|
376 + | builder.allowed_pattern = Some(deser.read_string(member)?);
|
377 + | }
|
378 + | }
|
379 + | Some(8) => {
|
380 + | builder.version = Some(deser.read_long(member)?);
|
381 + | }
|
382 + | Some(9) => {
|
383 + | if deser.is_null() {
|
384 + | deser.read_null()?;
|
385 + | } else {
|
386 + | builder.labels = Some(deser.read_string_list(member)?);
|
387 + | }
|
388 + | }
|
389 + | Some(10) => {
|
390 + | if deser.is_null() {
|
391 + | deser.read_null()?;
|
392 + | } else {
|
393 + | builder.tier = Some(crate::types::ParameterTier::from(deser.read_string(member)?.as_str()));
|
394 + | }
|
395 + | }
|
396 + | Some(11) => {
|
397 + | if deser.is_null() {
|
398 + | deser.read_null()?;
|
399 + | } else {
|
400 + | builder.policies = Some({
|
401 + | let mut container = Vec::new();
|
402 + | deser.read_list(member, &mut |deser| {
|
403 + | container.push(crate::types::ParameterInlinePolicy::deserialize(deser)?);
|
404 + | Ok(())
|
405 + | })?;
|
406 + | container
|
407 + | });
|
408 + | }
|
409 + | }
|
410 + | Some(12) => {
|
411 + | if deser.is_null() {
|
412 + | deser.read_null()?;
|
413 + | } else {
|
414 + | builder.data_type = Some(deser.read_string(member)?);
|
415 + | }
|
416 + | }
|
417 + | _ => {}
|
418 + | }
|
419 + | Ok(())
|
420 + | })?;
|
421 + | Ok(builder.build())
|
422 + | }
|
423 + | }
|
424 + | impl ParameterHistory {
|
425 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
426 + | pub fn deserialize_with_response(
|
427 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
428 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
429 + | _status: u16,
|
430 + | _body: &[u8],
|
431 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
432 + | Self::deserialize(deserializer)
|
433 + | }
|
434 + | }
|
435 + | impl ParameterHistory {
|
436 + | /// Creates a new builder-style object to manufacture [`ParameterHistory`](crate::types::ParameterHistory).
|
437 + | pub fn builder() -> crate::types::builders::ParameterHistoryBuilder {
|
438 + | crate::types::builders::ParameterHistoryBuilder::default()
|
439 + | }
|
440 + | }
|
441 + |
|
442 + | /// A builder for [`ParameterHistory`](crate::types::ParameterHistory).
|
443 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
444 + | #[non_exhaustive]
|
445 + | pub struct ParameterHistoryBuilder {
|
446 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
447 + | pub(crate) r#type: ::std::option::Option<crate::types::ParameterType>,
|
448 + | pub(crate) key_id: ::std::option::Option<::std::string::String>,
|
449 + | pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
450 + | pub(crate) last_modified_user: ::std::option::Option<::std::string::String>,
|
451 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
452 + | pub(crate) value: ::std::option::Option<::std::string::String>,
|
453 + | pub(crate) allowed_pattern: ::std::option::Option<::std::string::String>,
|
454 + | pub(crate) version: ::std::option::Option<i64>,
|
455 + | pub(crate) labels: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
456 + | pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
|
457 + | pub(crate) policies: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>,
|
458 + | pub(crate) data_type: ::std::option::Option<::std::string::String>,
|
459 + | }
|
460 + | impl ParameterHistoryBuilder {
|
461 + | /// <p>The name of the parameter.</p>
|
462 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
463 + | self.name = ::std::option::Option::Some(input.into());
|
464 + | self
|
465 + | }
|
466 + | /// <p>The name of the parameter.</p>
|
467 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
468 + | self.name = input;
|
469 + | self
|
470 + | }
|
471 + | /// <p>The name of the parameter.</p>
|
472 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
473 + | &self.name
|
474 + | }
|
475 + | /// <p>The type of parameter used.</p>
|
476 + | pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
|
477 + | self.r#type = ::std::option::Option::Some(input);
|
478 + | self
|
479 + | }
|
480 + | /// <p>The type of parameter used.</p>
|
481 + | pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
|
482 + | self.r#type = input;
|
483 + | self
|
484 + | }
|
485 + | /// <p>The type of parameter used.</p>
|
486 + | pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
|
487 + | &self.r#type
|
488 + | }
|
489 + | /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
|
490 + | pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
491 + | self.key_id = ::std::option::Option::Some(input.into());
|
492 + | self
|
493 + | }
|
494 + | /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
|
495 + | pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
496 + | self.key_id = input;
|
497 + | self
|
498 + | }
|
499 + | /// <p>The alias of the Key Management Service (KMS) key used to encrypt the parameter. Applies to <code>SecureString</code> parameters only</p>
|
500 + | pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
|
501 + | &self.key_id
|
502 + | }
|
503 + | /// <p>Date the parameter was last changed or updated.</p>
|
504 + | pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
505 + | self.last_modified_date = ::std::option::Option::Some(input);
|
506 + | self
|
507 + | }
|
508 + | /// <p>Date the parameter was last changed or updated.</p>
|
509 + | pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
510 + | self.last_modified_date = input;
|
511 + | self
|
512 + | }
|
513 + | /// <p>Date the parameter was last changed or updated.</p>
|
514 + | pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
515 + | &self.last_modified_date
|
516 + | }
|
517 + | /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
|
518 + | pub fn last_modified_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
519 + | self.last_modified_user = ::std::option::Option::Some(input.into());
|
520 + | self
|
521 + | }
|
522 + | /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
|
523 + | pub fn set_last_modified_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
524 + | self.last_modified_user = input;
|
525 + | self
|
526 + | }
|
527 + | /// <p>Amazon Resource Name (ARN) of the Amazon Web Services user who last changed the parameter.</p>
|
528 + | pub fn get_last_modified_user(&self) -> &::std::option::Option<::std::string::String> {
|
529 + | &self.last_modified_user
|
530 + | }
|
531 + | /// <p>Information about the parameter.</p>
|
532 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
533 + | self.description = ::std::option::Option::Some(input.into());
|
534 + | self
|
535 + | }
|
536 + | /// <p>Information about the parameter.</p>
|
537 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
538 + | self.description = input;
|
539 + | self
|
540 + | }
|
541 + | /// <p>Information about the parameter.</p>
|
542 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
543 + | &self.description
|
544 + | }
|
545 + | /// <p>The parameter value.</p>
|
546 + | pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
547 + | self.value = ::std::option::Option::Some(input.into());
|
548 + | self
|
549 + | }
|
550 + | /// <p>The parameter value.</p>
|
551 + | pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
552 + | self.value = input;
|
553 + | self
|
554 + | }
|
555 + | /// <p>The parameter value.</p>
|
556 + | pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
|
557 + | &self.value
|
558 + | }
|
559 + | /// <p>Parameter names can include the following letters and symbols.</p>
|
560 + | /// <p>a-zA-Z0-9_.-</p>
|
561 + | pub fn allowed_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
562 + | self.allowed_pattern = ::std::option::Option::Some(input.into());
|
563 + | self
|
564 + | }
|
565 + | /// <p>Parameter names can include the following letters and symbols.</p>
|
566 + | /// <p>a-zA-Z0-9_.-</p>
|
567 + | pub fn set_allowed_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
568 + | self.allowed_pattern = input;
|
569 + | self
|
570 + | }
|
571 + | /// <p>Parameter names can include the following letters and symbols.</p>
|
572 + | /// <p>a-zA-Z0-9_.-</p>
|
573 + | pub fn get_allowed_pattern(&self) -> &::std::option::Option<::std::string::String> {
|
574 + | &self.allowed_pattern
|
575 + | }
|
576 + | /// <p>The parameter version.</p>
|
577 + | pub fn version(mut self, input: i64) -> Self {
|
578 + | self.version = ::std::option::Option::Some(input);
|
579 + | self
|
580 + | }
|
581 + | /// <p>The parameter version.</p>
|
582 + | pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
|
583 + | self.version = input;
|
584 + | self
|
585 + | }
|
586 + | /// <p>The parameter version.</p>
|
587 + | pub fn get_version(&self) -> &::std::option::Option<i64> {
|
588 + | &self.version
|
589 + | }
|
590 + | /// Appends an item to `labels`.
|
591 + | ///
|
592 + | /// To override the contents of this collection use [`set_labels`](Self::set_labels).
|
593 + | ///
|
594 + | /// <p>Labels assigned to the parameter version.</p>
|
595 + | pub fn labels(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
596 + | let mut v = self.labels.unwrap_or_default();
|
597 + | v.push(input.into());
|
598 + | self.labels = ::std::option::Option::Some(v);
|
599 + | self
|
600 + | }
|
601 + | /// <p>Labels assigned to the parameter version.</p>
|
602 + | pub fn set_labels(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
603 + | self.labels = input;
|
604 + | self
|
605 + | }
|
606 + | /// <p>Labels assigned to the parameter version.</p>
|
607 + | pub fn get_labels(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
608 + | &self.labels
|
609 + | }
|
610 + | /// <p>The parameter tier.</p>
|
611 + | pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
|
612 + | self.tier = ::std::option::Option::Some(input);
|
613 + | self
|
614 + | }
|
615 + | /// <p>The parameter tier.</p>
|
616 + | pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
|
617 + | self.tier = input;
|
618 + | self
|
619 + | }
|
620 + | /// <p>The parameter tier.</p>
|
621 + | pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
|
622 + | &self.tier
|
623 + | }
|
624 + | /// Appends an item to `policies`.
|
625 + | ///
|
626 + | /// To override the contents of this collection use [`set_policies`](Self::set_policies).
|
627 + | ///
|
628 + | /// <p>Information about the policies assigned to a parameter.</p>
|
629 + | /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
630 + | pub fn policies(mut self, input: crate::types::ParameterInlinePolicy) -> Self {
|
631 + | let mut v = self.policies.unwrap_or_default();
|
632 + | v.push(input);
|
633 + | self.policies = ::std::option::Option::Some(v);
|
634 + | self
|
635 + | }
|
636 + | /// <p>Information about the policies assigned to a parameter.</p>
|
637 + | /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
638 + | pub fn set_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>>) -> Self {
|
639 + | self.policies = input;
|
640 + | self
|
641 + | }
|
642 + | /// <p>Information about the policies assigned to a parameter.</p>
|
643 + | /// <p><a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
644 + | pub fn get_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterInlinePolicy>> {
|
645 + | &self.policies
|
646 + | }
|
647 + | /// <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>
|
648 + | pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
649 + | self.data_type = ::std::option::Option::Some(input.into());
|
650 + | self
|
651 + | }
|
652 + | /// <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>
|
653 + | pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
654 + | self.data_type = input;
|
655 + | self
|
656 + | }
|
657 + | /// <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>
|
658 + | pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
|
659 + | &self.data_type
|
660 + | }
|
661 + | /// Consumes the builder and constructs a [`ParameterHistory`](crate::types::ParameterHistory).
|
662 + | pub fn build(self) -> crate::types::ParameterHistory {
|
663 + | crate::types::ParameterHistory {
|
664 + | name: self.name,
|
665 + | r#type: self.r#type,
|
666 + | key_id: self.key_id,
|
667 + | last_modified_date: self.last_modified_date,
|
668 + | last_modified_user: self.last_modified_user,
|
669 + | description: self.description,
|
670 + | value: self.value,
|
671 + | allowed_pattern: self.allowed_pattern,
|
672 + | version: self.version.unwrap_or_default(),
|
673 + | labels: self.labels,
|
674 + | tier: self.tier,
|
675 + | policies: self.policies,
|
676 + | data_type: self.data_type,
|
677 + | }
|
678 + | }
|
679 + | }
|
680 + | impl ::std::fmt::Debug for ParameterHistoryBuilder {
|
681 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
682 + | let mut formatter = f.debug_struct("ParameterHistoryBuilder");
|
683 + | formatter.field("name", &self.name);
|
684 + | formatter.field("r#type", &self.r#type);
|
685 + | formatter.field("key_id", &self.key_id);
|
686 + | formatter.field("last_modified_date", &self.last_modified_date);
|
687 + | formatter.field("last_modified_user", &self.last_modified_user);
|
688 + | formatter.field("description", &self.description);
|
689 + | formatter.field("value", &"*** Sensitive Data Redacted ***");
|
690 + | formatter.field("allowed_pattern", &self.allowed_pattern);
|
691 + | formatter.field("version", &self.version);
|
692 + | formatter.field("labels", &self.labels);
|
693 + | formatter.field("tier", &self.tier);
|
694 + | formatter.field("policies", &self.policies);
|
695 + | formatter.field("data_type", &self.data_type);
|
696 + | formatter.finish()
|
697 + | }
|
698 + | }
|