AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_resource_data_sync/_update_resource_data_sync_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 UpdateResourceDataSyncInput {
           6  +
    /// <p>The name of the resource data sync you want to update.</p>
           7  +
    pub sync_name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
           9  +
    pub sync_type: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>Specify information about the data sources to synchronize.</p>
          11  +
    pub sync_source: ::std::option::Option<crate::types::ResourceDataSyncSource>,
          12  +
}
          13  +
impl UpdateResourceDataSyncInput {
          14  +
    /// <p>The name of the resource data sync you want to update.</p>
          15  +
    pub fn sync_name(&self) -> ::std::option::Option<&str> {
          16  +
        self.sync_name.as_deref()
          17  +
    }
          18  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
          19  +
    pub fn sync_type(&self) -> ::std::option::Option<&str> {
          20  +
        self.sync_type.as_deref()
          21  +
    }
          22  +
    /// <p>Specify information about the data sources to synchronize.</p>
          23  +
    pub fn sync_source(&self) -> ::std::option::Option<&crate::types::ResourceDataSyncSource> {
          24  +
        self.sync_source.as_ref()
          25  +
    }
          26  +
}
          27  +
static UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts(
          29  +
        "com.amazonaws.ssm.synthetic#UpdateResourceDataSyncInput$SyncName",
          30  +
        "com.amazonaws.ssm.synthetic",
          31  +
        "UpdateResourceDataSyncInput",
          32  +
    ),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "SyncName",
          35  +
    0,
          36  +
);
          37  +
static UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#UpdateResourceDataSyncInput$SyncType",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "UpdateResourceDataSyncInput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::String,
          44  +
    "SyncType",
          45  +
    1,
          46  +
);
          47  +
static UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_SOURCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#UpdateResourceDataSyncInput$SyncSource",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "UpdateResourceDataSyncInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::Structure,
          54  +
    "SyncSource",
          55  +
    2,
          56  +
);
          57  +
static UPDATERESOURCEDATASYNCINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#UpdateResourceDataSyncInput",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "UpdateResourceDataSyncInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    &[
          65  +
        &UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_NAME,
          66  +
        &UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_TYPE,
          67  +
        &UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_SOURCE,
          68  +
    ],
          69  +
)
          70  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          71  +
.with_original_name("UpdateResourceDataSyncRequest");
          72  +
impl UpdateResourceDataSyncInput {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATERESOURCEDATASYNCINPUT_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateResourceDataSyncInput {
          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.sync_name {
          83  +
            ser.write_string(&UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_NAME, val)?;
          84  +
        }
          85  +
        if let Some(ref val) = self.sync_type {
          86  +
            ser.write_string(&UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_TYPE, val)?;
          87  +
        }
          88  +
        if let Some(ref val) = self.sync_source {
          89  +
            ser.write_struct(&UPDATERESOURCEDATASYNCINPUT_MEMBER_SYNC_SOURCE, val)?;
          90  +
        }
          91  +
        Ok(())
          92  +
    }
          93  +
}
          94  +
impl UpdateResourceDataSyncInput {
          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(&UPDATERESOURCEDATASYNCINPUT_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.sync_name = Some(deser.read_string(member)?);
         115  +
                    }
         116  +
                }
         117  +
                Some(1) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.sync_type = Some(deser.read_string(member)?);
         122  +
                    }
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    if deser.is_null() {
         126  +
                        deser.read_null()?;
         127  +
                    } else {
         128  +
                        builder.sync_source = Some(crate::types::ResourceDataSyncSource::deserialize(deser)?);
         129  +
                    }
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.sync_name = builder.sync_name.or(Some(String::new()));
         136  +
        builder.sync_type = builder.sync_type.or(Some(String::new()));
         137  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         138  +
    }
         139  +
}
         140  +
