AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_document/_get_document_output.rs

@@ -0,1 +0,831 @@
           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  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_document/builders.rs

@@ -0,1 +0,167 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::get_document::_get_document_input::GetDocumentInputBuilder;
           3  +
           4  +
pub use crate::operation::get_document::_get_document_output::GetDocumentOutputBuilder;
           5  +
           6  +
impl crate::operation::get_document::builders::GetDocumentInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::get_document::GetDocumentOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::get_document::GetDocumentError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.get_document();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `GetDocument`.
          24  +
///
          25  +
/// <p>Gets the contents of the specified Amazon Web Services Systems Manager document (SSM document).</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct GetDocumentFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::get_document::builders::GetDocumentInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::get_document::GetDocumentOutput,
          35  +
        crate::operation::get_document::GetDocumentError,
          36  +
    > for GetDocumentFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::get_document::GetDocumentOutput,
          44  +
            crate::operation::get_document::GetDocumentError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl GetDocumentFluentBuilder {
          51  +
    /// Creates a new `GetDocumentFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the GetDocument as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::get_document::builders::GetDocumentInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::get_document::GetDocumentOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::get_document::GetDocumentError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::get_document::GetDocument::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::get_document::GetDocument::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::get_document::GetDocumentOutput,
          97  +
        crate::operation::get_document::GetDocumentError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// <p>The name of the SSM document.</p>
         112  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.name(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The name of the SSM document.</p>
         117  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_name(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The name of the SSM document.</p>
         122  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_name()
         124  +
    }
         125  +
    /// <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>
         126  +
    pub fn version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         127  +
        self.inner = self.inner.version_name(input.into());
         128  +
        self
         129  +
    }
         130  +
    /// <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>
         131  +
    pub fn set_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         132  +
        self.inner = self.inner.set_version_name(input);
         133  +
        self
         134  +
    }
         135  +
    /// <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>
         136  +
    pub fn get_version_name(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        self.inner.get_version_name()
         138  +
    }
         139  +
    /// <p>The document version for which you want information.</p>
         140  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         141  +
        self.inner = self.inner.document_version(input.into());
         142  +
        self
         143  +
    }
         144  +
    /// <p>The document version for which you want information.</p>
         145  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         146  +
        self.inner = self.inner.set_document_version(input);
         147  +
        self
         148  +
    }
         149  +
    /// <p>The document version for which you want information.</p>
         150  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         151  +
        self.inner.get_document_version()
         152  +
    }
         153  +
    /// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
         154  +
    pub fn document_format(mut self, input: crate::types::DocumentFormat) -> Self {
         155  +
        self.inner = self.inner.document_format(input);
         156  +
        self
         157  +
    }
         158  +
    /// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
         159  +
    pub fn set_document_format(mut self, input: ::std::option::Option<crate::types::DocumentFormat>) -> Self {
         160  +
        self.inner = self.inner.set_document_format(input);
         161  +
        self
         162  +
    }
         163  +
    /// <p>Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.</p>
         164  +
    pub fn get_document_format(&self) -> &::std::option::Option<crate::types::DocumentFormat> {
         165  +
        self.inner.get_document_format()
         166  +
    }
         167  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_execution_preview.rs

@@ -0,1 +0,561 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `GetExecutionPreview`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct GetExecutionPreview;
           6  +
