AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,263 @@
           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 UpdateCloudConnectorInput {
           6  +
    /// <p>The ID of the cloud connector to update.</p>
           7  +
    pub cloud_connector_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>A new friendly name for the cloud connector.</p>
           9  +
    pub display_name: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
          11  +
    pub configuration: ::std::option::Option<crate::types::CloudConnectorConfiguration>,
          12  +
    /// <p>A new description for the cloud connector.</p>
          13  +
    pub description: ::std::option::Option<::std::string::String>,
          14  +
}
          15  +
impl UpdateCloudConnectorInput {
          16  +
    /// <p>The ID of the cloud connector to update.</p>
          17  +
    pub fn cloud_connector_id(&self) -> ::std::option::Option<&str> {
          18  +
        self.cloud_connector_id.as_deref()
          19  +
    }
          20  +
    /// <p>A new friendly name for the cloud connector.</p>
          21  +
    pub fn display_name(&self) -> ::std::option::Option<&str> {
          22  +
        self.display_name.as_deref()
          23  +
    }
          24  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
          25  +
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::CloudConnectorConfiguration> {
          26  +
        self.configuration.as_ref()
          27  +
    }
          28  +
    /// <p>A new description for the cloud connector.</p>
          29  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          30  +
        self.description.as_deref()
          31  +
    }
          32  +
}
          33  +
static UPDATECLOUDCONNECTORINPUT_MEMBER_CLOUD_CONNECTOR_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorInput$CloudConnectorId",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "UpdateCloudConnectorInput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "CloudConnectorId",
          41  +
    0,
          42  +
);
          43  +
static UPDATECLOUDCONNECTORINPUT_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorInput$DisplayName",
          46  +
        "com.amazonaws.ssm.synthetic",
          47  +
        "UpdateCloudConnectorInput",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "DisplayName",
          51  +
    1,
          52  +
);
          53  +
static UPDATECLOUDCONNECTORINPUT_MEMBER_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_parts(
          55  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorInput$Configuration",
          56  +
        "com.amazonaws.ssm.synthetic",
          57  +
        "UpdateCloudConnectorInput",
          58  +
    ),
          59  +
    ::aws_smithy_schema::ShapeType::Union,
          60  +
    "Configuration",
          61  +
    2,
          62  +
);
          63  +
static UPDATECLOUDCONNECTORINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_parts(
          65  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorInput$Description",
          66  +
        "com.amazonaws.ssm.synthetic",
          67  +
        "UpdateCloudConnectorInput",
          68  +
    ),
          69  +
    ::aws_smithy_schema::ShapeType::String,
          70  +
    "Description",
          71  +
    3,
          72  +
);
          73  +
static UPDATECLOUDCONNECTORINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          74  +
    ::aws_smithy_schema::ShapeId::from_parts(
          75  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorInput",
          76  +
        "com.amazonaws.ssm.synthetic",
          77  +
        "UpdateCloudConnectorInput",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::Structure,
          80  +
    &[
          81  +
        &UPDATECLOUDCONNECTORINPUT_MEMBER_CLOUD_CONNECTOR_ID,
          82  +
        &UPDATECLOUDCONNECTORINPUT_MEMBER_DISPLAY_NAME,
          83  +
        &UPDATECLOUDCONNECTORINPUT_MEMBER_CONFIGURATION,
          84  +
        &UPDATECLOUDCONNECTORINPUT_MEMBER_DESCRIPTION,
          85  +
    ],
          86  +
)
          87  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          88  +
.with_original_name("UpdateCloudConnectorRequest");
          89  +
impl UpdateCloudConnectorInput {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATECLOUDCONNECTORINPUT_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateCloudConnectorInput {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        if let Some(ref val) = self.cloud_connector_id {
         100  +
            ser.write_string(&UPDATECLOUDCONNECTORINPUT_MEMBER_CLOUD_CONNECTOR_ID, val)?;
         101  +
        }
         102  +
        if let Some(ref val) = self.display_name {
         103  +
            ser.write_string(&UPDATECLOUDCONNECTORINPUT_MEMBER_DISPLAY_NAME, val)?;
         104  +
        }
         105  +
        if let Some(ref val) = self.configuration {
         106  +
            ser.write_struct(&UPDATECLOUDCONNECTORINPUT_MEMBER_CONFIGURATION, val)?;
         107  +
        }
         108  +
        if let Some(ref val) = self.description {
         109  +
            ser.write_string(&UPDATECLOUDCONNECTORINPUT_MEMBER_DESCRIPTION, val)?;
         110  +
        }
         111  +
        Ok(())
         112  +
    }
         113  +
}
         114  +
impl UpdateCloudConnectorInput {
         115  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         116  +
    pub fn deserialize(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        #[allow(unused_variables, unused_mut)]
         120  +
        let mut builder = Self::builder();
         121  +
        #[allow(
         122  +
            unused_variables,
         123  +
            unreachable_code,
         124  +
            clippy::single_match,
         125  +
            clippy::match_single_binding,
         126  +
            clippy::diverging_sub_expression
         127  +
        )]
         128  +
        deserializer.read_struct(&UPDATECLOUDCONNECTORINPUT_SCHEMA, &mut |member, deser| {
         129  +
            match member.member_index() {
         130  +
                Some(0) => {
         131  +
                    if deser.is_null() {
         132  +
                        deser.read_null()?;
         133  +
                    } else {
         134  +
                        builder.cloud_connector_id = Some(deser.read_string(member)?);
         135  +
                    }
         136  +
                }
         137  +
                Some(1) => {
         138  +
                    if deser.is_null() {
         139  +
                        deser.read_null()?;
         140  +
                    } else {
         141  +
                        builder.display_name = Some(deser.read_string(member)?);
         142  +
                    }
         143  +
                }
         144  +
                Some(2) => {
         145  +
                    if deser.is_null() {
         146  +
                        deser.read_null()?;
         147  +
                    } else {
         148  +
                        builder.configuration = Some(crate::types::CloudConnectorConfiguration::deserialize(deser)?);
         149  +
                    }
         150  +
                }
         151  +
                Some(3) => {
         152  +
                    if deser.is_null() {
         153  +
                        deser.read_null()?;
         154  +
                    } else {
         155  +
                        builder.description = Some(deser.read_string(member)?);
         156  +
                    }
         157  +
                }
         158  +
                _ => {}
         159  +
            }
         160  +
            Ok(())
         161  +
        })?;
         162  +
        builder.cloud_connector_id = builder.cloud_connector_id.or(Some(String::new()));
         163  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         164  +
    }
         165  +
}
         166  +
impl UpdateCloudConnectorInput {
         167  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
         173  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         174  +
        Self::deserialize(deserializer)
         175  +
    }
         176  +
}
         177  +
impl UpdateCloudConnectorInput {
         178  +
    /// Creates a new builder-style object to manufacture [`UpdateCloudConnectorInput`](crate::operation::update_cloud_connector::UpdateCloudConnectorInput).
         179  +
    pub fn builder() -> crate::operation::update_cloud_connector::builders::UpdateCloudConnectorInputBuilder {
         180  +
        crate::operation::update_cloud_connector::builders::UpdateCloudConnectorInputBuilder::default()
         181  +
    }
         182  +
}
         183  +
         184  +