impl UpdateResourceDataSyncInput {
         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 UpdateResourceDataSyncInput {
         152  +
    /// Creates a new builder-style object to manufacture [`UpdateResourceDataSyncInput`](crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput).
         153  +
    pub fn builder() -> crate::operation::update_resource_data_sync::builders::UpdateResourceDataSyncInputBuilder {
         154  +
        crate::operation::update_resource_data_sync::builders::UpdateResourceDataSyncInputBuilder::default()
         155  +
    }
         156  +
}
         157  +
         158  +
/// A builder for [`UpdateResourceDataSyncInput`](crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput).
         159  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         160  +
#[non_exhaustive]
         161  +
pub struct UpdateResourceDataSyncInputBuilder {
         162  +
    pub(crate) sync_name: ::std::option::Option<::std::string::String>,
         163  +
    pub(crate) sync_type: ::std::option::Option<::std::string::String>,
         164  +
    pub(crate) sync_source: ::std::option::Option<crate::types::ResourceDataSyncSource>,
         165  +
}
         166  +
impl UpdateResourceDataSyncInputBuilder {
         167  +
    /// <p>The name of the resource data sync you want to update.</p>
         168  +
    /// This field is required.
         169  +
    pub fn sync_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         170  +
        self.sync_name = ::std::option::Option::Some(input.into());
         171  +
        self
         172  +
    }
         173  +
    /// <p>The name of the resource data sync you want to update.</p>
         174  +
    pub fn set_sync_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         175  +
        self.sync_name = input;
         176  +
        self
         177  +
    }
         178  +
    /// <p>The name of the resource data sync you want to update.</p>
         179  +
    pub fn get_sync_name(&self) -> &::std::option::Option<::std::string::String> {
         180  +
        &self.sync_name
         181  +
    }
         182  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         183  +
    /// This field is required.
         184  +
    pub fn sync_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         185  +
        self.sync_type = ::std::option::Option::Some(input.into());
         186  +
        self
         187  +
    }
         188  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         189  +
    pub fn set_sync_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         190  +
        self.sync_type = input;
         191  +
        self
         192  +
    }
         193  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         194  +
    pub fn get_sync_type(&self) -> &::std::option::Option<::std::string::String> {
         195  +
        &self.sync_type
         196  +
    }
         197  +
    /// <p>Specify information about the data sources to synchronize.</p>
         198  +
    /// This field is required.
         199  +
    pub fn sync_source(mut self, input: crate::types::ResourceDataSyncSource) -> Self {
         200  +
        self.sync_source = ::std::option::Option::Some(input);
         201  +
        self
         202  +
    }
         203  +
    /// <p>Specify information about the data sources to synchronize.</p>
         204  +
    pub fn set_sync_source(mut self, input: ::std::option::Option<crate::types::ResourceDataSyncSource>) -> Self {
         205  +
        self.sync_source = input;
         206  +
        self
         207  +
    }
         208  +
    /// <p>Specify information about the data sources to synchronize.</p>
         209  +
    pub fn get_sync_source(&self) -> &::std::option::Option<crate::types::ResourceDataSyncSource> {
         210  +
        &self.sync_source
         211  +
    }
         212  +
    /// Consumes the builder and constructs a [`UpdateResourceDataSyncInput`](crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput).
         213  +
    pub fn build(
         214  +
        self,
         215  +
    ) -> ::std::result::Result<
         216  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput,
         217  +
        ::aws_smithy_types::error::operation::BuildError,
         218  +
    > {
         219  +
        ::std::result::Result::Ok(crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput {
         220  +
            sync_name: self.sync_name,
         221  +
            sync_type: self.sync_type,
         222  +
            sync_source: self.sync_source,
         223  +
        })
         224  +
    }
         225  +
}

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

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

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

@@ -0,1 +0,155 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_resource_data_sync::_update_resource_data_sync_input::UpdateResourceDataSyncInputBuilder;
           3  +
           4  +
pub use crate::operation::update_resource_data_sync::_update_resource_data_sync_output::UpdateResourceDataSyncOutputBuilder;
           5  +
           6  +
