1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Describes the name of a SSM document.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct DocumentIdentifier {
|
7 + | /// <p>The name of the SSM document.</p>
|
8 + | pub name: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The date the SSM document was created.</p>
|
10 + | pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
11 + | /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
|
12 + | pub display_name: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The Amazon Web Services user that created the document.</p>
|
14 + | pub owner: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
|
16 + | pub version_name: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The operating system platform.</p>
|
18 + | pub platform_types: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
|
19 + | /// <p>The document version.</p>
|
20 + | pub document_version: ::std::option::Option<::std::string::String>,
|
21 + | /// <p>The document type.</p>
|
22 + | pub document_type: ::std::option::Option<crate::types::DocumentType>,
|
23 + | /// <p>The schema version.</p>
|
24 + | pub schema_version: ::std::option::Option<::std::string::String>,
|
25 + | /// <p>The document format, either JSON or YAML.</p>
|
26 + | pub document_format: ::std::option::Option<crate::types::DocumentFormat>,
|
27 + | /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
|
28 + | pub target_type: ::std::option::Option<::std::string::String>,
|
29 + | /// <p>The tags, or metadata, that have been applied to the document.</p>
|
30 + | pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
31 + | /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
|
32 + | pub requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
|
33 + | /// <p>The current status of a document review.</p>
|
34 + | pub review_status: ::std::option::Option<crate::types::ReviewStatus>,
|
35 + | /// <p>The user in your organization who created the document.</p>
|
36 + | pub author: ::std::option::Option<::std::string::String>,
|
37 + | }
|
38 + | impl DocumentIdentifier {
|
39 + | /// <p>The name of the SSM document.</p>
|
40 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
41 + | self.name.as_deref()
|
42 + | }
|
43 + | /// <p>The date the SSM document was created.</p>
|
44 + | pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
45 + | self.created_date.as_ref()
|
46 + | }
|
47 + | /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
|
48 + | pub fn display_name(&self) -> ::std::option::Option<&str> {
|
49 + | self.display_name.as_deref()
|
50 + | }
|
51 + | /// <p>The Amazon Web Services user that created the document.</p>
|
52 + | pub fn owner(&self) -> ::std::option::Option<&str> {
|
53 + | self.owner.as_deref()
|
54 + | }
|
55 + | /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
|
56 + | pub fn version_name(&self) -> ::std::option::Option<&str> {
|
57 + | self.version_name.as_deref()
|
58 + | }
|
59 + | /// <p>The operating system platform.</p>
|
60 + | ///
|
61 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.platform_types.is_none()`.
|
62 + | pub fn platform_types(&self) -> &[crate::types::PlatformType] {
|
63 + | self.platform_types.as_deref().unwrap_or_default()
|
64 + | }
|
65 + | /// <p>The document version.</p>
|
66 + | pub fn document_version(&self) -> ::std::option::Option<&str> {
|
67 + | self.document_version.as_deref()
|
68 + | }
|
69 + | /// <p>The document type.</p>
|
70 + | pub fn document_type(&self) -> ::std::option::Option<&crate::types::DocumentType> {
|
71 + | self.document_type.as_ref()
|
72 + | }
|
73 + | /// <p>The schema version.</p>
|
74 + | pub fn schema_version(&self) -> ::std::option::Option<&str> {
|
75 + | self.schema_version.as_deref()
|
76 + | }
|
77 + | /// <p>The document format, either JSON or YAML.</p>
|
78 + | pub fn document_format(&self) -> ::std::option::Option<&crate::types::DocumentFormat> {
|
79 + | self.document_format.as_ref()
|
80 + | }
|
81 + | /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
|
82 + | pub fn target_type(&self) -> ::std::option::Option<&str> {
|
83 + | self.target_type.as_deref()
|
84 + | }
|
85 + | /// <p>The tags, or metadata, that have been applied to the document.</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 `.tags.is_none()`.
|
88 + | pub fn tags(&self) -> &[crate::types::Tag] {
|
89 + | self.tags.as_deref().unwrap_or_default()
|
90 + | }
|
91 + | /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
|
92 + | ///
|
93 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requires.is_none()`.
|
94 + | pub fn requires(&self) -> &[crate::types::DocumentRequires] {
|
95 + | self.requires.as_deref().unwrap_or_default()
|
96 + | }
|
97 + | /// <p>The current status of a document review.</p>
|
98 + | pub fn review_status(&self) -> ::std::option::Option<&crate::types::ReviewStatus> {
|
99 + | self.review_status.as_ref()
|
100 + | }
|
101 + | /// <p>The user in your organization who created the document.</p>
|
102 + | pub fn author(&self) -> ::std::option::Option<&str> {
|
103 + | self.author.as_deref()
|
104 + | }
|
105 + | }
|
106 + | static DOCUMENTIDENTIFIER_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
107 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Name", "com.amazonaws.ssm", "DocumentIdentifier"),
|
108 + | ::aws_smithy_schema::ShapeType::String,
|
109 + | "Name",
|
110 + | 0,
|
111 + | );
|
112 + | static DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts(
|
114 + | "com.amazonaws.ssm#DocumentIdentifier$CreatedDate",
|
115 + | "com.amazonaws.ssm",
|
116 + | "DocumentIdentifier",
|
117 + | ),
|
118 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
119 + | "CreatedDate",
|
120 + | 1,
|
121 + | );
|
122 + | static DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
123 + | ::aws_smithy_schema::ShapeId::from_parts(
|
124 + | "com.amazonaws.ssm#DocumentIdentifier$DisplayName",
|
125 + | "com.amazonaws.ssm",
|
126 + | "DocumentIdentifier",
|
127 + | ),
|
128 + | ::aws_smithy_schema::ShapeType::String,
|
129 + | "DisplayName",
|
130 + | 2,
|
131 + | );
|
132 + | static DOCUMENTIDENTIFIER_MEMBER_OWNER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
133 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Owner", "com.amazonaws.ssm", "DocumentIdentifier"),
|
134 + | ::aws_smithy_schema::ShapeType::String,
|
135 + | "Owner",
|
136 + | 3,
|
137 + | );
|
138 + | static DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
139 + | ::aws_smithy_schema::ShapeId::from_parts(
|
140 + | "com.amazonaws.ssm#DocumentIdentifier$VersionName",
|
141 + | "com.amazonaws.ssm",
|
142 + | "DocumentIdentifier",
|
143 + | ),
|
144 + | ::aws_smithy_schema::ShapeType::String,
|
145 + | "VersionName",
|
146 + | 4,
|
147 + | );
|
148 + | static DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
149 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#PlatformTypeList$member", "com.amazonaws.ssm", "PlatformTypeList"),
|
150 + | ::aws_smithy_schema::ShapeType::String,
|
151 + | "member",
|
152 + | 0,
|
153 + | )
|
154 + | .with_xml_name("PlatformType");
|
155 + | static DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
156 + | ::aws_smithy_schema::ShapeId::from_parts(
|
157 + | "com.amazonaws.ssm#DocumentIdentifier$PlatformTypes",
|
158 + | "com.amazonaws.ssm",
|
159 + | "DocumentIdentifier",
|
160 + | ),
|
161 + | ::aws_smithy_schema::ShapeType::List,
|
162 + | "PlatformTypes",
|
163 + | 5,
|
164 + | )
|
165 + | .with_list_member(&DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES_MEMBER);
|
166 + | static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
167 + | ::aws_smithy_schema::ShapeId::from_parts(
|
168 + | "com.amazonaws.ssm#DocumentIdentifier$DocumentVersion",
|
169 + | "com.amazonaws.ssm",
|
170 + | "DocumentIdentifier",
|
171 + | ),
|
172 + | ::aws_smithy_schema::ShapeType::String,
|
173 + | "DocumentVersion",
|
174 + | 6,
|
175 + | );
|
176 + | static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
177 + | ::aws_smithy_schema::ShapeId::from_parts(
|
178 + | "com.amazonaws.ssm#DocumentIdentifier$DocumentType",
|
179 + | "com.amazonaws.ssm",
|
180 + | "DocumentIdentifier",
|
181 + | ),
|
182 + | ::aws_smithy_schema::ShapeType::String,
|
183 + | "DocumentType",
|
184 + | 7,
|
185 + | );
|
186 + | static DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
187 + | ::aws_smithy_schema::ShapeId::from_parts(
|
188 + | "com.amazonaws.ssm#DocumentIdentifier$SchemaVersion",
|
189 + | "com.amazonaws.ssm",
|
190 + | "DocumentIdentifier",
|
191 + | ),
|
192 + | ::aws_smithy_schema::ShapeType::String,
|
193 + | "SchemaVersion",
|
194 + | 8,
|
195 + | );
|
196 + | static DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
197 + | ::aws_smithy_schema::ShapeId::from_parts(
|
198 + | "com.amazonaws.ssm#DocumentIdentifier$DocumentFormat",
|
199 + | "com.amazonaws.ssm",
|
200 + | "DocumentIdentifier",
|
201 + | ),
|
202 + | ::aws_smithy_schema::ShapeType::String,
|
203 + | "DocumentFormat",
|
204 + | 9,
|
205 + | );
|
206 + | static DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
207 + | ::aws_smithy_schema::ShapeId::from_parts(
|
208 + | "com.amazonaws.ssm#DocumentIdentifier$TargetType",
|
209 + | "com.amazonaws.ssm",
|
210 + | "DocumentIdentifier",
|
211 + | ),
|
212 + | ::aws_smithy_schema::ShapeType::String,
|
213 + | "TargetType",
|
214 + | 10,
|
215 + | );
|
216 + | static DOCUMENTIDENTIFIER_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
217 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
|
218 + | ::aws_smithy_schema::ShapeType::Structure,
|
219 + | "member",
|
220 + | 0,
|
221 + | );
|
222 + | static DOCUMENTIDENTIFIER_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
223 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Tags", "com.amazonaws.ssm", "DocumentIdentifier"),
|
224 + | ::aws_smithy_schema::ShapeType::List,
|
225 + | "Tags",
|
226 + | 11,
|
227 + | )
|
228 + | .with_list_member(&DOCUMENTIDENTIFIER_MEMBER_TAGS_MEMBER);
|
229 + | static DOCUMENTIDENTIFIER_MEMBER_REQUIRES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
230 + | ::aws_smithy_schema::ShapeId::from_parts(
|
231 + | "com.amazonaws.ssm#DocumentRequiresList$member",
|
232 + | "com.amazonaws.ssm",
|
233 + | "DocumentRequiresList",
|
234 + | ),
|
235 + | ::aws_smithy_schema::ShapeType::Structure,
|
236 + | "member",
|
237 + | 0,
|
238 + | );
|
239 + | static DOCUMENTIDENTIFIER_MEMBER_REQUIRES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
240 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Requires", "com.amazonaws.ssm", "DocumentIdentifier"),
|
241 + | ::aws_smithy_schema::ShapeType::List,
|
242 + | "Requires",
|
243 + | 12,
|
244 + | )
|
245 + | .with_list_member(&DOCUMENTIDENTIFIER_MEMBER_REQUIRES_MEMBER);
|
246 + | static DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
247 + | ::aws_smithy_schema::ShapeId::from_parts(
|
248 + | "com.amazonaws.ssm#DocumentIdentifier$ReviewStatus",
|
249 + | "com.amazonaws.ssm",
|
250 + | "DocumentIdentifier",
|
251 + | ),
|
252 + | ::aws_smithy_schema::ShapeType::String,
|
253 + | "ReviewStatus",
|
254 + | 13,
|
255 + | );
|
256 + | static DOCUMENTIDENTIFIER_MEMBER_AUTHOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
257 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier$Author", "com.amazonaws.ssm", "DocumentIdentifier"),
|
258 + | ::aws_smithy_schema::ShapeType::String,
|
259 + | "Author",
|
260 + | 14,
|
261 + | );
|
262 + | static DOCUMENTIDENTIFIER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
263 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentIdentifier", "com.amazonaws.ssm", "DocumentIdentifier"),
|
264 + | ::aws_smithy_schema::ShapeType::Structure,
|
265 + | &[
|
266 + | &DOCUMENTIDENTIFIER_MEMBER_NAME,
|
267 + | &DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE,
|
268 + | &DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME,
|
269 + | &DOCUMENTIDENTIFIER_MEMBER_OWNER,
|
270 + | &DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME,
|
271 + | &DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES,
|
272 + | &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION,
|
273 + | &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE,
|
274 + | &DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION,
|
275 + | &DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT,
|
276 + | &DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE,
|
277 + | &DOCUMENTIDENTIFIER_MEMBER_TAGS,
|
278 + | &DOCUMENTIDENTIFIER_MEMBER_REQUIRES,
|
279 + | &DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS,
|
280 + | &DOCUMENTIDENTIFIER_MEMBER_AUTHOR,
|
281 + | ],
|
282 + | );
|
283 + | impl DocumentIdentifier {
|
284 + | /// The schema for this shape.
|
285 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DOCUMENTIDENTIFIER_SCHEMA;
|
286 + | }
|
287 + | impl ::aws_smithy_schema::serde::SerializableStruct for DocumentIdentifier {
|
288 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
289 + | fn serialize_members(
|
290 + | &self,
|
291 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
292 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
293 + | if let Some(ref val) = self.name {
|
294 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_NAME, val)?;
|
295 + | }
|
296 + | if let Some(ref val) = self.created_date {
|
297 + | ser.write_timestamp(&DOCUMENTIDENTIFIER_MEMBER_CREATED_DATE, val)?;
|
298 + | }
|
299 + | if let Some(ref val) = self.display_name {
|
300 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DISPLAY_NAME, val)?;
|
301 + | }
|
302 + | if let Some(ref val) = self.owner {
|
303 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_OWNER, val)?;
|
304 + | }
|
305 + | if let Some(ref val) = self.version_name {
|
306 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_VERSION_NAME, val)?;
|
307 + | }
|
308 + | if let Some(ref val) = self.platform_types {
|
309 + | ser.write_list(
|
310 + | &DOCUMENTIDENTIFIER_MEMBER_PLATFORM_TYPES,
|
311 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
312 + | for item in val {
|
313 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
|
314 + | }
|
315 + | Ok(())
|
316 + | },
|
317 + | )?;
|
318 + | }
|
319 + | if let Some(ref val) = self.document_version {
|
320 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_VERSION, val)?;
|
321 + | }
|
322 + | if let Some(ref val) = self.document_type {
|
323 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_TYPE, val.as_str())?;
|
324 + | }
|
325 + | if let Some(ref val) = self.schema_version {
|
326 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_SCHEMA_VERSION, val)?;
|
327 + | }
|
328 + | if let Some(ref val) = self.document_format {
|
329 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_DOCUMENT_FORMAT, val.as_str())?;
|
330 + | }
|
331 + | if let Some(ref val) = self.target_type {
|
332 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_TARGET_TYPE, val)?;
|
333 + | }
|
334 + | if let Some(ref val) = self.tags {
|
335 + | ser.write_list(
|
336 + | &DOCUMENTIDENTIFIER_MEMBER_TAGS,
|
337 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
338 + | for item in val {
|
339 + | ser.write_struct(crate::types::Tag::SCHEMA, item)?;
|
340 + | }
|
341 + | Ok(())
|
342 + | },
|
343 + | )?;
|
344 + | }
|
345 + | if let Some(ref val) = self.requires {
|
346 + | ser.write_list(
|
347 + | &DOCUMENTIDENTIFIER_MEMBER_REQUIRES,
|
348 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
349 + | for item in val {
|
350 + | ser.write_struct(crate::types::DocumentRequires::SCHEMA, item)?;
|
351 + | }
|
352 + | Ok(())
|
353 + | },
|
354 + | )?;
|
355 + | }
|
356 + | if let Some(ref val) = self.review_status {
|
357 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_REVIEW_STATUS, val.as_str())?;
|
358 + | }
|
359 + | if let Some(ref val) = self.author {
|
360 + | ser.write_string(&DOCUMENTIDENTIFIER_MEMBER_AUTHOR, val)?;
|
361 + | }
|
362 + | Ok(())
|
363 + | }
|
364 + | }
|
365 + | impl DocumentIdentifier {
|
366 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
367 + | pub fn deserialize(
|
368 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
369 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
370 + | #[allow(unused_variables, unused_mut)]
|
371 + | let mut builder = Self::builder();
|
372 + | #[allow(
|
373 + | unused_variables,
|
374 + | unreachable_code,
|
375 + | clippy::single_match,
|
376 + | clippy::match_single_binding,
|
377 + | clippy::diverging_sub_expression
|
378 + | )]
|
379 + | deserializer.read_struct(&DOCUMENTIDENTIFIER_SCHEMA, &mut |member, deser| {
|
380 + | match member.member_index() {
|
381 + | Some(0) => {
|
382 + | if deser.is_null() {
|
383 + | deser.read_null()?;
|
384 + | } else {
|
385 + | builder.name = Some(deser.read_string(member)?);
|
386 + | }
|
387 + | }
|
388 + | Some(1) => {
|
389 + | if deser.is_null() {
|
390 + | deser.read_null()?;
|
391 + | } else {
|
392 + | builder.created_date = Some(deser.read_timestamp(member)?);
|
393 + | }
|
394 + | }
|
395 + | Some(2) => {
|
396 + | if deser.is_null() {
|
397 + | deser.read_null()?;
|
398 + | } else {
|
399 + | builder.display_name = Some(deser.read_string(member)?);
|
400 + | }
|
401 + | }
|
402 + | Some(3) => {
|
403 + | if deser.is_null() {
|
404 + | deser.read_null()?;
|
405 + | } else {
|
406 + | builder.owner = Some(deser.read_string(member)?);
|
407 + | }
|
408 + | }
|
409 + | Some(4) => {
|
410 + | if deser.is_null() {
|
411 + | deser.read_null()?;
|
412 + | } else {
|
413 + | builder.version_name = Some(deser.read_string(member)?);
|
414 + | }
|
415 + | }
|
416 + | Some(5) => {
|
417 + | if deser.is_null() {
|
418 + | deser.read_null()?;
|
419 + | } else {
|
420 + | builder.platform_types = Some({
|
421 + | let mut container = Vec::new();
|
422 + | deser.read_list(member, &mut |deser| {
|
423 + | container.push(crate::types::PlatformType::from(
|
424 + | deser.read_string(&::aws_smithy_schema::prelude::STRING)?.as_str(),
|
425 + | ));
|
426 + | Ok(())
|
427 + | })?;
|
428 + | container
|
429 + | });
|
430 + | }
|
431 + | }
|
432 + | Some(6) => {
|
433 + | if deser.is_null() {
|
434 + | deser.read_null()?;
|
435 + | } else {
|
436 + | builder.document_version = Some(deser.read_string(member)?);
|
437 + | }
|
438 + | }
|
439 + | Some(7) => {
|
440 + | if deser.is_null() {
|
441 + | deser.read_null()?;
|
442 + | } else {
|
443 + | builder.document_type = Some(crate::types::DocumentType::from(deser.read_string(member)?.as_str()));
|
444 + | }
|
445 + | }
|
446 + | Some(8) => {
|
447 + | if deser.is_null() {
|
448 + | deser.read_null()?;
|
449 + | } else {
|
450 + | builder.schema_version = Some(deser.read_string(member)?);
|
451 + | }
|
452 + | }
|
453 + | Some(9) => {
|
454 + | if deser.is_null() {
|
455 + | deser.read_null()?;
|
456 + | } else {
|
457 + | builder.document_format = Some(crate::types::DocumentFormat::from(deser.read_string(member)?.as_str()));
|
458 + | }
|
459 + | }
|
460 + | Some(10) => {
|
461 + | if deser.is_null() {
|
462 + | deser.read_null()?;
|
463 + | } else {
|
464 + | builder.target_type = Some(deser.read_string(member)?);
|
465 + | }
|
466 + | }
|
467 + | Some(11) => {
|
468 + | if deser.is_null() {
|
469 + | deser.read_null()?;
|
470 + | } else {
|
471 + | builder.tags = Some({
|
472 + | let mut container = Vec::new();
|
473 + | deser.read_list(member, &mut |deser| {
|
474 + | container.push(crate::types::Tag::deserialize(deser)?);
|
475 + | Ok(())
|
476 + | })?;
|
477 + | container
|
478 + | });
|
479 + | }
|
480 + | }
|
481 + | Some(12) => {
|
482 + | if deser.is_null() {
|
483 + | deser.read_null()?;
|
484 + | } else {
|
485 + | builder.requires = Some({
|
486 + | let mut container = Vec::new();
|
487 + | deser.read_list(member, &mut |deser| {
|
488 + | container.push(crate::types::DocumentRequires::deserialize(deser)?);
|
489 + | Ok(())
|
490 + | })?;
|
491 + | container
|
492 + | });
|
493 + | }
|
494 + | }
|
495 + | Some(13) => {
|
496 + | if deser.is_null() {
|
497 + | deser.read_null()?;
|
498 + | } else {
|
499 + | builder.review_status = Some(crate::types::ReviewStatus::from(deser.read_string(member)?.as_str()));
|
500 + | }
|
501 + | }
|
502 + | Some(14) => {
|
503 + | if deser.is_null() {
|
504 + | deser.read_null()?;
|
505 + | } else {
|
506 + | builder.author = Some(deser.read_string(member)?);
|
507 + | }
|
508 + | }
|
509 + | _ => {}
|
510 + | }
|
511 + | Ok(())
|
512 + | })?;
|
513 + | Ok(builder.build())
|
514 + | }
|
515 + | }
|
516 + | impl DocumentIdentifier {
|
517 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
518 + | pub fn deserialize_with_response(
|
519 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
520 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
521 + | _status: u16,
|
522 + | _body: &[u8],
|
523 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
524 + | Self::deserialize(deserializer)
|
525 + | }
|
526 + | }
|
527 + | impl DocumentIdentifier {
|
528 + | /// Creates a new builder-style object to manufacture [`DocumentIdentifier`](crate::types::DocumentIdentifier).
|
529 + | pub fn builder() -> crate::types::builders::DocumentIdentifierBuilder {
|
530 + | crate::types::builders::DocumentIdentifierBuilder::default()
|
531 + | }
|
532 + | }
|
533 + |
|
534 + | /// A builder for [`DocumentIdentifier`](crate::types::DocumentIdentifier).
|
535 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
536 + | #[non_exhaustive]
|
537 + | pub struct DocumentIdentifierBuilder {
|
538 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
539 + | pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
540 + | pub(crate) display_name: ::std::option::Option<::std::string::String>,
|
541 + | pub(crate) owner: ::std::option::Option<::std::string::String>,
|
542 + | pub(crate) version_name: ::std::option::Option<::std::string::String>,
|
543 + | pub(crate) platform_types: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
|
544 + | pub(crate) document_version: ::std::option::Option<::std::string::String>,
|
545 + | pub(crate) document_type: ::std::option::Option<crate::types::DocumentType>,
|
546 + | pub(crate) schema_version: ::std::option::Option<::std::string::String>,
|
547 + | pub(crate) document_format: ::std::option::Option<crate::types::DocumentFormat>,
|
548 + | pub(crate) target_type: ::std::option::Option<::std::string::String>,
|
549 + | pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
|
550 + | pub(crate) requires: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>,
|
551 + | pub(crate) review_status: ::std::option::Option<crate::types::ReviewStatus>,
|
552 + | pub(crate) author: ::std::option::Option<::std::string::String>,
|
553 + | }
|
554 + | impl DocumentIdentifierBuilder {
|
555 + | /// <p>The name of the SSM document.</p>
|
556 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
557 + | self.name = ::std::option::Option::Some(input.into());
|
558 + | self
|
559 + | }
|
560 + | /// <p>The name of the SSM document.</p>
|
561 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
562 + | self.name = input;
|
563 + | self
|
564 + | }
|
565 + | /// <p>The name of the SSM document.</p>
|
566 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
567 + | &self.name
|
568 + | }
|
569 + | /// <p>The date the SSM document was created.</p>
|
570 + | pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
571 + | self.created_date = ::std::option::Option::Some(input);
|
572 + | self
|
573 + | }
|
574 + | /// <p>The date the SSM document was created.</p>
|
575 + | pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
576 + | self.created_date = input;
|
577 + | self
|
578 + | }
|
579 + | /// <p>The date the SSM document was created.</p>
|
580 + | pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
581 + | &self.created_date
|
582 + | }
|
583 + | /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
|
584 + | pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
585 + | self.display_name = ::std::option::Option::Some(input.into());
|
586 + | self
|
587 + | }
|
588 + | /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
|
589 + | pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
590 + | self.display_name = input;
|
591 + | self
|
592 + | }
|
593 + | /// <p>An optional field where you can specify a friendly name for the SSM document. This value can differ for each version of the document. If you want to update this value, see <code>UpdateDocument</code>.</p>
|
594 + | pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
|
595 + | &self.display_name
|
596 + | }
|
597 + | /// <p>The Amazon Web Services user that created the document.</p>
|
598 + | pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
599 + | self.owner = ::std::option::Option::Some(input.into());
|
600 + | self
|
601 + | }
|
602 + | /// <p>The Amazon Web Services user that created the document.</p>
|
603 + | pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
604 + | self.owner = input;
|
605 + | self
|
606 + | }
|
607 + | /// <p>The Amazon Web Services user that created the document.</p>
|
608 + | pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
|
609 + | &self.owner
|
610 + | }
|
611 + | /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
|
612 + | pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
613 + | self.version_name = ::std::option::Option::Some(input.into());
|
614 + | self
|
615 + | }
|
616 + | /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
|
617 + | pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
618 + | self.version_name = input;
|
619 + | self
|
620 + | }
|
621 + | /// <p>An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.</p>
|
622 + | pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
|
623 + | &self.version_name
|
624 + | }
|
625 + | /// Appends an item to `platform_types`.
|
626 + | ///
|
627 + | /// To override the contents of this collection use [`set_platform_types`](Self::set_platform_types).
|
628 + | ///
|
629 + | /// <p>The operating system platform.</p>
|
630 + | pub fn platform_types(mut self, input: crate::types::PlatformType) -> Self {
|
631 + | let mut v = self.platform_types.unwrap_or_default();
|
632 + | v.push(input);
|
633 + | self.platform_types = ::std::option::Option::Some(v);
|
634 + | self
|
635 + | }
|
636 + | /// <p>The operating system platform.</p>
|
637 + | pub fn set_platform_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>) -> Self {
|
638 + | self.platform_types = input;
|
639 + | self
|
640 + | }
|
641 + | /// <p>The operating system platform.</p>
|
642 + | pub fn get_platform_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlatformType>> {
|
643 + | &self.platform_types
|
644 + | }
|
645 + | /// <p>The document version.</p>
|
646 + | pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
647 + | self.document_version = ::std::option::Option::Some(input.into());
|
648 + | self
|
649 + | }
|
650 + | /// <p>The document version.</p>
|
651 + | pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
652 + | self.document_version = input;
|
653 + | self
|
654 + | }
|
655 + | /// <p>The document version.</p>
|
656 + | pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
|
657 + | &self.document_version
|
658 + | }
|
659 + | /// <p>The document type.</p>
|
660 + | pub fn document_type(mut self, input: crate::types::DocumentType) -> Self {
|
661 + | self.document_type = ::std::option::Option::Some(input);
|
662 + | self
|
663 + | }
|
664 + | /// <p>The document type.</p>
|
665 + | pub fn set_document_type(mut self, input: ::std::option::Option<crate::types::DocumentType>) -> Self {
|
666 + | self.document_type = input;
|
667 + | self
|
668 + | }
|
669 + | /// <p>The document type.</p>
|
670 + | pub fn get_document_type(&self) -> &::std::option::Option<crate::types::DocumentType> {
|
671 + | &self.document_type
|
672 + | }
|
673 + | /// <p>The schema version.</p>
|
674 + | pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
675 + | self.schema_version = ::std::option::Option::Some(input.into());
|
676 + | self
|
677 + | }
|
678 + | /// <p>The schema version.</p>
|
679 + | pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
680 + | self.schema_version = input;
|
681 + | self
|
682 + | }
|
683 + | /// <p>The schema version.</p>
|
684 + | pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
|
685 + | &self.schema_version
|
686 + | }
|
687 + | /// <p>The document format, either JSON or YAML.</p>
|
688 + | pub fn document_format(mut self, input: crate::types::DocumentFormat) -> Self {
|
689 + | self.document_format = ::std::option::Option::Some(input);
|
690 + | self
|
691 + | }
|
692 + | /// <p>The document format, either JSON or YAML.</p>
|
693 + | pub fn set_document_format(mut self, input: ::std::option::Option<crate::types::DocumentFormat>) -> Self {
|
694 + | self.document_format = input;
|
695 + | self
|
696 + | }
|
697 + | /// <p>The document format, either JSON or YAML.</p>
|
698 + | pub fn get_document_format(&self) -> &::std::option::Option<crate::types::DocumentFormat> {
|
699 + | &self.document_format
|
700 + | }
|
701 + | /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
|
702 + | pub fn target_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
703 + | self.target_type = ::std::option::Option::Some(input.into());
|
704 + | self
|
705 + | }
|
706 + | /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
|
707 + | pub fn set_target_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
708 + | self.target_type = input;
|
709 + | self
|
710 + | }
|
711 + | /// <p>The target type which defines the kinds of resources the document can run on. For example, <code>/AWS::EC2::Instance</code>. For a list of valid resource types, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services resource and property types reference</a> in the <i>CloudFormation User Guide</i>.</p>
|
712 + | pub fn get_target_type(&self) -> &::std::option::Option<::std::string::String> {
|
713 + | &self.target_type
|
714 + | }
|
715 + | /// Appends an item to `tags`.
|
716 + | ///
|
717 + | /// To override the contents of this collection use [`set_tags`](Self::set_tags).
|
718 + | ///
|
719 + | /// <p>The tags, or metadata, that have been applied to the document.</p>
|
720 + | pub fn tags(mut self, input: crate::types::Tag) -> Self {
|
721 + | let mut v = self.tags.unwrap_or_default();
|
722 + | v.push(input);
|
723 + | self.tags = ::std::option::Option::Some(v);
|
724 + | self
|
725 + | }
|
726 + | /// <p>The tags, or metadata, that have been applied to the document.</p>
|
727 + | pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
|
728 + | self.tags = input;
|
729 + | self
|
730 + | }
|
731 + | /// <p>The tags, or metadata, that have been applied to the document.</p>
|
732 + | pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
|
733 + | &self.tags
|
734 + | }
|
735 + | /// Appends an item to `requires`.
|
736 + | ///
|
737 + | /// To override the contents of this collection use [`set_requires`](Self::set_requires).
|
738 + | ///
|
739 + | /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
|
740 + | pub fn requires(mut self, input: crate::types::DocumentRequires) -> Self {
|
741 + | let mut v = self.requires.unwrap_or_default();
|
742 + | v.push(input);
|
743 + | self.requires = ::std::option::Option::Some(v);
|
744 + | self
|
745 + | }
|
746 + | /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
|
747 + | pub fn set_requires(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>>) -> Self {
|
748 + | self.requires = input;
|
749 + | self
|
750 + | }
|
751 + | /// <p>A list of SSM documents required by a document. For example, an <code>ApplicationConfiguration</code> document requires an <code>ApplicationConfigurationSchema</code> document.</p>
|
752 + | pub fn get_requires(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentRequires>> {
|
753 + | &self.requires
|
754 + | }
|
755 + | /// <p>The current status of a document review.</p>
|
756 + | pub fn review_status(mut self, input: crate::types::ReviewStatus) -> Self {
|
757 + | self.review_status = ::std::option::Option::Some(input);
|
758 + | self
|
759 + | }
|
760 + | /// <p>The current status of a document review.</p>
|
761 + | pub fn set_review_status(mut self, input: ::std::option::Option<crate::types::ReviewStatus>) -> Self {
|
762 + | self.review_status = input;
|
763 + | self
|
764 + | }
|
765 + | /// <p>The current status of a document review.</p>
|
766 + | pub fn get_review_status(&self) -> &::std::option::Option<crate::types::ReviewStatus> {
|
767 + | &self.review_status
|
768 + | }
|
769 + | /// <p>The user in your organization who created the document.</p>
|
770 + | pub fn author(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
771 + | self.author = ::std::option::Option::Some(input.into());
|
772 + | self
|
773 + | }
|
774 + | /// <p>The user in your organization who created the document.</p>
|
775 + | pub fn set_author(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
776 + | self.author = input;
|
777 + | self
|
778 + | }
|
779 + | /// <p>The user in your organization who created the document.</p>
|
780 + | pub fn get_author(&self) -> &::std::option::Option<::std::string::String> {
|
781 + | &self.author
|
782 + | }
|
783 + | /// Consumes the builder and constructs a [`DocumentIdentifier`](crate::types::DocumentIdentifier).
|
784 + | pub fn build(self) -> crate::types::DocumentIdentifier {
|
785 + | crate::types::DocumentIdentifier {
|
786 + | name: self.name,
|
787 + | created_date: self.created_date,
|
788 + | display_name: self.display_name,
|
789 + | owner: self.owner,
|
790 + | version_name: self.version_name,
|
791 + | platform_types: self.platform_types,
|
792 + | document_version: self.document_version,
|
793 + | document_type: self.document_type,
|
794 + | schema_version: self.schema_version,
|
795 + | document_format: self.document_format,
|
796 + | target_type: self.target_type,
|
797 + | tags: self.tags,
|
798 + | requires: self.requires,
|
799 + | review_status: self.review_status,
|
800 + | author: self.author,
|
801 + | }
|
802 + | }
|
803 + | }
|