AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

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

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_association_status/_update_association_status_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 UpdateAssociationStatusOutput {
           6  +
    /// <p>Information about the association.</p>
           7  +
    pub association_description: ::std::option::Option<crate::types::AssociationDescription>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl UpdateAssociationStatusOutput {
          11  +
    /// <p>Information about the association.</p>
          12  +
    pub fn association_description(&self) -> ::std::option::Option<&crate::types::AssociationDescription> {
          13  +
        self.association_description.as_ref()
          14  +
    }
          15  +
}
          16  +
static UPDATEASSOCIATIONSTATUSOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts(
          18  +
        "com.amazonaws.ssm.synthetic#UpdateAssociationStatusOutput$AssociationDescription",
          19  +
        "com.amazonaws.ssm.synthetic",
          20  +
        "UpdateAssociationStatusOutput",
          21  +
    ),
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    "AssociationDescription",
          24  +
    0,
          25  +
);
          26  +
static UPDATEASSOCIATIONSTATUSOUTPUT_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 UPDATEASSOCIATIONSTATUSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#UpdateAssociationStatusOutput",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "UpdateAssociationStatusOutput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    &[
          41  +
        &UPDATEASSOCIATIONSTATUSOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION,
          42  +
        &UPDATEASSOCIATIONSTATUSOUTPUT_MEMBER__REQUEST_ID,
          43  +
    ],
          44  +
)
          45  +
.with_original_name("UpdateAssociationStatusResult");
          46  +