impl crate::operation::update_resource_data_sync::builders::UpdateResourceDataSyncInputBuilder {
           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_resource_data_sync::UpdateResourceDataSyncOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_resource_data_sync();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateResourceDataSync`.
          24  +
///
          25  +
/// <p>Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the <code>Include only the current account</code> option, you can't edit that sync later and choose the <code>Include all accounts from my Organizations configuration</code> option. Instead, you must delete the first resource data sync, and create a new one.</p><note>
          26  +
/// <p>This API operation only supports a resource data sync that was created with a SyncFromSource <code>SyncType</code>.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct UpdateResourceDataSyncFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::update_resource_data_sync::builders::UpdateResourceDataSyncInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput,
          37  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
          38  +
    > for UpdateResourceDataSyncFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput,
          46  +
            crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl UpdateResourceDataSyncFluentBuilder {
          53  +
    /// Creates a new `UpdateResourceDataSyncFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the UpdateResourceDataSync as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::update_resource_data_sync::builders::UpdateResourceDataSyncInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::update_resource_data_sync::UpdateResourceDataSync::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSync::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput,
          99  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// <p>The name of the resource data sync you want to update.</p>
         114  +
    pub fn sync_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         115  +
        self.inner = self.inner.sync_name(input.into());
         116  +
        self
         117  +
    }
         118  +
    /// <p>The name of the resource data sync you want to update.</p>
         119  +
    pub fn set_sync_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         120  +
        self.inner = self.inner.set_sync_name(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>The name of the resource data sync you want to update.</p>
         124  +
    pub fn get_sync_name(&self) -> &::std::option::Option<::std::string::String> {
         125  +
        self.inner.get_sync_name()
         126  +
    }
         127  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         128  +
    pub fn sync_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        self.inner = self.inner.sync_type(input.into());
         130  +
        self
         131  +
    }
         132  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         133  +
    pub fn set_sync_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         134  +
        self.inner = self.inner.set_sync_type(input);
         135  +
        self
         136  +
    }
         137  +
    /// <p>The type of resource data sync. The supported <code>SyncType</code> is SyncFromSource.</p>
         138  +
    pub fn get_sync_type(&self) -> &::std::option::Option<::std::string::String> {
         139  +
        self.inner.get_sync_type()
         140  +
    }
         141  +
    /// <p>Specify information about the data sources to synchronize.</p>
         142  +
    pub fn sync_source(mut self, input: crate::types::ResourceDataSyncSource) -> Self {
         143  +
        self.inner = self.inner.sync_source(input);
         144  +
        self
         145  +
    }
         146  +
    /// <p>Specify information about the data sources to synchronize.</p>
         147  +
    pub fn set_sync_source(mut self, input: ::std::option::Option<crate::types::ResourceDataSyncSource>) -> Self {
         148  +
        self.inner = self.inner.set_sync_source(input);
         149  +
        self
         150  +
    }
         151  +
    /// <p>Specify information about the data sources to synchronize.</p>
         152  +
    pub fn get_sync_source(&self) -> &::std::option::Option<crate::types::ResourceDataSyncSource> {
         153  +
        self.inner.get_sync_source()
         154  +
    }
         155  +
}

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

@@ -0,1 +0,608 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `UpdateServiceSetting`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct UpdateServiceSetting;
           6  +