impl GetExecutionPreview {
           7  +
    /// Creates a new `GetExecutionPreview`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_execution_preview::GetExecutionPreviewInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          15  +
        crate::operation::get_execution_preview::GetExecutionPreviewOutput::SCHEMA;
          16  +
    pub(crate) async fn orchestrate(
          17  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          18  +
        input: crate::operation::get_execution_preview::GetExecutionPreviewInput,
          19  +
    ) -> ::std::result::Result<
          20  +
        crate::operation::get_execution_preview::GetExecutionPreviewOutput,
          21  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          22  +
            crate::operation::get_execution_preview::GetExecutionPreviewError,
          23  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          24  +
        >,
          25  +
    > {
          26  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          27  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          28  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          29  +
        >| {
          30  +
            err.map_service_error(|err| {
          31  +
                err.downcast::<crate::operation::get_execution_preview::GetExecutionPreviewError>()
          32  +
                    .expect("correct error type")
          33  +
            })
          34  +
        };
          35  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          36  +
            .await
          37  +
            .map_err(map_err)?;
          38  +
        let output = context.finalize().map_err(map_err)?;
          39  +
        ::std::result::Result::Ok(
          40  +
            output
          41  +
                .downcast::<crate::operation::get_execution_preview::GetExecutionPreviewOutput>()
          42  +
                .expect("correct output type"),
          43  +
        )
          44  +
    }
          45  +
          46  +
    pub(crate) async fn orchestrate_with_stop_point(
          47  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          48  +
        input: crate::operation::get_execution_preview::GetExecutionPreviewInput,
          49  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          50  +
    ) -> ::std::result::Result<
          51  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          52  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          53  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          54  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          55  +
        >,
          56  +
    > {
          57  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          58  +
        use ::tracing::Instrument;
          59  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "GetExecutionPreview", input, runtime_plugins, stop_point)
          60  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          61  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          62  +
            .instrument(::tracing::debug_span!(
          63  +
                "SSM.GetExecutionPreview",
          64  +
                "rpc.service" = "SSM",
          65  +
                "rpc.method" = "GetExecutionPreview",
          66  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          67  +
                "rpc.system" = "aws-api",
          68  +
            ))
          69  +
            .await
          70  +
    }
          71  +
          72  +
    pub(crate) fn operation_runtime_plugins(
          73  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          74  +
        client_config: &crate::config::Config,
          75  +
        config_override: ::std::option::Option<crate::config::Builder>,
          76  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          77  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          78  +
          79  +
        if let ::std::option::Option::Some(config_override) = config_override {
          80  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          81  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          82  +
            }
          83  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          84  +
                config_override,
          85  +
                client_config.config.clone(),
          86  +
                &client_config.runtime_components,
          87  +
            ));
          88  +
        }
          89  +
        runtime_plugins
          90  +
    }
          91  +
}
          92  +
/// Per-operation error registry. Contains an entry for every modeled
          93  +
/// error this operation can throw.
          94  +
///
          95  +
/// Used by the schema-serde error path as the operation-scoped lookup
          96  +
/// for registry-backed error reification: an error code that does not
          97  +
/// match one of the operation's modeled errors directly is resolved
          98  +
/// against this registry first, then widened to the service-wide error
          99  +
/// registry.
         100  +
pub(crate) mod error_registry {
         101  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         102  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         103  +
                            .insert_error_shape(
         104  +
                        crate::types::error::InternalServerError::SCHEMA,
         105  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         106  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         107  +
                        },
         108  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         109  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         110  +
                        },
         111  +
                    )
         112  +
.insert_error_shape(
         113  +
                        crate::types::error::ResourceNotFoundException::SCHEMA,
         114  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         115  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
         116  +
                        },
         117  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         118  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
         119  +
                        },
         120  +
                    )
         121  +
                            .build()
         122  +
    });
         123  +
}
         124  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetExecutionPreview {
         125  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         126  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetExecutionPreview");
         127  +
         128  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         129  +
            GetExecutionPreviewRequestSerializer,
         130  +
        ));
         131  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         132  +
            GetExecutionPreviewResponseDeserializer,
         133  +
        ));
         134  +
         135  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         136  +
            crate::config::auth::Params::builder()
         137  +
                .operation_name("GetExecutionPreview")
         138  +
                .build()
         139  +
                .expect("required fields set"),
         140  +
        ));
         141  +
         142  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         143  +
            "GetExecutionPreview",
         144  +
            "SSM",
         145  +
        ));
         146  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         147  +
        signing_options.double_uri_encode = true;
         148  +
        signing_options.content_sha256_header = false;
         149  +
        signing_options.normalize_uri_path = true;
         150  +
        signing_options.payload_override = None;
         151  +
         152  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         153  +
            signing_options,
         154  +
            ..::std::default::Default::default()
         155  +
        });
         156  +
         157  +
        ::std::option::Option::Some(cfg.freeze())
         158  +
    }
         159  +
         160  +
    fn runtime_components(
         161  +
        &self,
         162  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         163  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         164  +
        #[allow(unused_mut)]
         165  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetExecutionPreview")
         166  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         167  +
                GetExecutionPreviewTelemetryInputCaptureInterceptor,
         168  +
            ))
         169  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         170  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         171  +
            ))
         172  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         173  +
                GetExecutionPreviewEndpointParamsInterceptor,
         174  +
            ))
         175  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         176  +
                crate::operation::get_execution_preview::GetExecutionPreviewError,
         177  +
            >::new())
         178  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         179  +
                crate::operation::get_execution_preview::GetExecutionPreviewError,
         180  +
            >::new())
         181  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         182  +
                crate::operation::get_execution_preview::GetExecutionPreviewError,
         183  +
            >::new())
         184  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         185  +
                crate::operation::get_execution_preview::GetExecutionPreviewError,
         186  +
            >::new());
         187  +
         188  +
        ::std::borrow::Cow::Owned(rcb)
         189  +
    }
         190  +
}
         191  +
         192  +