impl UpdateAssociationStatusOutput {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEASSOCIATIONSTATUSOUTPUT_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAssociationStatusOutput {
          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.association_description {
          57  +
            ser.write_struct(&UPDATEASSOCIATIONSTATUSOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl UpdateAssociationStatusOutput {
          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(&UPDATEASSOCIATIONSTATUSOUTPUT_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.association_description = Some(crate::types::AssociationDescription::deserialize(deser)?);
          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 UpdateAssociationStatusOutput {
          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(&UPDATEASSOCIATIONSTATUSOUTPUT_SCHEMA, &mut |member, deser| {
         119  +
            match member.member_index() {
         120  +
                Some(0) => {
         121  +
                    builder.association_description = Some(crate::types::AssociationDescription::deserialize(deser)?);
         122  +
                }
         123  +
                _ => {}
         124  +
            }
         125  +
            Ok(())
         126  +
        })?;
         127  +
        Ok(builder.build())
         128  +
    }
         129  +
}
         130  +
impl ::aws_types::request_id::RequestId for UpdateAssociationStatusOutput {
         131  +
    fn request_id(&self) -> Option<&str> {
         132  +
        self._request_id.as_deref()
         133  +
    }
         134  +
}
         135  +
impl UpdateAssociationStatusOutput {
         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 UpdateAssociationStatusOutput {
         142  +
    /// Creates a new builder-style object to manufacture [`UpdateAssociationStatusOutput`](crate::operation::update_association_status::UpdateAssociationStatusOutput).
         143  +
    pub fn builder() -> crate::operation::update_association_status::builders::UpdateAssociationStatusOutputBuilder {
         144  +
        crate::operation::update_association_status::builders::UpdateAssociationStatusOutputBuilder::default()
         145  +
    }
         146  +
}
         147  +
         148  +
/// A builder for [`UpdateAssociationStatusOutput`](crate::operation::update_association_status::UpdateAssociationStatusOutput).
         149  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         150  +
#[non_exhaustive]
         151  +
pub struct UpdateAssociationStatusOutputBuilder {
         152  +
    pub(crate) association_description: ::std::option::Option<crate::types::AssociationDescription>,
         153  +
    _request_id: Option<String>,
         154  +
}
         155  +
impl UpdateAssociationStatusOutputBuilder {
         156  +
    /// <p>Information about the association.</p>
         157  +
    pub fn association_description(mut self, input: crate::types::AssociationDescription) -> Self {
         158  +
        self.association_description = ::std::option::Option::Some(input);
         159  +
        self
         160  +
    }
         161  +
    /// <p>Information about the association.</p>
         162  +
    pub fn set_association_description(mut self, input: ::std::option::Option<crate::types::AssociationDescription>) -> Self {
         163  +
        self.association_description = input;
         164  +
        self
         165  +
    }
         166  +
    /// <p>Information about the association.</p>
         167  +
    pub fn get_association_description(&self) -> &::std::option::Option<crate::types::AssociationDescription> {
         168  +
        &self.association_description
         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 [`UpdateAssociationStatusOutput`](crate::operation::update_association_status::UpdateAssociationStatusOutput).
         180  +
    pub fn build(self) -> crate::operation::update_association_status::UpdateAssociationStatusOutput {
         181  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput {
         182  +
            association_description: self.association_description,
         183  +
            _request_id: self._request_id,
         184  +
        }
         185  +
    }
         186  +
}

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

@@ -0,1 +0,154 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_association_status::_update_association_status_input::UpdateAssociationStatusInputBuilder;
           3  +
           4  +
pub use crate::operation::update_association_status::_update_association_status_output::UpdateAssociationStatusOutputBuilder;
           5  +
           6  +
impl crate::operation::update_association_status::builders::UpdateAssociationStatusInputBuilder {
           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_association_status::UpdateAssociationStatusOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_association_status::UpdateAssociationStatusError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_association_status();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateAssociationStatus`.
          24  +
///
          25  +
/// <p>Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified managed node.</p>
          26  +
/// <p><code>UpdateAssociationStatus</code> is primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to report status updates about your associations and is only used for associations created with the <code>InstanceId</code> legacy parameter.</p>
          27  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          28  +
pub struct UpdateAssociationStatusFluentBuilder {
          29  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          30  +
    inner: crate::operation::update_association_status::builders::UpdateAssociationStatusInputBuilder,
          31  +
    config_override: ::std::option::Option<crate::config::Builder>,
          32  +
}
          33  +
impl
          34  +
    crate::client::customize::internal::CustomizableSend<
          35  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput,
          36  +
        crate::operation::update_association_status::UpdateAssociationStatusError,
          37  +
    > for UpdateAssociationStatusFluentBuilder
          38  +
{
          39  +
    fn send(
          40  +
        self,
          41  +
        config_override: crate::config::Builder,
          42  +
    ) -> crate::client::customize::internal::BoxFuture<
          43  +
        crate::client::customize::internal::SendResult<
          44  +
            crate::operation::update_association_status::UpdateAssociationStatusOutput,
          45  +
            crate::operation::update_association_status::UpdateAssociationStatusError,
          46  +
        >,
          47  +
    > {
          48  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          49  +
    }
          50  +
}
          51  +
impl UpdateAssociationStatusFluentBuilder {
          52  +
    /// Creates a new `UpdateAssociationStatusFluentBuilder`.
          53  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          54  +
        Self {
          55  +
            handle,
          56  +
            inner: ::std::default::Default::default(),
          57  +
            config_override: ::std::option::Option::None,
          58  +
        }
          59  +
    }
          60  +
    /// Access the UpdateAssociationStatus as a reference.
          61  +
    pub fn as_input(&self) -> &crate::operation::update_association_status::builders::UpdateAssociationStatusInputBuilder {
          62  +
        &self.inner
          63  +
    }
          64  +
    /// Sends the request and returns the response.
          65  +
    ///
          66  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          67  +
    /// can be matched against.
          68  +
    ///
          69  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          70  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          71  +
    /// set when configuring the client.
          72  +
    pub async fn send(
          73  +
        self,
          74  +
    ) -> ::std::result::Result<
          75  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput,
          76  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          77  +
            crate::operation::update_association_status::UpdateAssociationStatusError,
          78  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          79  +
        >,
          80  +
    > {
          81  +
        let input = self
          82  +
            .inner
          83  +
            .build()
          84  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          85  +
        let runtime_plugins = crate::operation::update_association_status::UpdateAssociationStatus::operation_runtime_plugins(
          86  +
            self.handle.runtime_plugins.clone(),
          87  +
            &self.handle.conf,
          88  +
            self.config_override,
          89  +
        );
          90  +
        crate::operation::update_association_status::UpdateAssociationStatus::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput,
          98  +
        crate::operation::update_association_status::UpdateAssociationStatusError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// <p>The name of the SSM document.</p>
         113  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        self.inner = self.inner.name(input.into());
         115  +
        self
         116  +
    }
         117  +
    /// <p>The name of the SSM document.</p>
         118  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.set_name(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>The name of the SSM document.</p>
         123  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         124  +
        self.inner.get_name()
         125  +
    }
         126  +
    /// <p>The managed node ID.</p>
         127  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.instance_id(input.into());
         129  +
        self
         130  +
    }
         131  +
    /// <p>The managed node ID.</p>
         132  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        self.inner = self.inner.set_instance_id(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>The managed node ID.</p>
         137  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         138  +
        self.inner.get_instance_id()
         139  +
    }
         140  +
    /// <p>The association status.</p>
         141  +
    pub fn association_status(mut self, input: crate::types::AssociationStatus) -> Self {
         142  +
        self.inner = self.inner.association_status(input);
         143  +
        self
         144  +
    }
         145  +
    /// <p>The association status.</p>
         146  +
    pub fn set_association_status(mut self, input: ::std::option::Option<crate::types::AssociationStatus>) -> Self {
         147  +
        self.inner = self.inner.set_association_status(input);
         148  +
        self
         149  +
    }
         150  +
    /// <p>The association status.</p>
         151  +
    pub fn get_association_status(&self) -> &::std::option::Option<crate::types::AssociationStatus> {
         152  +
        self.inner.get_association_status()
         153  +
    }
         154  +
}

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

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