impl UpdateServiceSetting {
           7  +
    /// Creates a new `UpdateServiceSetting`
           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_service_setting::UpdateServiceSettingInput::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_service_setting::UpdateServiceSettingOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::update_service_setting::UpdateServiceSettingInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::update_service_setting::UpdateServiceSettingOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::update_service_setting::UpdateServiceSettingError,
          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_service_setting::UpdateServiceSettingError>()
          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_service_setting::UpdateServiceSettingOutput>()
          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_service_setting::UpdateServiceSettingInput,
          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", "UpdateServiceSetting", 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.UpdateServiceSetting",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "UpdateServiceSetting",
          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::InternalServerError::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::InternalServerError::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::InternalServerError::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::ServiceSettingNotFound::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::ServiceSettingNotFound::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::ServiceSettingNotFound::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
.insert_error_shape(
         123  +
                        crate::types::error::TooManyUpdates::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::TooManyUpdates::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::TooManyUpdates::deserialize(d)?))
         129  +
                        },
         130  +
                    )
         131  +
                            .build()
         132  +
    });
         133  +
}
         134  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateServiceSetting {
         135  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         136  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateServiceSetting");
         137  +
         138  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         139  +
            UpdateServiceSettingRequestSerializer,
         140  +
        ));
         141  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         142  +
            UpdateServiceSettingResponseDeserializer,
         143  +
        ));
         144  +
         145  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         146  +
            crate::config::auth::Params::builder()
         147  +
                .operation_name("UpdateServiceSetting")
         148  +
                .build()
         149  +
                .expect("required fields set"),
         150  +
        ));
         151  +
         152  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         153  +
            "UpdateServiceSetting",
         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("UpdateServiceSetting")
         176  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         177  +
                UpdateServiceSettingTelemetryInputCaptureInterceptor,
         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  +
                UpdateServiceSettingEndpointParamsInterceptor,
         184  +
            ))
         185  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         186  +
                crate::operation::update_service_setting::UpdateServiceSettingError,
         187  +
            >::new())
         188  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         189  +
                crate::operation::update_service_setting::UpdateServiceSettingError,
         190  +
            >::new())
         191  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         192  +
                crate::operation::update_service_setting::UpdateServiceSettingError,
         193  +
            >::new())
         194  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         195  +
                crate::operation::update_service_setting::UpdateServiceSettingError,
         196  +
            >::new());
         197  +
         198  +
        ::std::borrow::Cow::Owned(rcb)
         199  +
    }
         200  +
}
         201  +
         202  +
#[derive(Debug)]
         203  +
struct UpdateServiceSettingTelemetryInputCaptureInterceptor;
         204  +
         205  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         206  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateServiceSettingTelemetryInputCaptureInterceptor {
         207  +
    fn name(&self) -> &'static str {
         208  +
        "UpdateServiceSettingTelemetryInputCaptureInterceptor"
         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::<UpdateServiceSettingInput>() 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("SettingId") {
         236  +
            if let ::std::option::Option::Some(value) = input.setting_id.as_deref() {
         237  +
                captured.insert("SettingId", value);
         238  +
            }
         239  +
        }
         240  +
        if requested.should_capture("SettingValue") {
         241  +
            if let ::std::option::Option::Some(value) = input.setting_value.as_deref() {
         242  +
                captured.insert("SettingValue", value);
         243  +
            }
         244  +
        }
         245  +
         246  +
        cfg.interceptor_state().store_put(captured);
         247  +
        ::std::result::Result::Ok(())
         248  +
    }
         249  +
}
         250  +
#[derive(Debug)]
         251  +