/// A builder for [`UpdateCloudConnectorInput`](crate::operation::update_cloud_connector::UpdateCloudConnectorInput).
         185  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         186  +
#[non_exhaustive]
         187  +
pub struct UpdateCloudConnectorInputBuilder {
         188  +
    pub(crate) cloud_connector_id: ::std::option::Option<::std::string::String>,
         189  +
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
         190  +
    pub(crate) configuration: ::std::option::Option<crate::types::CloudConnectorConfiguration>,
         191  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         192  +
}
         193  +
impl UpdateCloudConnectorInputBuilder {
         194  +
    /// <p>The ID of the cloud connector to update.</p>
         195  +
    /// This field is required.
         196  +
    pub fn cloud_connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         197  +
        self.cloud_connector_id = ::std::option::Option::Some(input.into());
         198  +
        self
         199  +
    }
         200  +
    /// <p>The ID of the cloud connector to update.</p>
         201  +
    pub fn set_cloud_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         202  +
        self.cloud_connector_id = input;
         203  +
        self
         204  +
    }
         205  +
    /// <p>The ID of the cloud connector to update.</p>
         206  +
    pub fn get_cloud_connector_id(&self) -> &::std::option::Option<::std::string::String> {
         207  +
        &self.cloud_connector_id
         208  +
    }
         209  +
    /// <p>A new friendly name for the cloud connector.</p>
         210  +
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         211  +
        self.display_name = ::std::option::Option::Some(input.into());
         212  +
        self
         213  +
    }
         214  +
    /// <p>A new friendly name for the cloud connector.</p>
         215  +
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         216  +
        self.display_name = input;
         217  +
        self
         218  +
    }
         219  +
    /// <p>A new friendly name for the cloud connector.</p>
         220  +
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
         221  +
        &self.display_name
         222  +
    }
         223  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         224  +
    pub fn configuration(mut self, input: crate::types::CloudConnectorConfiguration) -> Self {
         225  +
        self.configuration = ::std::option::Option::Some(input);
         226  +
        self
         227  +
    }
         228  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         229  +
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::CloudConnectorConfiguration>) -> Self {
         230  +
        self.configuration = input;
         231  +
        self
         232  +
    }
         233  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         234  +
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::CloudConnectorConfiguration> {
         235  +
        &self.configuration
         236  +
    }
         237  +
    /// <p>A new description for the cloud connector.</p>
         238  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         239  +
        self.description = ::std::option::Option::Some(input.into());
         240  +
        self
         241  +
    }
         242  +
    /// <p>A new description for the cloud connector.</p>
         243  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         244  +
        self.description = input;
         245  +
        self
         246  +
    }
         247  +
    /// <p>A new description for the cloud connector.</p>
         248  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         249  +
        &self.description
         250  +
    }
         251  +
    /// Consumes the builder and constructs a [`UpdateCloudConnectorInput`](crate::operation::update_cloud_connector::UpdateCloudConnectorInput).
         252  +
    pub fn build(
         253  +
        self,
         254  +
    ) -> ::std::result::Result<crate::operation::update_cloud_connector::UpdateCloudConnectorInput, ::aws_smithy_types::error::operation::BuildError>
         255  +
    {
         256  +
        ::std::result::Result::Ok(crate::operation::update_cloud_connector::UpdateCloudConnectorInput {
         257  +
            cloud_connector_id: self.cloud_connector_id,
         258  +
            display_name: self.display_name,
         259  +
            configuration: self.configuration,
         260  +
            description: self.description,
         261  +
        })
         262  +
    }
         263  +
}

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

@@ -0,1 +0,186 @@
           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 UpdateCloudConnectorOutput {
           6  +
    /// <p>The ID of the cloud connector that was updated.</p>
           7  +
    pub cloud_connector_id: ::std::option::Option<::std::string::String>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl UpdateCloudConnectorOutput {
          11  +
    /// <p>The ID of the cloud connector that was updated.</p>
          12  +
    pub fn cloud_connector_id(&self) -> ::std::option::Option<&str> {
          13  +
        self.cloud_connector_id.as_deref()
          14  +
    }
          15  +
}
          16  +
static UPDATECLOUDCONNECTOROUTPUT_MEMBER_CLOUD_CONNECTOR_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts(
          18  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorOutput$CloudConnectorId",
          19  +
        "com.amazonaws.ssm.synthetic",
          20  +
        "UpdateCloudConnectorOutput",
          21  +
    ),
          22  +
    ::aws_smithy_schema::ShapeType::String,
          23  +
    "CloudConnectorId",
          24  +
    0,
          25  +
);
          26  +
static UPDATECLOUDCONNECTOROUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          27  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "request_id",
          30  +
    1,
          31  +
)
          32  +
.with_http_header("x-amzn-requestid");
          33  +
static UPDATECLOUDCONNECTOROUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#UpdateCloudConnectorOutput",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "UpdateCloudConnectorOutput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    &[
          41  +
        &UPDATECLOUDCONNECTOROUTPUT_MEMBER_CLOUD_CONNECTOR_ID,
          42  +
        &UPDATECLOUDCONNECTOROUTPUT_MEMBER__REQUEST_ID,
          43  +
    ],
          44  +
)
          45  +
.with_original_name("UpdateCloudConnectorResult");
          46  +
impl UpdateCloudConnectorOutput {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATECLOUDCONNECTOROUTPUT_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateCloudConnectorOutput {
          51  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          52  +
    fn serialize_members(
          53  +
        &self,
          54  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          55  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          56  +
        if let Some(ref val) = self.cloud_connector_id {
          57  +
            ser.write_string(&UPDATECLOUDCONNECTOROUTPUT_MEMBER_CLOUD_CONNECTOR_ID, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl UpdateCloudConnectorOutput {
          63  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          66  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          67  +
        #[allow(unused_variables, unused_mut)]
          68  +
        let mut builder = Self::builder();
          69  +
        #[allow(
          70  +
            unused_variables,
          71  +
            unreachable_code,
          72  +
            clippy::single_match,
          73  +
            clippy::match_single_binding,
          74  +
            clippy::diverging_sub_expression
          75  +
        )]
          76  +
        deserializer.read_struct(&UPDATECLOUDCONNECTOROUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    if deser.is_null() {
          80  +
                        deser.read_null()?;
          81  +
                    } else {
          82  +
                        builder.cloud_connector_id = Some(deser.read_string(member)?);
          83  +
                    }
          84  +
                }
          85  +
                Some(1) => {
          86  +
                    builder._request_id = Some(deser.read_string(member)?);
          87  +
                }
          88  +
                _ => {}
          89  +
            }
          90  +
            Ok(())
          91  +
        })?;
          92  +
        Ok(builder.build())
          93  +
    }
          94  +
}
          95  +
