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