struct UpdateServiceSettingResponseDeserializer;
         252  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateServiceSettingResponseDeserializer {
         253  +
    fn deserialize_nonstreaming_with_config(
         254  +
        &self,
         255  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         256  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         257  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         258  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         259  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         260  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         261  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         262  +
        // loads `body` before firing this hook.
         263  +
        let body = response.body().bytes().expect("body loaded");
         264  +
        let headers = response.headers();
         265  +
        #[allow(unused_mut)]
         266  +
        let mut force_error = false;
         267  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         268  +
        if !success && status != 200 || force_error {
         269  +
            let protocol = _cfg
         270  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         271  +
                .expect("a SharedClientProtocol is required");
         272  +
            #[allow(unused_mut)]
         273  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         274  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         275  +
            })?;
         276  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         277  +
            let generic = generic_builder.build();
         278  +
            let error_code = match generic.code() {
         279  +
                ::std::option::Option::Some(code) => code,
         280  +
                ::std::option::Option::None => {
         281  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         282  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         283  +
                            crate::operation::update_service_setting::UpdateServiceSettingError::unhandled(generic),
         284  +
                        ),
         285  +
                    ))
         286  +
                }
         287  +
            };
         288  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         289  +
            let err = match error_code {
         290  +
                "InternalServerError" => crate::operation::update_service_setting::UpdateServiceSettingError::InternalServerError({
         291  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         292  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         293  +
                            &mut *deser,
         294  +
                            response.headers(),
         295  +
                            response.status().into(),
         296  +
                            body,
         297  +
                        )
         298  +
                    }) {
         299  +
                        ::std::result::Result::Ok(val) => val,
         300  +
                        ::std::result::Result::Err(e) => {
         301  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         302  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         303  +
                            ))
         304  +
                        }
         305  +
                    };
         306  +
                    tmp.meta = generic;
         307  +
                    if tmp.message.is_none() {
         308  +
                        tmp.message = _error_message;
         309  +
                    }
         310  +
                    tmp
         311  +
                }),
         312  +
                "ServiceSettingNotFound" => crate::operation::update_service_setting::UpdateServiceSettingError::ServiceSettingNotFound({
         313  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         314  +
                        crate::types::error::ServiceSettingNotFound::deserialize_with_response(
         315  +
                            &mut *deser,
         316  +
                            response.headers(),
         317  +
                            response.status().into(),
         318  +
                            body,
         319  +
                        )
         320  +
                    }) {
         321  +
                        ::std::result::Result::Ok(val) => val,
         322  +
                        ::std::result::Result::Err(e) => {
         323  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         324  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         325  +
                            ))
         326  +
                        }
         327  +
                    };
         328  +
                    tmp.meta = generic;
         329  +
                    if tmp.message.is_none() {
         330  +
                        tmp.message = _error_message;
         331  +
                    }
         332  +
                    tmp
         333  +
                }),
         334  +
                "TooManyUpdates" => crate::operation::update_service_setting::UpdateServiceSettingError::TooManyUpdates({
         335  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         336  +
                        crate::types::error::TooManyUpdates::deserialize_with_response(
         337  +
                            &mut *deser,
         338  +
                            response.headers(),
         339  +
                            response.status().into(),
         340  +
                            body,
         341  +
                        )
         342  +
                    }) {
         343  +
                        ::std::result::Result::Ok(val) => val,
         344  +
                        ::std::result::Result::Err(e) => {
         345  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         346  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         347  +
                            ))
         348  +
                        }
         349  +
                    };
         350  +
                    tmp.meta = generic;
         351  +
                    if tmp.message.is_none() {
         352  +
                        tmp.message = _error_message;
         353  +
                    }
         354  +
                    tmp
         355  +
                }),
         356  +
                _ => {
         357  +
                    // Registry-backed, operation-scoped reification of an error whose
         358  +
                    // code this operation does not model directly: the operation's own
         359  +
                    // error registry is consulted first, then the lookup widens to the
         360  +
                    // service-wide error registry. On a hit, the reified error is attached
         361  +
                    // as the source of the returned unhandled error while its metadata
         362  +
                    // (code, message, request id) is preserved; on a miss the generic
         363  +
                    // error is returned unchanged.
         364  +
                    match protocol
         365  +
                        .deserialize_error_response(response, _cfg)
         366  +
                        .ok()
         367  +
                        .and_then(|mut deser| {
         368  +
                            ::aws_smithy_schema::registry::reify_error(
         369  +
                                crate::operation::update_service_setting::error_registry::REGISTRY
         370  +
                                    .or(&crate::error_type_registry::REGISTRY),
         371  +
                                error_code,
         372  +
                                &mut *deser,
         373  +
                            )
         374  +
                        }) {
         375  +
                        ::std::option::Option::Some(source) => <crate::operation::update_service_setting::UpdateServiceSettingError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         376  +
                        ::std::option::Option::None => crate::operation::update_service_setting::UpdateServiceSettingError::generic(generic),
         377  +
                    }
         378  +
                }
         379  +
            };
         380  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         381  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         382  +
            ))
         383  +
        } else {
         384  +
            let protocol = _cfg
         385  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         386  +
                .expect("a SharedClientProtocol is required");
         387  +
            let mut deser = protocol
         388  +
                .deserialize_response(response, UpdateServiceSetting::OUTPUT_SCHEMA, _cfg)
         389  +
                .map_err(|e| {
         390  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         391  +
                })?;
         392  +
            // body and headers are already in scope from the top of the function;
         393  +
            // alias `headers` as `_response_headers` so MutateOutput
         394  +
            // customizations have a stable name to read from.
         395  +
            let _response_headers = headers;
         396  +
            #[allow(unused_mut)]
         397  +
            let mut output = crate::operation::update_service_setting::UpdateServiceSettingOutput::deserialize_with_response(
         398  +
                &mut *deser,
         399  +
                _response_headers,
         400  +
                response.status().into(),
         401  +
                body,
         402  +
            )
         403  +
            .map_err(|e| {
         404  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         405  +
            })?;
         406  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         407  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         408  +
        }
         409  +
    }
         410  +
}
         411  +