impl UpdateCloudConnectorOutput {
          96  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          97  +
    /// Header-bound members are read directly from headers, avoiding runtime
          98  +
    /// member iteration overhead. Body members are read via the deserializer.
          99  +
    pub fn deserialize_with_response(
         100  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         101  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         102  +
        _status: u16,
         103  +
        _body: &[u8],
         104  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         105  +
        #[allow(unused_variables, unused_mut)]
         106  +
        let mut builder = Self::builder();
         107  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         108  +
            builder._request_id = Some(val.to_string());
         109  +
        }
         110  +
         111  +
        #[allow(
         112  +
            unused_variables,
         113  +
            unreachable_code,
         114  +
            clippy::single_match,
         115  +
            clippy::match_single_binding,
         116  +
            clippy::diverging_sub_expression
         117  +
        )]
         118  +
        deserializer.read_struct(&UPDATECLOUDCONNECTOROUTPUT_SCHEMA, &mut |member, deser| {
         119  +
            match member.member_index() {
         120  +
                Some(0) => {
         121  +
                    builder.cloud_connector_id = Some(deser.read_string(member)?);
         122  +
                }
         123  +
                _ => {}
         124  +
            }
         125  +
            Ok(())
         126  +
        })?;
         127  +
        Ok(builder.build())
         128  +
    }
         129  +
}
         130  +
impl ::aws_types::request_id::RequestId for UpdateCloudConnectorOutput {
         131  +
    fn request_id(&self) -> Option<&str> {
         132  +
        self._request_id.as_deref()
         133  +
    }
         134  +
}
         135  +
impl UpdateCloudConnectorOutput {
         136  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         137  +
        self._request_id = request_id;
         138  +
        self
         139  +
    }
         140  +
}
         141  +
impl UpdateCloudConnectorOutput {
         142  +
    /// Creates a new builder-style object to manufacture [`UpdateCloudConnectorOutput`](crate::operation::update_cloud_connector::UpdateCloudConnectorOutput).
         143  +
    pub fn builder() -> crate::operation::update_cloud_connector::builders::UpdateCloudConnectorOutputBuilder {
         144  +
        crate::operation::update_cloud_connector::builders::UpdateCloudConnectorOutputBuilder::default()
         145  +
    }
         146  +
}
         147  +
         148  +
/// A builder for [`UpdateCloudConnectorOutput`](crate::operation::update_cloud_connector::UpdateCloudConnectorOutput).
         149  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         150  +
#[non_exhaustive]
         151  +
pub struct UpdateCloudConnectorOutputBuilder {
         152  +
    pub(crate) cloud_connector_id: ::std::option::Option<::std::string::String>,
         153  +
    _request_id: Option<String>,
         154  +
}
         155  +
impl UpdateCloudConnectorOutputBuilder {
         156  +
    /// <p>The ID of the cloud connector that was updated.</p>
         157  +
    pub fn cloud_connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         158  +
        self.cloud_connector_id = ::std::option::Option::Some(input.into());
         159  +
        self
         160  +
    }
         161  +
    /// <p>The ID of the cloud connector that was updated.</p>
         162  +
    pub fn set_cloud_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         163  +
        self.cloud_connector_id = input;
         164  +
        self
         165  +
    }
         166  +
    /// <p>The ID of the cloud connector that was updated.</p>
         167  +
    pub fn get_cloud_connector_id(&self) -> &::std::option::Option<::std::string::String> {
         168  +
        &self.cloud_connector_id
         169  +
    }
         170  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         171  +
        self._request_id = Some(request_id.into());
         172  +
        self
         173  +
    }
         174  +
         175  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         176  +
        self._request_id = request_id;
         177  +
        self
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`UpdateCloudConnectorOutput`](crate::operation::update_cloud_connector::UpdateCloudConnectorOutput).
         180  +
    pub fn build(self) -> crate::operation::update_cloud_connector::UpdateCloudConnectorOutput {
         181  +
        crate::operation::update_cloud_connector::UpdateCloudConnectorOutput {
         182  +
            cloud_connector_id: self.cloud_connector_id,
         183  +
            _request_id: self._request_id,
         184  +
        }
         185  +
    }
         186  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_cloud_connector/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::update_cloud_connector::_update_cloud_connector_input::UpdateCloudConnectorInputBuilder;
           3  +
           4  +
pub use crate::operation::update_cloud_connector::_update_cloud_connector_output::UpdateCloudConnectorOutputBuilder;
           5  +
           6  +
