AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

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

@@ -0,1 +0,223 @@
           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 UpdateDocumentMetadataInput {
           6  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
           7  +
    pub name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The version of a change template in which to update approval metadata.</p>
           9  +
    pub document_version: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The change template review details to update.</p>
          11  +
    pub document_reviews: ::std::option::Option<crate::types::DocumentReviews>,
          12  +
}
          13  +
impl UpdateDocumentMetadataInput {
          14  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
          15  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          16  +
        self.name.as_deref()
          17  +
    }
          18  +
    /// <p>The version of a change template in which to update approval metadata.</p>
          19  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          20  +
        self.document_version.as_deref()
          21  +
    }
          22  +
    /// <p>The change template review details to update.</p>
          23  +
    pub fn document_reviews(&self) -> ::std::option::Option<&crate::types::DocumentReviews> {
          24  +
        self.document_reviews.as_ref()
          25  +
    }
          26  +
}
          27  +
static UPDATEDOCUMENTMETADATAINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts(
          29  +
        "com.amazonaws.ssm.synthetic#UpdateDocumentMetadataInput$Name",
          30  +
        "com.amazonaws.ssm.synthetic",
          31  +
        "UpdateDocumentMetadataInput",
          32  +
    ),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "Name",
          35  +
    0,
          36  +
);
          37  +
static UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#UpdateDocumentMetadataInput$DocumentVersion",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "UpdateDocumentMetadataInput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::String,
          44  +
    "DocumentVersion",
          45  +
    1,
          46  +
);
          47  +
static UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_REVIEWS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#UpdateDocumentMetadataInput$DocumentReviews",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "UpdateDocumentMetadataInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::Structure,
          54  +
    "DocumentReviews",
          55  +
    2,
          56  +
);
          57  +
static UPDATEDOCUMENTMETADATAINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#UpdateDocumentMetadataInput",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "UpdateDocumentMetadataInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    &[
          65  +
        &UPDATEDOCUMENTMETADATAINPUT_MEMBER_NAME,
          66  +
        &UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_VERSION,
          67  +
        &UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_REVIEWS,
          68  +
    ],
          69  +
)
          70  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          71  +
.with_original_name("UpdateDocumentMetadataRequest");
          72  +
impl UpdateDocumentMetadataInput {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEDOCUMENTMETADATAINPUT_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateDocumentMetadataInput {
          77  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          78  +
    fn serialize_members(
          79  +
        &self,
          80  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          81  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          82  +
        if let Some(ref val) = self.name {
          83  +
            ser.write_string(&UPDATEDOCUMENTMETADATAINPUT_MEMBER_NAME, val)?;
          84  +
        }
          85  +
        if let Some(ref val) = self.document_version {
          86  +
            ser.write_string(&UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_VERSION, val)?;
          87  +
        }
          88  +
        if let Some(ref val) = self.document_reviews {
          89  +
            ser.write_struct(&UPDATEDOCUMENTMETADATAINPUT_MEMBER_DOCUMENT_REVIEWS, val)?;
          90  +
        }
          91  +
        Ok(())
          92  +
    }
          93  +
}
          94  +
impl UpdateDocumentMetadataInput {
          95  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          96  +
    pub fn deserialize(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          98  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          99  +
        #[allow(unused_variables, unused_mut)]
         100  +
        let mut builder = Self::builder();
         101  +
        #[allow(
         102  +
            unused_variables,
         103  +
            unreachable_code,
         104  +
            clippy::single_match,
         105  +
            clippy::match_single_binding,
         106  +
            clippy::diverging_sub_expression
         107  +
        )]
         108  +
        deserializer.read_struct(&UPDATEDOCUMENTMETADATAINPUT_SCHEMA, &mut |member, deser| {
         109  +
            match member.member_index() {
         110  +
                Some(0) => {
         111  +
                    if deser.is_null() {
         112  +
                        deser.read_null()?;
         113  +
                    } else {
         114  +
                        builder.name = Some(deser.read_string(member)?);
         115  +
                    }
         116  +
                }
         117  +
                Some(1) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.document_version = Some(deser.read_string(member)?);
         122  +
                    }
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    if deser.is_null() {
         126  +
                        deser.read_null()?;
         127  +
                    } else {
         128  +
                        builder.document_reviews = Some(crate::types::DocumentReviews::deserialize(deser)?);
         129  +
                    }
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.name = builder.name.or(Some(String::new()));
         136  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         137  +
    }
         138  +
}
         139  +
impl UpdateDocumentMetadataInput {
         140  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        Self::deserialize(deserializer)
         148  +
    }
         149  +
}
         150  +