#[derive(Debug)]
         412  +
struct UpdateServiceSettingRequestSerializer;
         413  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateServiceSettingRequestSerializer {
         414  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         415  +
    fn serialize_input(
         416  +
        &self,
         417  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         418  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         419  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         420  +
        let input = input
         421  +
            .downcast::<crate::operation::update_service_setting::UpdateServiceSettingInput>()
         422  +
            .expect("correct type");
         423  +
         424  +
        let protocol = _cfg
         425  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         426  +
            .expect("a SharedClientProtocol is required");
         427  +
        let mut request = protocol
         428  +
            .serialize_request(&input, UpdateServiceSetting::INPUT_SCHEMA, "/", _cfg)
         429  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         430  +
         431  +
        return ::std::result::Result::Ok(request);
         432  +
    }
         433  +
}
         434  +
#[derive(Debug)]
         435  +
struct UpdateServiceSettingEndpointParamsInterceptor;
         436  +
         437  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         438  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateServiceSettingEndpointParamsInterceptor {
         439  +
    fn name(&self) -> &'static str {
         440  +
        "UpdateServiceSettingEndpointParamsInterceptor"
         441  +
    }
         442  +
         443  +
    fn read_before_execution(
         444  +
        &self,
         445  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         446  +
            '_,
         447  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         448  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         449  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         450  +
        >,
         451  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         452  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         453  +
        let _input = context
         454  +
            .input()
         455  +
            .downcast_ref::<UpdateServiceSettingInput>()
         456  +
            .ok_or("failed to downcast to UpdateServiceSettingInput")?;
         457  +
         458  +
        let params = crate::config::endpoint::Params::builder()
         459  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         460  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         461  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         462  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         463  +
            .build()
         464  +
            .map_err(|err| {
         465  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         466  +
            })?;
         467  +
        cfg.interceptor_state()
         468  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         469  +
        ::std::result::Result::Ok(())
         470  +
    }
         471  +
}
         472  +
         473  +
// The get_* functions below are generated from JMESPath expressions in the
         474  +
// operationContextParams trait. They target the operation's input shape.
         475  +
         476  +
/// Error type for the `UpdateServiceSettingError` operation.
         477  +
#[non_exhaustive]
         478  +
#[derive(::std::fmt::Debug)]
         479  +
pub enum UpdateServiceSettingError {
         480  +
    /// <p>An error occurred on the server side.</p>
         481  +
    InternalServerError(crate::types::error::InternalServerError),
         482  +
    /// <p>The specified service setting wasn't found. Either the service name or the setting hasn't been provisioned by the Amazon Web Services service team.</p>
         483  +
    ServiceSettingNotFound(crate::types::error::ServiceSettingNotFound),
         484  +
    /// <p>There are concurrent updates for a resource that supports one update at a time.</p>
         485  +
    TooManyUpdates(crate::types::error::TooManyUpdates),
         486  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         487  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         488  +
    variable wildcard pattern and check `.code()`:
         489  +
     \
         490  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         491  +
     \
         492  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateServiceSettingError) for what information is available for the error.")]
         493  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         494  +
}
         495  +