impl crate::operation::update_cloud_connector::builders::UpdateCloudConnectorInputBuilder {
           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_cloud_connector::UpdateCloudConnectorOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_cloud_connector::UpdateCloudConnectorError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_cloud_connector();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateCloudConnector`.
          24  +
///
          25  +
/// <p>Updates an existing cloud connector with new configuration details.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct UpdateCloudConnectorFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::update_cloud_connector::builders::UpdateCloudConnectorInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::update_cloud_connector::UpdateCloudConnectorOutput,
          35  +
        crate::operation::update_cloud_connector::UpdateCloudConnectorError,
          36  +
    > for UpdateCloudConnectorFluentBuilder
          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::update_cloud_connector::UpdateCloudConnectorOutput,
          44  +
            crate::operation::update_cloud_connector::UpdateCloudConnectorError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl UpdateCloudConnectorFluentBuilder {
          51  +
    /// Creates a new `UpdateCloudConnectorFluentBuilder`.
          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 UpdateCloudConnector as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::update_cloud_connector::builders::UpdateCloudConnectorInputBuilder {
          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::update_cloud_connector::UpdateCloudConnectorOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::update_cloud_connector::UpdateCloudConnectorError,
          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::update_cloud_connector::UpdateCloudConnector::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::update_cloud_connector::UpdateCloudConnector::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::update_cloud_connector::UpdateCloudConnectorOutput,
          97  +
        crate::operation::update_cloud_connector::UpdateCloudConnectorError,
          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 ID of the cloud connector to update.</p>
         112  +
    pub fn cloud_connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.cloud_connector_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The ID of the cloud connector to update.</p>
         117  +
    pub fn set_cloud_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_cloud_connector_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The ID of the cloud connector to update.</p>
         122  +
    pub fn get_cloud_connector_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_cloud_connector_id()
         124  +
    }
         125  +
    /// <p>A new friendly name for the cloud connector.</p>
         126  +
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         127  +
        self.inner = self.inner.display_name(input.into());
         128  +
        self
         129  +
    }
         130  +
    /// <p>A new friendly name for the cloud connector.</p>
         131  +
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         132  +
        self.inner = self.inner.set_display_name(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>A new friendly name for the cloud connector.</p>
         136  +
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        self.inner.get_display_name()
         138  +
    }
         139  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         140  +
    pub fn configuration(mut self, input: crate::types::CloudConnectorConfiguration) -> Self {
         141  +
        self.inner = self.inner.configuration(input);
         142  +
        self
         143  +
    }
         144  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         145  +
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::CloudConnectorConfiguration>) -> Self {
         146  +
        self.inner = self.inner.set_configuration(input);
         147  +
        self
         148  +
    }
         149  +
    /// <p>The updated configuration details for connecting to the third-party cloud environment.</p>
         150  +
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::CloudConnectorConfiguration> {
         151  +
        self.inner.get_configuration()
         152  +
    }
         153  +
    /// <p>A new description for the cloud connector.</p>
         154  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         155  +
        self.inner = self.inner.description(input.into());
         156  +
        self
         157  +
    }
         158  +
    /// <p>A new description for the cloud connector.</p>
         159  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         160  +
        self.inner = self.inner.set_description(input);
         161  +
        self
         162  +
    }
         163  +
    /// <p>A new description for the cloud connector.</p>
         164  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         165  +
        self.inner.get_description()
         166  +
    }
         167  +
}

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

@@ -0,1 +0,910 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `UpdateDocument`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct UpdateDocument;
           6  +
impl UpdateDocument {
           7  +
    /// Creates a new `UpdateDocument`
           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::update_document::UpdateDocumentInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::update_document::UpdateDocumentOutput::SCHEMA;
          15  +
    pub(crate) async fn orchestrate(
          16  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          17  +
        input: crate::operation::update_document::UpdateDocumentInput,
          18  +
    ) -> ::std::result::Result<
          19  +
        crate::operation::update_document::UpdateDocumentOutput,
          20  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          21  +
            crate::operation::update_document::UpdateDocumentError,
          22  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          23  +
        >,
          24  +
    > {
          25  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          26  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          27  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          28  +
        >| {
          29  +
            err.map_service_error(|err| {
          30  +
                err.downcast::<crate::operation::update_document::UpdateDocumentError>()
          31  +
                    .expect("correct error type")
          32  +
            })
          33  +
        };
          34  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          35  +
            .await
          36  +
            .map_err(map_err)?;
          37  +
        let output = context.finalize().map_err(map_err)?;
          38  +
        ::std::result::Result::Ok(
          39  +
            output
          40  +
                .downcast::<crate::operation::update_document::UpdateDocumentOutput>()
          41  +
                .expect("correct output type"),
          42  +
        )
          43  +
    }
          44  +
          45  +
    pub(crate) async fn orchestrate_with_stop_point(
          46  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          47  +
        input: crate::operation::update_document::UpdateDocumentInput,
          48  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          49  +
    ) -> ::std::result::Result<
          50  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          51  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          52  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          53  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          54  +
        >,
          55  +
    > {
          56  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          57  +
        use ::tracing::Instrument;
          58  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "UpdateDocument", input, runtime_plugins, stop_point)
          59  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          60  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          61  +
            .instrument(::tracing::debug_span!(
          62  +
                "SSM.UpdateDocument",
          63  +
                "rpc.service" = "SSM",
          64  +
                "rpc.method" = "UpdateDocument",
          65  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          66  +
                "rpc.system" = "aws-api",
          67  +
            ))
          68  +
            .await
          69  +
    }
          70  +
          71  +
    pub(crate) fn operation_runtime_plugins(
          72  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          73  +
        client_config: &crate::config::Config,
          74  +
        config_override: ::std::option::Option<crate::config::Builder>,
          75  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          76  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          77  +
          78  +
        if let ::std::option::Option::Some(config_override) = config_override {
          79  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          80  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          81  +
            }
          82  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          83  +
                config_override,
          84  +
                client_config.config.clone(),
          85  +
                &client_config.runtime_components,
          86  +
            ));
          87  +
        }
          88  +
        runtime_plugins
          89  +
    }
          90  +
}
          91  +
/// Per-operation error registry. Contains an entry for every modeled
          92  +
/// error this operation can throw.
          93  +
///
          94  +
/// Used by the schema-serde error path as the operation-scoped lookup
          95  +
/// for registry-backed error reification: an error code that does not
          96  +
/// match one of the operation's modeled errors directly is resolved
          97  +
/// against this registry first, then widened to the service-wide error
          98  +
/// registry.
          99  +
pub(crate) mod error_registry {
         100  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         101  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         102  +
                            .insert_error_shape(
         103  +
                        crate::types::error::DocumentVersionLimitExceeded::SCHEMA,
         104  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         105  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DocumentVersionLimitExceeded::deserialize(d)?))
         106  +
                        },
         107  +
                        |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> {
         108  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DocumentVersionLimitExceeded::deserialize(d)?))
         109  +
                        },
         110  +
                    )
         111  +
.insert_error_shape(
         112  +
                        crate::types::error::DuplicateDocumentContent::SCHEMA,
         113  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         114  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DuplicateDocumentContent::deserialize(d)?))
         115  +
                        },
         116  +
                        |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> {
         117  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DuplicateDocumentContent::deserialize(d)?))
         118  +
                        },
         119  +
                    )
         120  +
.insert_error_shape(
         121  +
                        crate::types::error::DuplicateDocumentVersionName::SCHEMA,
         122  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         123  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DuplicateDocumentVersionName::deserialize(d)?))
         124  +
                        },
         125  +
                        |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> {
         126  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DuplicateDocumentVersionName::deserialize(d)?))
         127  +
                        },
         128  +
                    )
         129  +
.insert_error_shape(
         130  +
                        crate::types::error::InternalServerError::SCHEMA,
         131  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         132  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         133  +
                        },
         134  +
                        |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> {
         135  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         136  +
                        },
         137  +
                    )
         138  +
.insert_error_shape(
         139  +
                        crate::types::error::InvalidDocument::SCHEMA,
         140  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         141  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocument::deserialize(d)?))
         142  +
                        },
         143  +
                        |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> {
         144  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocument::deserialize(d)?))
         145  +
                        },
         146  +
                    )
         147  +
.insert_error_shape(
         148  +
                        crate::types::error::InvalidDocumentContent::SCHEMA,
         149  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         150  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocumentContent::deserialize(d)?))
         151  +
                        },
         152  +
                        |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> {
         153  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocumentContent::deserialize(d)?))
         154  +
                        },
         155  +
                    )
         156  +
.insert_error_shape(
         157  +
                        crate::types::error::InvalidDocumentOperation::SCHEMA,
         158  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         159  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocumentOperation::deserialize(d)?))
         160  +
                        },
         161  +
                        |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> {
         162  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocumentOperation::deserialize(d)?))
         163  +
                        },
         164  +
                    )
         165  +
.insert_error_shape(
         166  +
                        crate::types::error::InvalidDocumentSchemaVersion::SCHEMA,
         167  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         168  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocumentSchemaVersion::deserialize(d)?))
         169  +
                        },
         170  +
                        |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> {
         171  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocumentSchemaVersion::deserialize(d)?))
         172  +
                        },
         173  +
                    )
         174  +
.insert_error_shape(
         175  +
                        crate::types::error::InvalidDocumentVersion::SCHEMA,
         176  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         177  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocumentVersion::deserialize(d)?))
         178  +
                        },
         179  +
                        |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> {
         180  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocumentVersion::deserialize(d)?))
         181  +
                        },
         182  +
                    )
         183  +
.insert_error_shape(
         184  +
                        crate::types::error::MaxDocumentSizeExceeded::SCHEMA,
         185  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         186  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::MaxDocumentSizeExceeded::deserialize(d)?))
         187  +
                        },
         188  +
                        |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> {
         189  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::MaxDocumentSizeExceeded::deserialize(d)?))
         190  +
                        },
         191  +
                    )
         192  +
                            .build()
         193  +
    });
         194  +
}
         195  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateDocument {
         196  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         197  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateDocument");
         198  +
         199  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         200  +
            UpdateDocumentRequestSerializer,
         201  +
        ));
         202  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         203  +
            UpdateDocumentResponseDeserializer,
         204  +
        ));
         205  +
         206  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         207  +
            crate::config::auth::Params::builder()
         208  +
                .operation_name("UpdateDocument")
         209  +
                .build()
         210  +
                .expect("required fields set"),
         211  +
        ));
         212  +
         213  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("UpdateDocument", "SSM"));
         214  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         215  +
        signing_options.double_uri_encode = true;
         216  +
        signing_options.content_sha256_header = false;
         217  +
        signing_options.normalize_uri_path = true;
         218  +
        signing_options.payload_override = None;
         219  +
         220  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         221  +
            signing_options,
         222  +
            ..::std::default::Default::default()
         223  +
        });
         224  +
         225  +
        ::std::option::Option::Some(cfg.freeze())
         226  +
    }
         227  +
         228  +
    fn runtime_components(
         229  +
        &self,
         230  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         231  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         232  +
        #[allow(unused_mut)]
         233  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateDocument")
         234  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         235  +
                UpdateDocumentTelemetryInputCaptureInterceptor,
         236  +
            ))
         237  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         238  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         239  +
            ))
         240  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         241  +
                UpdateDocumentEndpointParamsInterceptor,
         242  +
            ))
         243  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         244  +
                crate::operation::update_document::UpdateDocumentError,
         245  +
            >::new())
         246  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         247  +
                crate::operation::update_document::UpdateDocumentError,
         248  +
            >::new())
         249  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         250  +
                crate::operation::update_document::UpdateDocumentError,
         251  +
            >::new())
         252  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         253  +
                crate::operation::update_document::UpdateDocumentError,
         254  +
            >::new());
         255  +
         256  +
        ::std::borrow::Cow::Owned(rcb)
         257  +
    }
         258  +
}
         259  +
         260  +
#[derive(Debug)]
         261  +
struct UpdateDocumentTelemetryInputCaptureInterceptor;
         262  +
         263  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         264  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDocumentTelemetryInputCaptureInterceptor {
         265  +
    fn name(&self) -> &'static str {
         266  +
        "UpdateDocumentTelemetryInputCaptureInterceptor"
         267  +
    }
         268  +
         269  +
    fn read_before_execution(
         270  +
        &self,
         271  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         272  +
            '_,
         273  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         274  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         275  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         276  +
        >,
         277  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         278  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         279  +
        // Nothing to do unless the customer opted in by naming members to record.
         280  +
        let ::std::option::Option::Some(requested) = cfg
         281  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         282  +
            .filter(|r| !r.is_empty())
         283  +
        else {
         284  +
            return ::std::result::Result::Ok(());
         285  +
        };
         286  +
         287  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateDocumentInput>() else {
         288  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         289  +
            return ::std::result::Result::Ok(());
         290  +
        };
         291  +
         292  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         293  +
        if requested.should_capture("Content") {
         294  +
            if let ::std::option::Option::Some(value) = input.content.as_deref() {
         295  +
                captured.insert("Content", value);
         296  +
            }
         297  +
        }
         298  +
        if requested.should_capture("Name") {
         299  +
            if let ::std::option::Option::Some(value) = input.name.as_deref() {
         300  +
                captured.insert("Name", value);
         301  +
            }
         302  +
        }
         303  +
        if requested.should_capture("DisplayName") {
         304  +
            if let ::std::option::Option::Some(value) = input.display_name.as_deref() {
         305  +
                captured.insert("DisplayName", value);
         306  +
            }
         307  +
        }
         308  +
        if requested.should_capture("VersionName") {
         309  +
            if let ::std::option::Option::Some(value) = input.version_name.as_deref() {
         310  +
                captured.insert("VersionName", value);
         311  +
            }
         312  +
        }
         313  +
        if requested.should_capture("DocumentVersion") {
         314  +
            if let ::std::option::Option::Some(value) = input.document_version.as_deref() {
         315  +
                captured.insert("DocumentVersion", value);
         316  +
            }
         317  +
        }
         318  +
        if requested.should_capture("TargetType") {
         319  +
            if let ::std::option::Option::Some(value) = input.target_type.as_deref() {
         320  +
                captured.insert("TargetType", value);
         321  +
            }
         322  +
        }
         323  +
         324  +
        cfg.interceptor_state().store_put(captured);
         325  +
        ::std::result::Result::Ok(())
         326  +
    }
         327  +
}
         328  +
#[derive(Debug)]
         329  +
struct UpdateDocumentResponseDeserializer;
         330  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateDocumentResponseDeserializer {
         331  +
    fn deserialize_nonstreaming_with_config(
         332  +
        &self,
         333  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         334  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         335  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         336  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         337  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         338  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         339  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         340  +
        // loads `body` before firing this hook.
         341  +
        let body = response.body().bytes().expect("body loaded");
         342  +
        let headers = response.headers();
         343  +
        #[allow(unused_mut)]
         344  +
        let mut force_error = false;
         345  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         346  +
        if !success && status != 200 || force_error {
         347  +
            let protocol = _cfg
         348  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         349  +
                .expect("a SharedClientProtocol is required");
         350  +
            #[allow(unused_mut)]
         351  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         352  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         353  +
            })?;
         354  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         355  +
            let generic = generic_builder.build();
         356  +
            let error_code = match generic.code() {
         357  +
                ::std::option::Option::Some(code) => code,
         358  +
                ::std::option::Option::None => {
         359  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         360  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_document::UpdateDocumentError::unhandled(
         361  +
                            generic,
         362  +
                        )),
         363  +
                    ))
         364  +
                }
         365  +
            };
         366  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         367  +
            let err = match error_code {
         368  +
                "DocumentVersionLimitExceeded" => crate::operation::update_document::UpdateDocumentError::DocumentVersionLimitExceeded({
         369  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         370  +
                        crate::types::error::DocumentVersionLimitExceeded::deserialize_with_response(
         371  +
                            &mut *deser,
         372  +
                            response.headers(),
         373  +
                            response.status().into(),
         374  +
                            body,
         375  +
                        )
         376  +
                    }) {
         377  +
                        ::std::result::Result::Ok(val) => val,
         378  +
                        ::std::result::Result::Err(e) => {
         379  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         380  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         381  +
                            ))
         382  +
                        }
         383  +
                    };
         384  +
                    tmp.meta = generic;
         385  +
                    if tmp.message.is_none() {
         386  +
                        tmp.message = _error_message;
         387  +
                    }
         388  +
                    tmp
         389  +
                }),
         390  +
                "DuplicateDocumentContent" => crate::operation::update_document::UpdateDocumentError::DuplicateDocumentContent({
         391  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         392  +
                        crate::types::error::DuplicateDocumentContent::deserialize_with_response(
         393  +
                            &mut *deser,
         394  +
                            response.headers(),
         395  +
                            response.status().into(),
         396  +
                            body,
         397  +
                        )
         398  +
                    }) {
         399  +
                        ::std::result::Result::Ok(val) => val,
         400  +
                        ::std::result::Result::Err(e) => {
         401  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         402  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         403  +
                            ))
         404  +
                        }
         405  +
                    };
         406  +
                    tmp.meta = generic;
         407  +
                    if tmp.message.is_none() {
         408  +
                        tmp.message = _error_message;
         409  +
                    }
         410  +
                    tmp
         411  +
                }),
         412  +
                "DuplicateDocumentVersionName" => crate::operation::update_document::UpdateDocumentError::DuplicateDocumentVersionName({
         413  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         414  +
                        crate::types::error::DuplicateDocumentVersionName::deserialize_with_response(
         415  +
                            &mut *deser,
         416  +
                            response.headers(),
         417  +
                            response.status().into(),
         418  +
                            body,
         419  +
                        )
         420  +
                    }) {
         421  +
                        ::std::result::Result::Ok(val) => val,
         422  +
                        ::std::result::Result::Err(e) => {
         423  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         424  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         425  +
                            ))
         426  +
                        }
         427  +
                    };
         428  +
                    tmp.meta = generic;
         429  +
                    if tmp.message.is_none() {
         430  +
                        tmp.message = _error_message;
         431  +
                    }
         432  +
                    tmp
         433  +
                }),
         434  +
                "InternalServerError" => crate::operation::update_document::UpdateDocumentError::InternalServerError({
         435  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         436  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         437  +
                            &mut *deser,
         438  +
                            response.headers(),
         439  +
                            response.status().into(),
         440  +
                            body,
         441  +
                        )
         442  +
                    }) {
         443  +
                        ::std::result::Result::Ok(val) => val,
         444  +
                        ::std::result::Result::Err(e) => {
         445  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         446  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         447  +
                            ))
         448  +
                        }
         449  +
                    };
         450  +
                    tmp.meta = generic;
         451  +
                    if tmp.message.is_none() {
         452  +
                        tmp.message = _error_message;
         453  +
                    }
         454  +
                    tmp
         455  +
                }),
         456  +
                "InvalidDocument" => crate::operation::update_document::UpdateDocumentError::InvalidDocument({
         457  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         458  +
                        crate::types::error::InvalidDocument::deserialize_with_response(
         459  +
                            &mut *deser,
         460  +
                            response.headers(),
         461  +
                            response.status().into(),
         462  +
                            body,
         463  +
                        )
         464  +
                    }) {
         465  +
                        ::std::result::Result::Ok(val) => val,
         466  +
                        ::std::result::Result::Err(e) => {
         467  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         468  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         469  +
                            ))
         470  +
                        }
         471  +
                    };
         472  +
                    tmp.meta = generic;
         473  +
                    if tmp.message.is_none() {
         474  +
                        tmp.message = _error_message;
         475  +
                    }
         476  +
                    tmp
         477  +
                }),
         478  +
                "InvalidDocumentContent" => crate::operation::update_document::UpdateDocumentError::InvalidDocumentContent({
         479  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         480  +
                        crate::types::error::InvalidDocumentContent::deserialize_with_response(
         481  +
                            &mut *deser,
         482  +
                            response.headers(),
         483  +
                            response.status().into(),
         484  +
                            body,
         485  +
                        )
         486  +
                    }) {
         487  +
                        ::std::result::Result::Ok(val) => val,
         488  +
                        ::std::result::Result::Err(e) => {
         489  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         490  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         491  +
                            ))
         492  +
                        }
         493  +
                    };
         494  +
                    tmp.meta = generic;
         495  +
                    if tmp.message.is_none() {
         496  +
                        tmp.message = _error_message;
         497  +
                    }
         498  +
                    tmp
         499  +
                }),
         500  +
                "InvalidDocumentOperation" => crate::operation::update_document::UpdateDocumentError::InvalidDocumentOperation({
         501  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         502  +
                        crate::types::error::InvalidDocumentOperation::deserialize_with_response(
         503  +
                            &mut *deser,
         504  +
                            response.headers(),
         505  +
                            response.status().into(),
         506  +
                            body,
         507  +
                        )
         508  +
                    }) {
         509  +
                        ::std::result::Result::Ok(val) => val,
         510  +
                        ::std::result::Result::Err(e) => {
         511  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         512  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         513  +
                            ))
         514  +
                        }
         515  +
                    };
         516  +
                    tmp.meta = generic;
         517  +
                    if tmp.message.is_none() {
         518  +
                        tmp.message = _error_message;
         519  +
                    }
         520  +
                    tmp
         521  +
                }),
         522  +
                "InvalidDocumentSchemaVersion" => crate::operation::update_document::UpdateDocumentError::InvalidDocumentSchemaVersion({
         523  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         524  +
                        crate::types::error::InvalidDocumentSchemaVersion::deserialize_with_response(
         525  +
                            &mut *deser,
         526  +
                            response.headers(),
         527  +
                            response.status().into(),
         528  +
                            body,
         529  +
                        )
         530  +
                    }) {
         531  +
                        ::std::result::Result::Ok(val) => val,
         532  +
                        ::std::result::Result::Err(e) => {
         533  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         534  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         535  +
                            ))
         536  +
                        }
         537  +
                    };
         538  +
                    tmp.meta = generic;
         539  +
                    if tmp.message.is_none() {
         540  +
                        tmp.message = _error_message;
         541  +
                    }
         542  +
                    tmp
         543  +
                }),
         544  +
                "InvalidDocumentVersion" => crate::operation::update_document::UpdateDocumentError::InvalidDocumentVersion({
         545  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         546  +
                        crate::types::error::InvalidDocumentVersion::deserialize_with_response(
         547  +
                            &mut *deser,
         548  +
                            response.headers(),
         549  +
                            response.status().into(),
         550  +
                            body,
         551  +
                        )
         552  +
                    }) {
         553  +
                        ::std::result::Result::Ok(val) => val,
         554  +
                        ::std::result::Result::Err(e) => {
         555  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         556  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         557  +
                            ))
         558  +
                        }
         559  +
                    };
         560  +
                    tmp.meta = generic;
         561  +
                    if tmp.message.is_none() {
         562  +
                        tmp.message = _error_message;
         563  +
                    }
         564  +
                    tmp
         565  +
                }),
         566  +
                "MaxDocumentSizeExceeded" => crate::operation::update_document::UpdateDocumentError::MaxDocumentSizeExceeded({
         567  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         568  +
                        crate::types::error::MaxDocumentSizeExceeded::deserialize_with_response(
         569  +
                            &mut *deser,
         570  +
                            response.headers(),
         571  +
                            response.status().into(),
         572  +
                            body,
         573  +
                        )
         574  +
                    }) {
         575  +
                        ::std::result::Result::Ok(val) => val,
         576  +
                        ::std::result::Result::Err(e) => {
         577  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         578  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         579  +
                            ))
         580  +
                        }
         581  +
                    };
         582  +
                    tmp.meta = generic;
         583  +
                    if tmp.message.is_none() {
         584  +
                        tmp.message = _error_message;
         585  +
                    }
         586  +
                    tmp
         587  +
                }),
         588  +
                _ => {
         589  +
                    // Registry-backed, operation-scoped reification of an error whose
         590  +
                    // code this operation does not model directly: the operation's own
         591  +
                    // error registry is consulted first, then the lookup widens to the
         592  +
                    // service-wide error registry. On a hit, the reified error is attached
         593  +
                    // as the source of the returned unhandled error while its metadata
         594  +
                    // (code, message, request id) is preserved; on a miss the generic
         595  +
                    // error is returned unchanged.
         596  +
                    match protocol
         597  +
                        .deserialize_error_response(response, _cfg)
         598  +
                        .ok()
         599  +
                        .and_then(|mut deser| {
         600  +
                            ::aws_smithy_schema::registry::reify_error(
         601  +
                                crate::operation::update_document::error_registry::REGISTRY
         602  +
                                    .or(&crate::error_type_registry::REGISTRY),
         603  +
                                error_code,
         604  +
                                &mut *deser,
         605  +
                            )
         606  +
                        }) {
         607  +
                        ::std::option::Option::Some(source) => <crate::operation::update_document::UpdateDocumentError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         608  +
                        ::std::option::Option::None => crate::operation::update_document::UpdateDocumentError::generic(generic),
         609  +
                    }
         610  +
                }
         611  +
            };
         612  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         613  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         614  +
            ))
         615  +
        } else {
         616  +
            let protocol = _cfg
         617  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         618  +
                .expect("a SharedClientProtocol is required");
         619  +
            let mut deser = protocol
         620  +
                .deserialize_response(response, UpdateDocument::OUTPUT_SCHEMA, _cfg)
         621  +
                .map_err(|e| {
         622  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         623  +
                })?;
         624  +
            // body and headers are already in scope from the top of the function;
         625  +
            // alias `headers` as `_response_headers` so MutateOutput
         626  +
            // customizations have a stable name to read from.
         627  +
            let _response_headers = headers;
         628  +
            #[allow(unused_mut)]
         629  +
            let mut output = crate::operation::update_document::UpdateDocumentOutput::deserialize_with_response(
         630  +
                &mut *deser,
         631  +
                _response_headers,
         632  +
                response.status().into(),
         633  +
                body,
         634  +
            )
         635  +
            .map_err(|e| {
         636  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         637  +
            })?;
         638  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         639  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         640  +
        }
         641  +
    }
         642  +
}
         643  +
#[derive(Debug)]
         644  +
struct UpdateDocumentRequestSerializer;
         645  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateDocumentRequestSerializer {
         646  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         647  +
    fn serialize_input(
         648  +
        &self,
         649  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         650  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         651  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         652  +
        let input = input
         653  +
            .downcast::<crate::operation::update_document::UpdateDocumentInput>()
         654  +
            .expect("correct type");
         655  +
         656  +
        let protocol = _cfg
         657  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         658  +
            .expect("a SharedClientProtocol is required");
         659  +
        let mut request = protocol
         660  +
            .serialize_request(&input, UpdateDocument::INPUT_SCHEMA, "/", _cfg)
         661  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         662  +
         663  +
        return ::std::result::Result::Ok(request);
         664  +
    }
         665  +
}
         666  +
#[derive(Debug)]
         667  +
struct UpdateDocumentEndpointParamsInterceptor;
         668  +
         669  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         670  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDocumentEndpointParamsInterceptor {
         671  +
    fn name(&self) -> &'static str {
         672  +
        "UpdateDocumentEndpointParamsInterceptor"
         673  +
    }
         674  +
         675  +
    fn read_before_execution(
         676  +
        &self,
         677  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         678  +
            '_,
         679  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         680  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         681  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         682  +
        >,
         683  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         684  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         685  +
        let _input = context
         686  +
            .input()
         687  +
            .downcast_ref::<UpdateDocumentInput>()
         688  +
            .ok_or("failed to downcast to UpdateDocumentInput")?;
         689  +
         690  +
        let params = crate::config::endpoint::Params::builder()
         691  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         692  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         693  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         694  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         695  +
            .build()
         696  +
            .map_err(|err| {
         697  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         698  +
            })?;
         699  +
        cfg.interceptor_state()
         700  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         701  +
        ::std::result::Result::Ok(())
         702  +
    }
         703  +
}
         704  +
         705  +
// The get_* functions below are generated from JMESPath expressions in the
         706  +
// operationContextParams trait. They target the operation's input shape.
         707  +
         708  +
/// Error type for the `UpdateDocumentError` operation.
         709  +
#[non_exhaustive]
         710  +
#[derive(::std::fmt::Debug)]
         711  +
pub enum UpdateDocumentError {
         712  +
    /// <p>The document has too many versions. Delete one or more document versions and try again.</p>
         713  +
    DocumentVersionLimitExceeded(crate::types::error::DocumentVersionLimitExceeded),
         714  +
    /// <p>The content of the association document matches another document. Change the content of the document and try again.</p>
         715  +
    DuplicateDocumentContent(crate::types::error::DuplicateDocumentContent),
         716  +
    /// <p>The version name has already been used in this document. Specify a different version name, and then try again.</p>
         717  +
    DuplicateDocumentVersionName(crate::types::error::DuplicateDocumentVersionName),
         718  +
    /// <p>An error occurred on the server side.</p>
         719  +
    InternalServerError(crate::types::error::InternalServerError),
         720  +
    /// <p>The specified SSM document doesn't exist.</p>
         721  +
    InvalidDocument(crate::types::error::InvalidDocument),
         722  +
    /// <p>The content for the document isn't valid.</p>
         723  +
    InvalidDocumentContent(crate::types::error::InvalidDocumentContent),
         724  +
    /// <p>You attempted to delete a document while it is still shared. You must stop sharing the document before you can delete it.</p>
         725  +
    InvalidDocumentOperation(crate::types::error::InvalidDocumentOperation),
         726  +
    /// <p>The version of the document schema isn't supported.</p>
         727  +
    InvalidDocumentSchemaVersion(crate::types::error::InvalidDocumentSchemaVersion),
         728  +
    /// <p>The document version isn't valid or doesn't exist.</p>
         729  +
    InvalidDocumentVersion(crate::types::error::InvalidDocumentVersion),
         730  +
    /// <p>The size limit of a document is 64 KB.</p>
         731  +
    MaxDocumentSizeExceeded(crate::types::error::MaxDocumentSizeExceeded),
         732  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         733  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         734  +
    variable wildcard pattern and check `.code()`:
         735  +
     \
         736  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         737  +
     \
         738  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateDocumentError) for what information is available for the error.")]
         739  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         740  +
}
         741  +
impl UpdateDocumentError {
         742  +
    /// Creates the `UpdateDocumentError::Unhandled` variant from any error type.
         743  +
    pub fn unhandled(
         744  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         745  +
    ) -> Self {
         746  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         747  +
            source: err.into(),
         748  +
            meta: ::std::default::Default::default(),
         749  +
        })
         750  +
    }
         751  +
         752  +
    /// Creates the `UpdateDocumentError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         753  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         754  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         755  +
            source: err.clone().into(),
         756  +
            meta: err,
         757  +
        })
         758  +
    }
         759  +
    ///
         760  +
    /// Returns error metadata, which includes the error code, message,
         761  +
    /// request ID, and potentially additional information.
         762  +
    ///
         763  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         764  +
        match self {
         765  +
            Self::DocumentVersionLimitExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         766  +
            Self::DuplicateDocumentContent(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         767  +
            Self::DuplicateDocumentVersionName(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         768  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         769  +
            Self::InvalidDocument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         770  +
            Self::InvalidDocumentContent(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         771  +
            Self::InvalidDocumentOperation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         772  +
            Self::InvalidDocumentSchemaVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         773  +
            Self::InvalidDocumentVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         774  +
            Self::MaxDocumentSizeExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         775  +
            Self::Unhandled(e) => &e.meta,
         776  +
        }
         777  +
    }
         778  +
    /// Returns `true` if the error kind is `UpdateDocumentError::DocumentVersionLimitExceeded`.
         779  +
    pub fn is_document_version_limit_exceeded(&self) -> bool {
         780  +
        matches!(self, Self::DocumentVersionLimitExceeded(_))
         781  +
    }
         782  +
    /// Returns `true` if the error kind is `UpdateDocumentError::DuplicateDocumentContent`.
         783  +
    pub fn is_duplicate_document_content(&self) -> bool {
         784  +
        matches!(self, Self::DuplicateDocumentContent(_))
         785  +
    }
         786  +
    /// Returns `true` if the error kind is `UpdateDocumentError::DuplicateDocumentVersionName`.
         787  +
    pub fn is_duplicate_document_version_name(&self) -> bool {
         788  +
        matches!(self, Self::DuplicateDocumentVersionName(_))
         789  +
    }
         790  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InternalServerError`.
         791  +
    pub fn is_internal_server_error(&self) -> bool {
         792  +
        matches!(self, Self::InternalServerError(_))
         793  +
    }
         794  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InvalidDocument`.
         795  +
    pub fn is_invalid_document(&self) -> bool {
         796  +
        matches!(self, Self::InvalidDocument(_))
         797  +
    }
         798  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InvalidDocumentContent`.
         799  +
    pub fn is_invalid_document_content(&self) -> bool {
         800  +
        matches!(self, Self::InvalidDocumentContent(_))
         801  +
    }
         802  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InvalidDocumentOperation`.
         803  +
    pub fn is_invalid_document_operation(&self) -> bool {
         804  +
        matches!(self, Self::InvalidDocumentOperation(_))
         805  +
    }
         806  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InvalidDocumentSchemaVersion`.
         807  +
    pub fn is_invalid_document_schema_version(&self) -> bool {
         808  +
        matches!(self, Self::InvalidDocumentSchemaVersion(_))
         809  +
    }
         810  +
    /// Returns `true` if the error kind is `UpdateDocumentError::InvalidDocumentVersion`.
         811  +
    pub fn is_invalid_document_version(&self) -> bool {
         812  +
        matches!(self, Self::InvalidDocumentVersion(_))
         813  +
    }
         814  +
    /// Returns `true` if the error kind is `UpdateDocumentError::MaxDocumentSizeExceeded`.
         815  +
    pub fn is_max_document_size_exceeded(&self) -> bool {
         816  +
        matches!(self, Self::MaxDocumentSizeExceeded(_))
         817  +
    }
         818  +
}
         819  +
impl ::std::error::Error for UpdateDocumentError {
         820  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         821  +
        match self {
         822  +
            Self::DocumentVersionLimitExceeded(_inner) => ::std::option::Option::Some(_inner),
         823  +
            Self::DuplicateDocumentContent(_inner) => ::std::option::Option::Some(_inner),
         824  +
            Self::DuplicateDocumentVersionName(_inner) => ::std::option::Option::Some(_inner),
         825  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         826  +
            Self::InvalidDocument(_inner) => ::std::option::Option::Some(_inner),
         827  +
            Self::InvalidDocumentContent(_inner) => ::std::option::Option::Some(_inner),
         828  +
            Self::InvalidDocumentOperation(_inner) => ::std::option::Option::Some(_inner),
         829  +
            Self::InvalidDocumentSchemaVersion(_inner) => ::std::option::Option::Some(_inner),
         830  +
            Self::InvalidDocumentVersion(_inner) => ::std::option::Option::Some(_inner),
         831  +
            Self::MaxDocumentSizeExceeded(_inner) => ::std::option::Option::Some(_inner),
         832  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         833  +
        }
         834  +
    }
         835  +
}
         836  +
impl ::std::fmt::Display for UpdateDocumentError {
         837  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         838  +
        match self {
         839  +
            Self::DocumentVersionLimitExceeded(_inner) => _inner.fmt(f),
         840  +
            Self::DuplicateDocumentContent(_inner) => _inner.fmt(f),
         841  +
            Self::DuplicateDocumentVersionName(_inner) => _inner.fmt(f),
         842  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         843  +
            Self::InvalidDocument(_inner) => _inner.fmt(f),
         844  +
            Self::InvalidDocumentContent(_inner) => _inner.fmt(f),
         845  +
            Self::InvalidDocumentOperation(_inner) => _inner.fmt(f),
         846  +
            Self::InvalidDocumentSchemaVersion(_inner) => _inner.fmt(f),
         847  +
            Self::InvalidDocumentVersion(_inner) => _inner.fmt(f),
         848  +
            Self::MaxDocumentSizeExceeded(_inner) => _inner.fmt(f),
         849  +
            Self::Unhandled(_inner) => {
         850  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         851  +
                    write!(f, "unhandled error ({code})")
         852  +
                } else {
         853  +
                    f.write_str("unhandled error")
         854  +
                }
         855  +
            }
         856  +
        }
         857  +
    }
         858  +
}
         859  +
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateDocumentError {
         860  +
    fn code(&self) -> ::std::option::Option<&str> {
         861  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         862  +
    }
         863  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         864  +
        ::std::option::Option::None
         865  +
    }
         866  +
}
         867  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateDocumentError {
         868  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         869  +
        match self {
         870  +
            Self::DocumentVersionLimitExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         871  +
            Self::DuplicateDocumentContent(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         872  +
            Self::DuplicateDocumentVersionName(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         873  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         874  +
            Self::InvalidDocument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         875  +
            Self::InvalidDocumentContent(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         876  +
            Self::InvalidDocumentOperation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         877  +
            Self::InvalidDocumentSchemaVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         878  +
            Self::InvalidDocumentVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         879  +
            Self::MaxDocumentSizeExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         880  +
            Self::Unhandled(_inner) => &_inner.meta,
         881  +
        }
         882  +
    }
         883  +
}
         884  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateDocumentError {
         885  +
    fn create_unhandled_error(
         886  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         887  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         888  +
    ) -> Self {
         889  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         890  +
            source,
         891  +
            meta: meta.unwrap_or_default(),
         892  +
        })
         893  +
    }
         894  +
}
         895  +
impl ::aws_types::request_id::RequestId for crate::operation::update_document::UpdateDocumentError {
         896  +
    fn request_id(&self) -> Option<&str> {
         897  +
        self.meta().request_id()
         898  +
    }
         899  +
}
         900  +
         901  +
pub use crate::operation::update_document::_update_document_input::UpdateDocumentInput;
         902  +
         903  +
pub use crate::operation::update_document::_update_document_output::UpdateDocumentOutput;
         904  +
         905  +
mod _update_document_input;
         906  +
         907  +
mod _update_document_output;
         908  +
         909  +
/// Builders
         910  +
pub mod builders;