#[derive(Debug)]
         193  +
struct GetExecutionPreviewTelemetryInputCaptureInterceptor;
         194  +
         195  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         196  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetExecutionPreviewTelemetryInputCaptureInterceptor {
         197  +
    fn name(&self) -> &'static str {
         198  +
        "GetExecutionPreviewTelemetryInputCaptureInterceptor"
         199  +
    }
         200  +
         201  +
    fn read_before_execution(
         202  +
        &self,
         203  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         204  +
            '_,
         205  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         206  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         207  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         208  +
        >,
         209  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         210  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         211  +
        // Nothing to do unless the customer opted in by naming members to record.
         212  +
        let ::std::option::Option::Some(requested) = cfg
         213  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         214  +
            .filter(|r| !r.is_empty())
         215  +
        else {
         216  +
            return ::std::result::Result::Ok(());
         217  +
        };
         218  +
         219  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetExecutionPreviewInput>() else {
         220  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         221  +
            return ::std::result::Result::Ok(());
         222  +
        };
         223  +
         224  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         225  +
        if requested.should_capture("ExecutionPreviewId") {
         226  +
            if let ::std::option::Option::Some(value) = input.execution_preview_id.as_deref() {
         227  +
                captured.insert("ExecutionPreviewId", value);
         228  +
            }
         229  +
        }
         230  +
         231  +
        cfg.interceptor_state().store_put(captured);
         232  +
        ::std::result::Result::Ok(())
         233  +
    }
         234  +
}
         235  +
#[derive(Debug)]
         236  +
struct GetExecutionPreviewResponseDeserializer;
         237  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetExecutionPreviewResponseDeserializer {
         238  +
    fn deserialize_nonstreaming_with_config(
         239  +
        &self,
         240  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         241  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         242  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         243  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         244  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         245  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         246  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         247  +
        // loads `body` before firing this hook.
         248  +
        let body = response.body().bytes().expect("body loaded");
         249  +
        let headers = response.headers();
         250  +
        #[allow(unused_mut)]
         251  +
        let mut force_error = false;
         252  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         253  +
        if !success && status != 200 || force_error {
         254  +
            let protocol = _cfg
         255  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         256  +
                .expect("a SharedClientProtocol is required");
         257  +
            #[allow(unused_mut)]
         258  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         259  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         260  +
            })?;
         261  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         262  +
            let generic = generic_builder.build();
         263  +
            let error_code = match generic.code() {
         264  +
                ::std::option::Option::Some(code) => code,
         265  +
                ::std::option::Option::None => {
         266  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         267  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         268  +
                            crate::operation::get_execution_preview::GetExecutionPreviewError::unhandled(generic),
         269  +
                        ),
         270  +
                    ))
         271  +
                }
         272  +
            };
         273  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         274  +
            let err = match error_code {
         275  +
                "InternalServerError" => crate::operation::get_execution_preview::GetExecutionPreviewError::InternalServerError({
         276  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         277  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         278  +
                            &mut *deser,
         279  +
                            response.headers(),
         280  +
                            response.status().into(),
         281  +
                            body,
         282  +
                        )
         283  +
                    }) {
         284  +
                        ::std::result::Result::Ok(val) => val,
         285  +
                        ::std::result::Result::Err(e) => {
         286  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         287  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         288  +
                            ))
         289  +
                        }
         290  +
                    };
         291  +
                    tmp.meta = generic;
         292  +
                    if tmp.message.is_none() {
         293  +
                        tmp.message = _error_message;
         294  +
                    }
         295  +
                    tmp
         296  +
                }),
         297  +
                "ResourceNotFoundException" => crate::operation::get_execution_preview::GetExecutionPreviewError::ResourceNotFoundException({
         298  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         299  +
                        crate::types::error::ResourceNotFoundException::deserialize_with_response(
         300  +
                            &mut *deser,
         301  +
                            response.headers(),
         302  +
                            response.status().into(),
         303  +
                            body,
         304  +
                        )
         305  +
                    }) {
         306  +
                        ::std::result::Result::Ok(val) => val,
         307  +
                        ::std::result::Result::Err(e) => {
         308  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         309  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         310  +
                            ))
         311  +
                        }
         312  +
                    };
         313  +
                    tmp.meta = generic;
         314  +
                    if tmp.message.is_none() {
         315  +
                        tmp.message = _error_message;
         316  +
                    }
         317  +
                    tmp
         318  +
                }),
         319  +
                _ => {
         320  +
                    // Registry-backed, operation-scoped reification of an error whose
         321  +
                    // code this operation does not model directly: the operation's own
         322  +
                    // error registry is consulted first, then the lookup widens to the
         323  +
                    // service-wide error registry. On a hit, the reified error is attached
         324  +
                    // as the source of the returned unhandled error while its metadata
         325  +
                    // (code, message, request id) is preserved; on a miss the generic
         326  +
                    // error is returned unchanged.
         327  +
                    match protocol
         328  +
                        .deserialize_error_response(response, _cfg)
         329  +
                        .ok()
         330  +
                        .and_then(|mut deser| {
         331  +
                            ::aws_smithy_schema::registry::reify_error(
         332  +
                                crate::operation::get_execution_preview::error_registry::REGISTRY
         333  +
                                    .or(&crate::error_type_registry::REGISTRY),
         334  +
                                error_code,
         335  +
                                &mut *deser,
         336  +
                            )
         337  +
                        }) {
         338  +
                        ::std::option::Option::Some(source) => <crate::operation::get_execution_preview::GetExecutionPreviewError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         339  +
                        ::std::option::Option::None => crate::operation::get_execution_preview::GetExecutionPreviewError::generic(generic),
         340  +
                    }
         341  +
                }
         342  +
            };
         343  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         344  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         345  +
            ))
         346  +
        } else {
         347  +
            let protocol = _cfg
         348  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         349  +
                .expect("a SharedClientProtocol is required");
         350  +
            let mut deser = protocol
         351  +
                .deserialize_response(response, GetExecutionPreview::OUTPUT_SCHEMA, _cfg)
         352  +
                .map_err(|e| {
         353  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         354  +
                })?;
         355  +
            // body and headers are already in scope from the top of the function;
         356  +
            // alias `headers` as `_response_headers` so MutateOutput
         357  +
            // customizations have a stable name to read from.
         358  +
            let _response_headers = headers;
         359  +
            #[allow(unused_mut)]
         360  +
            let mut output = crate::operation::get_execution_preview::GetExecutionPreviewOutput::deserialize_with_response(
         361  +
                &mut *deser,
         362  +
                _response_headers,
         363  +
                response.status().into(),
         364  +
                body,
         365  +
            )
         366  +
            .map_err(|e| {
         367  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         368  +
            })?;
         369  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         370  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         371  +
        }
         372  +
    }
         373  +
}
         374  +