impl UpdateServiceSettingError {
         496  +
    /// Creates the `UpdateServiceSettingError::Unhandled` variant from any error type.
         497  +
    pub fn unhandled(
         498  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         499  +
    ) -> Self {
         500  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         501  +
            source: err.into(),
         502  +
            meta: ::std::default::Default::default(),
         503  +
        })
         504  +
    }
         505  +
         506  +
    /// Creates the `UpdateServiceSettingError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         507  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         508  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         509  +
            source: err.clone().into(),
         510  +
            meta: err,
         511  +
        })
         512  +
    }
         513  +
    ///
         514  +
    /// Returns error metadata, which includes the error code, message,
         515  +
    /// request ID, and potentially additional information.
         516  +
    ///
         517  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         518  +
        match self {
         519  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         520  +
            Self::ServiceSettingNotFound(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         521  +
            Self::TooManyUpdates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         522  +
            Self::Unhandled(e) => &e.meta,
         523  +
        }
         524  +
    }
         525  +
    /// Returns `true` if the error kind is `UpdateServiceSettingError::InternalServerError`.
         526  +
    pub fn is_internal_server_error(&self) -> bool {
         527  +
        matches!(self, Self::InternalServerError(_))
         528  +
    }
         529  +
    /// Returns `true` if the error kind is `UpdateServiceSettingError::ServiceSettingNotFound`.
         530  +
    pub fn is_service_setting_not_found(&self) -> bool {
         531  +
        matches!(self, Self::ServiceSettingNotFound(_))
         532  +
    }
         533  +
    /// Returns `true` if the error kind is `UpdateServiceSettingError::TooManyUpdates`.
         534  +
    pub fn is_too_many_updates(&self) -> bool {
         535  +
        matches!(self, Self::TooManyUpdates(_))
         536  +
    }
         537  +
}
         538  +
impl ::std::error::Error for UpdateServiceSettingError {
         539  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         540  +
        match self {
         541  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         542  +
            Self::ServiceSettingNotFound(_inner) => ::std::option::Option::Some(_inner),
         543  +
            Self::TooManyUpdates(_inner) => ::std::option::Option::Some(_inner),
         544  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         545  +
        }
         546  +
    }
         547  +
}
         548  +
impl ::std::fmt::Display for UpdateServiceSettingError {
         549  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         550  +
        match self {
         551  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         552  +
            Self::ServiceSettingNotFound(_inner) => _inner.fmt(f),
         553  +
            Self::TooManyUpdates(_inner) => _inner.fmt(f),
         554  +
            Self::Unhandled(_inner) => {
         555  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         556  +
                    write!(f, "unhandled error ({code})")
         557  +
                } else {
         558  +
                    f.write_str("unhandled error")
         559  +
                }
         560  +
            }
         561  +
        }
         562  +
    }
         563  +
}
         564  +
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateServiceSettingError {
         565  +
    fn code(&self) -> ::std::option::Option<&str> {
         566  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         567  +
    }
         568  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         569  +
        ::std::option::Option::None
         570  +
    }
         571  +
}
         572  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateServiceSettingError {
         573  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         574  +
        match self {
         575  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         576  +
            Self::ServiceSettingNotFound(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         577  +
            Self::TooManyUpdates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         578  +
            Self::Unhandled(_inner) => &_inner.meta,
         579  +
        }
         580  +
    }
         581  +
}
         582  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateServiceSettingError {
         583  +
    fn create_unhandled_error(
         584  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         585  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         586  +
    ) -> Self {
         587  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         588  +
            source,
         589  +
            meta: meta.unwrap_or_default(),
         590  +
        })
         591  +
    }
         592  +
}
         593  +
impl ::aws_types::request_id::RequestId for crate::operation::update_service_setting::UpdateServiceSettingError {
         594  +
    fn request_id(&self) -> Option<&str> {
         595  +
        self.meta().request_id()
         596  +
    }
         597  +
}
         598  +
         599  +
pub use crate::operation::update_service_setting::_update_service_setting_input::UpdateServiceSettingInput;
         600  +
         601  +
pub use crate::operation::update_service_setting::_update_service_setting_output::UpdateServiceSettingOutput;
         602  +
         603  +
mod _update_service_setting_input;
         604  +
         605  +
mod _update_service_setting_output;
         606  +
         607  +
/// Builders
         608  +
pub mod builders;