impl UpdateDocumentMetadataInput {
         151  +
    /// Creates a new builder-style object to manufacture [`UpdateDocumentMetadataInput`](crate::operation::update_document_metadata::UpdateDocumentMetadataInput).
         152  +
    pub fn builder() -> crate::operation::update_document_metadata::builders::UpdateDocumentMetadataInputBuilder {
         153  +
        crate::operation::update_document_metadata::builders::UpdateDocumentMetadataInputBuilder::default()
         154  +
    }
         155  +
}
         156  +
         157  +
/// A builder for [`UpdateDocumentMetadataInput`](crate::operation::update_document_metadata::UpdateDocumentMetadataInput).
         158  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         159  +
#[non_exhaustive]
         160  +
pub struct UpdateDocumentMetadataInputBuilder {
         161  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         162  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         163  +
    pub(crate) document_reviews: ::std::option::Option<crate::types::DocumentReviews>,
         164  +
}
         165  +
impl UpdateDocumentMetadataInputBuilder {
         166  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         167  +
    /// This field is required.
         168  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         169  +
        self.name = ::std::option::Option::Some(input.into());
         170  +
        self
         171  +
    }
         172  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         173  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         174  +
        self.name = input;
         175  +
        self
         176  +
    }
         177  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         178  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         179  +
        &self.name
         180  +
    }
         181  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         182  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         183  +
        self.document_version = ::std::option::Option::Some(input.into());
         184  +
        self
         185  +
    }
         186  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         187  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         188  +
        self.document_version = input;
         189  +
        self
         190  +
    }
         191  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         192  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         193  +
        &self.document_version
         194  +
    }
         195  +
    /// <p>The change template review details to update.</p>
         196  +
    /// This field is required.
         197  +
    pub fn document_reviews(mut self, input: crate::types::DocumentReviews) -> Self {
         198  +
        self.document_reviews = ::std::option::Option::Some(input);
         199  +
        self
         200  +
    }
         201  +
    /// <p>The change template review details to update.</p>
         202  +
    pub fn set_document_reviews(mut self, input: ::std::option::Option<crate::types::DocumentReviews>) -> Self {
         203  +
        self.document_reviews = input;
         204  +
        self
         205  +
    }
         206  +
    /// <p>The change template review details to update.</p>
         207  +
    pub fn get_document_reviews(&self) -> &::std::option::Option<crate::types::DocumentReviews> {
         208  +
        &self.document_reviews
         209  +
    }
         210  +
    /// Consumes the builder and constructs a [`UpdateDocumentMetadataInput`](crate::operation::update_document_metadata::UpdateDocumentMetadataInput).
         211  +
    pub fn build(
         212  +
        self,
         213  +
    ) -> ::std::result::Result<
         214  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataInput,
         215  +
        ::aws_smithy_types::error::operation::BuildError,
         216  +
    > {
         217  +
        ::std::result::Result::Ok(crate::operation::update_document_metadata::UpdateDocumentMetadataInput {
         218  +
            name: self.name,
         219  +
            document_version: self.document_version,
         220  +
            document_reviews: self.document_reviews,
         221  +
        })
         222  +
    }
         223  +
}

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

@@ -0,1 +0,122 @@
           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 UpdateDocumentMetadataOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static UPDATEDOCUMENTMETADATAOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
           9  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          10  +
    ::aws_smithy_schema::ShapeType::String,
          11  +
    "request_id",
          12  +
    0,
          13  +
)
          14  +
.with_http_header("x-amzn-requestid");
          15  +
static UPDATEDOCUMENTMETADATAOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#UpdateDocumentMetadataOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "UpdateDocumentMetadataOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&UPDATEDOCUMENTMETADATAOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("UpdateDocumentMetadataResponse");
          25  +
impl UpdateDocumentMetadataOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEDOCUMENTMETADATAOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateDocumentMetadataOutput {
          30  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          31  +
    fn serialize_members(
          32  +
        &self,
          33  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          34  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          35  +
        Ok(())
          36  +
    }
          37  +
}
          38  +
impl UpdateDocumentMetadataOutput {
          39  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          42  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          43  +
        #[allow(unused_variables, unused_mut)]
          44  +
        let mut builder = Self::builder();
          45  +
        #[allow(
          46  +
            unused_variables,
          47  +
            unreachable_code,
          48  +
            clippy::single_match,
          49  +
            clippy::match_single_binding,
          50  +
            clippy::diverging_sub_expression
          51  +
        )]
          52  +
        deserializer.read_struct(&UPDATEDOCUMENTMETADATAOUTPUT_SCHEMA, &mut |member, deser| {
          53  +
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
          57  +
                _ => {}
          58  +
            }
          59  +
            Ok(())
          60  +
        })?;
          61  +
        Ok(builder.build())
          62  +
    }
          63  +
}
          64  +
impl UpdateDocumentMetadataOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
          82  +
impl ::aws_types::request_id::RequestId for UpdateDocumentMetadataOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl UpdateDocumentMetadataOutput {
          88  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
          89  +
        self._request_id = request_id;
          90  +
        self
          91  +
    }
          92  +
}
          93  +
impl UpdateDocumentMetadataOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`UpdateDocumentMetadataOutput`](crate::operation::update_document_metadata::UpdateDocumentMetadataOutput).
          95  +
    pub fn builder() -> crate::operation::update_document_metadata::builders::UpdateDocumentMetadataOutputBuilder {
          96  +
        crate::operation::update_document_metadata::builders::UpdateDocumentMetadataOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`UpdateDocumentMetadataOutput`](crate::operation::update_document_metadata::UpdateDocumentMetadataOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct UpdateDocumentMetadataOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl UpdateDocumentMetadataOutputBuilder {
         107  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         108  +
        self._request_id = Some(request_id.into());
         109  +
        self
         110  +
    }
         111  +
         112  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         113  +
        self._request_id = request_id;
         114  +
        self
         115  +
    }
         116  +
    /// Consumes the builder and constructs a [`UpdateDocumentMetadataOutput`](crate::operation::update_document_metadata::UpdateDocumentMetadataOutput).
         117  +
    pub fn build(self) -> crate::operation::update_document_metadata::UpdateDocumentMetadataOutput {
         118  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,156 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_document_metadata::_update_document_metadata_input::UpdateDocumentMetadataInputBuilder;
           3  +
           4  +
pub use crate::operation::update_document_metadata::_update_document_metadata_output::UpdateDocumentMetadataOutputBuilder;
           5  +
           6  +
impl crate::operation::update_document_metadata::builders::UpdateDocumentMetadataInputBuilder {
           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::update_document_metadata::UpdateDocumentMetadataOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_document_metadata::UpdateDocumentMetadataError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_document_metadata();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateDocumentMetadata`.
          24  +
///
          25  +
/// <important>
          26  +
/// <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
          27  +
/// </important>
          28  +
/// <p>Updates information related to approval reviews for a specific version of a change template in Change Manager.</p>
          29  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
pub struct UpdateDocumentMetadataFluentBuilder {
          31  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          32  +
    inner: crate::operation::update_document_metadata::builders::UpdateDocumentMetadataInputBuilder,
          33  +
    config_override: ::std::option::Option<crate::config::Builder>,
          34  +
}
          35  +
impl
          36  +
    crate::client::customize::internal::CustomizableSend<
          37  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataOutput,
          38  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataError,
          39  +
    > for UpdateDocumentMetadataFluentBuilder
          40  +
{
          41  +
    fn send(
          42  +
        self,
          43  +
        config_override: crate::config::Builder,
          44  +
    ) -> crate::client::customize::internal::BoxFuture<
          45  +
        crate::client::customize::internal::SendResult<
          46  +
            crate::operation::update_document_metadata::UpdateDocumentMetadataOutput,
          47  +
            crate::operation::update_document_metadata::UpdateDocumentMetadataError,
          48  +
        >,
          49  +
    > {
          50  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          51  +
    }
          52  +
}
          53  +
impl UpdateDocumentMetadataFluentBuilder {
          54  +
    /// Creates a new `UpdateDocumentMetadataFluentBuilder`.
          55  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          56  +
        Self {
          57  +
            handle,
          58  +
            inner: ::std::default::Default::default(),
          59  +
            config_override: ::std::option::Option::None,
          60  +
        }
          61  +
    }
          62  +
    /// Access the UpdateDocumentMetadata as a reference.
          63  +
    pub fn as_input(&self) -> &crate::operation::update_document_metadata::builders::UpdateDocumentMetadataInputBuilder {
          64  +
        &self.inner
          65  +
    }
          66  +
    /// Sends the request and returns the response.
          67  +
    ///
          68  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          69  +
    /// can be matched against.
          70  +
    ///
          71  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          72  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          73  +
    /// set when configuring the client.
          74  +
    pub async fn send(
          75  +
        self,
          76  +
    ) -> ::std::result::Result<
          77  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataOutput,
          78  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          79  +
            crate::operation::update_document_metadata::UpdateDocumentMetadataError,
          80  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          81  +
        >,
          82  +
    > {
          83  +
        let input = self
          84  +
            .inner
          85  +
            .build()
          86  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          87  +
        let runtime_plugins = crate::operation::update_document_metadata::UpdateDocumentMetadata::operation_runtime_plugins(
          88  +
            self.handle.runtime_plugins.clone(),
          89  +
            &self.handle.conf,
          90  +
            self.config_override,
          91  +
        );
          92  +
        crate::operation::update_document_metadata::UpdateDocumentMetadata::orchestrate(&runtime_plugins, input).await
          93  +
    }
          94  +
          95  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          96  +
    pub fn customize(
          97  +
        self,
          98  +
    ) -> crate::client::customize::CustomizableOperation<
          99  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataOutput,
         100  +
        crate::operation::update_document_metadata::UpdateDocumentMetadataError,
         101  +
        Self,
         102  +
    > {
         103  +
        crate::client::customize::CustomizableOperation::new(self)
         104  +
    }
         105  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         106  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         107  +
        self
         108  +
    }
         109  +
         110  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         111  +
        self.config_override = config_override;
         112  +
        self
         113  +
    }
         114  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         115  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         116  +
        self.inner = self.inner.name(input.into());
         117  +
        self
         118  +
    }
         119  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         120  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        self.inner = self.inner.set_name(input);
         122  +
        self
         123  +
    }
         124  +
    /// <p>The name of the change template for which a version's metadata is to be updated.</p>
         125  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         126  +
        self.inner.get_name()
         127  +
    }
         128  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         129  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         130  +
        self.inner = self.inner.document_version(input.into());
         131  +
        self
         132  +
    }
         133  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         134  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         135  +
        self.inner = self.inner.set_document_version(input);
         136  +
        self
         137  +
    }
         138  +
    /// <p>The version of a change template in which to update approval metadata.</p>
         139  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         140  +
        self.inner.get_document_version()
         141  +
    }
         142  +
    /// <p>The change template review details to update.</p>
         143  +
    pub fn document_reviews(mut self, input: crate::types::DocumentReviews) -> Self {
         144  +
        self.inner = self.inner.document_reviews(input);
         145  +
        self
         146  +
    }
         147  +
    /// <p>The change template review details to update.</p>
         148  +
    pub fn set_document_reviews(mut self, input: ::std::option::Option<crate::types::DocumentReviews>) -> Self {
         149  +
        self.inner = self.inner.set_document_reviews(input);
         150  +
        self
         151  +
    }
         152  +
    /// <p>The change template review details to update.</p>
         153  +
    pub fn get_document_reviews(&self) -> &::std::option::Option<crate::types::DocumentReviews> {
         154  +
        self.inner.get_document_reviews()
         155  +
    }
         156  +
}

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

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