#[derive(Debug)]
         375  +
struct GetExecutionPreviewRequestSerializer;
         376  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetExecutionPreviewRequestSerializer {
         377  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         378  +
    fn serialize_input(
         379  +
        &self,
         380  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         381  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         382  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         383  +
        let input = input
         384  +
            .downcast::<crate::operation::get_execution_preview::GetExecutionPreviewInput>()
         385  +
            .expect("correct type");
         386  +
         387  +
        let protocol = _cfg
         388  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         389  +
            .expect("a SharedClientProtocol is required");
         390  +
        let mut request = protocol
         391  +
            .serialize_request(&input, GetExecutionPreview::INPUT_SCHEMA, "/", _cfg)
         392  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         393  +
         394  +
        return ::std::result::Result::Ok(request);
         395  +
    }
         396  +
}
         397  +
#[derive(Debug)]
         398  +
struct GetExecutionPreviewEndpointParamsInterceptor;
         399  +
         400  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         401  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetExecutionPreviewEndpointParamsInterceptor {
         402  +
    fn name(&self) -> &'static str {
         403  +
        "GetExecutionPreviewEndpointParamsInterceptor"
         404  +
    }
         405  +
         406  +
    fn read_before_execution(
         407  +
        &self,
         408  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         409  +
            '_,
         410  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         411  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         412  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         413  +
        >,
         414  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         415  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         416  +
        let _input = context
         417  +
            .input()
         418  +
            .downcast_ref::<GetExecutionPreviewInput>()
         419  +
            .ok_or("failed to downcast to GetExecutionPreviewInput")?;
         420  +
         421  +
        let params = crate::config::endpoint::Params::builder()
         422  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         423  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         424  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         425  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         426  +
            .build()
         427  +
            .map_err(|err| {
         428  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         429  +
            })?;
         430  +
        cfg.interceptor_state()
         431  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         432  +
        ::std::result::Result::Ok(())
         433  +
    }
         434  +
}
         435  +
         436  +
// The get_* functions below are generated from JMESPath expressions in the
         437  +
// operationContextParams trait. They target the operation's input shape.
         438  +
         439  +
/// Error type for the `GetExecutionPreviewError` operation.
         440  +
#[non_exhaustive]
         441  +
#[derive(::std::fmt::Debug)]
         442  +
pub enum GetExecutionPreviewError {
         443  +
    /// <p>An error occurred on the server side.</p>
         444  +
    InternalServerError(crate::types::error::InternalServerError),
         445  +
    /// <p>The specified parameter to be shared could not be found.</p>
         446  +
    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
         447  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         448  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         449  +
    variable wildcard pattern and check `.code()`:
         450  +
     \
         451  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         452  +
     \
         453  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetExecutionPreviewError) for what information is available for the error.")]
         454  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         455  +
}
         456  +
impl GetExecutionPreviewError {
         457  +
    /// Creates the `GetExecutionPreviewError::Unhandled` variant from any error type.
         458  +
    pub fn unhandled(
         459  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         460  +
    ) -> Self {
         461  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         462  +
            source: err.into(),
         463  +
            meta: ::std::default::Default::default(),
         464  +
        })
         465  +
    }
         466  +
         467  +
    /// Creates the `GetExecutionPreviewError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         468  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         469  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         470  +
            source: err.clone().into(),
         471  +
            meta: err,
         472  +
        })
         473  +
    }
         474  +
    ///
         475  +
    /// Returns error metadata, which includes the error code, message,
         476  +
    /// request ID, and potentially additional information.
         477  +
    ///
         478  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         479  +
        match self {
         480  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         481  +
            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         482  +
            Self::Unhandled(e) => &e.meta,
         483  +
        }
         484  +
    }
         485  +
    /// Returns `true` if the error kind is `GetExecutionPreviewError::InternalServerError`.
         486  +
    pub fn is_internal_server_error(&self) -> bool {
         487  +
        matches!(self, Self::InternalServerError(_))
         488  +
    }
         489  +
    /// Returns `true` if the error kind is `GetExecutionPreviewError::ResourceNotFoundException`.
         490  +
    pub fn is_resource_not_found_exception(&self) -> bool {
         491  +
        matches!(self, Self::ResourceNotFoundException(_))
         492  +
    }
         493  +
}
         494  +
impl ::std::error::Error for GetExecutionPreviewError {
         495  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         496  +
        match self {
         497  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         498  +
            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
         499  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         500  +
        }
         501  +
    }
         502  +
}
         503  +
impl ::std::fmt::Display for GetExecutionPreviewError {
         504  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         505  +
        match self {
         506  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         507  +
            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
         508  +
            Self::Unhandled(_inner) => {
         509  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         510  +
                    write!(f, "unhandled error ({code})")
         511  +
                } else {
         512  +
                    f.write_str("unhandled error")
         513  +
                }
         514  +
            }
         515  +
        }
         516  +
    }
         517  +
}
         518  +
impl ::aws_smithy_types::retry::ProvideErrorKind for GetExecutionPreviewError {
         519  +
    fn code(&self) -> ::std::option::Option<&str> {
         520  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         521  +
    }
         522  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         523  +
        ::std::option::Option::None
         524  +
    }
         525  +
}
         526  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetExecutionPreviewError {
         527  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         528  +
        match self {
         529  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         530  +
            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         531  +
            Self::Unhandled(_inner) => &_inner.meta,
         532  +
        }
         533  +
    }
         534  +
}
         535  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetExecutionPreviewError {
         536  +
    fn create_unhandled_error(
         537  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         538  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         539  +
    ) -> Self {
         540  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         541  +
            source,
         542  +
            meta: meta.unwrap_or_default(),
         543  +
        })
         544  +
    }
         545  +
}
         546  +
impl ::aws_types::request_id::RequestId for crate::operation::get_execution_preview::GetExecutionPreviewError {
         547  +
    fn request_id(&self) -> Option<&str> {
         548  +
        self.meta().request_id()
         549  +
    }
         550  +
}
         551  +
         552  +
pub use crate::operation::get_execution_preview::_get_execution_preview_input::GetExecutionPreviewInput;
         553  +
         554  +
pub use crate::operation::get_execution_preview::_get_execution_preview_output::GetExecutionPreviewOutput;
         555  +
         556  +
mod _get_execution_preview_input;
         557  +
         558  +
mod _get_execution_preview_output;
         559  +
         560  +
/// Builders
         561  +
pub mod builders;