AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

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

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

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/disassociate_ops_item_related_item/_disassociate_ops_item_related_item_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 DisassociateOpsItemRelatedItemOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static DISASSOCIATEOPSITEMRELATEDITEMOUTPUT_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 DISASSOCIATEOPSITEMRELATEDITEMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#DisassociateOpsItemRelatedItemOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "DisassociateOpsItemRelatedItemOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&DISASSOCIATEOPSITEMRELATEDITEMOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("DisassociateOpsItemRelatedItemResponse");
          25  +
impl DisassociateOpsItemRelatedItemOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DISASSOCIATEOPSITEMRELATEDITEMOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for DisassociateOpsItemRelatedItemOutput {
          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 DisassociateOpsItemRelatedItemOutput {
          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(&DISASSOCIATEOPSITEMRELATEDITEMOUTPUT_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 DisassociateOpsItemRelatedItemOutput {
          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 DisassociateOpsItemRelatedItemOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl DisassociateOpsItemRelatedItemOutput {
          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 DisassociateOpsItemRelatedItemOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`DisassociateOpsItemRelatedItemOutput`](crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput).
          95  +
    pub fn builder() -> crate::operation::disassociate_ops_item_related_item::builders::DisassociateOpsItemRelatedItemOutputBuilder {
          96  +
        crate::operation::disassociate_ops_item_related_item::builders::DisassociateOpsItemRelatedItemOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`DisassociateOpsItemRelatedItemOutput`](crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct DisassociateOpsItemRelatedItemOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl DisassociateOpsItemRelatedItemOutputBuilder {
         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 [`DisassociateOpsItemRelatedItemOutput`](crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput).
         117  +
    pub fn build(self) -> crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput {
         118  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,139 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::disassociate_ops_item_related_item::_disassociate_ops_item_related_item_input::DisassociateOpsItemRelatedItemInputBuilder;
           3  +
           4  +
pub use crate::operation::disassociate_ops_item_related_item::_disassociate_ops_item_related_item_output::DisassociateOpsItemRelatedItemOutputBuilder;
           5  +
           6  +
impl crate::operation::disassociate_ops_item_related_item::builders::DisassociateOpsItemRelatedItemInputBuilder {
           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::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.disassociate_ops_item_related_item();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DisassociateOpsItemRelatedItem`.
          24  +
///
          25  +
/// <p>Deletes the association between an OpsItem and a related item. For example, this API operation can delete an Incident Manager incident from an OpsItem. Incident Manager is a tool in Amazon Web Services Systems Manager.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DisassociateOpsItemRelatedItemFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::disassociate_ops_item_related_item::builders::DisassociateOpsItemRelatedItemInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput,
          35  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemError,
          36  +
    > for DisassociateOpsItemRelatedItemFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput,
          44  +
            crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DisassociateOpsItemRelatedItemFluentBuilder {
          51  +
    /// Creates a new `DisassociateOpsItemRelatedItemFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the DisassociateOpsItemRelatedItem as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::disassociate_ops_item_related_item::builders::DisassociateOpsItemRelatedItemInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItem::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItem::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemOutput,
          97  +
        crate::operation::disassociate_ops_item_related_item::DisassociateOpsItemRelatedItemError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// <p>The ID of the OpsItem for which you want to delete an association between the OpsItem and a related item.</p>
         112  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.ops_item_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The ID of the OpsItem for which you want to delete an association between the OpsItem and a related item.</p>
         117  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_ops_item_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The ID of the OpsItem for which you want to delete an association between the OpsItem and a related item.</p>
         122  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_ops_item_id()
         124  +
    }
         125  +
    /// <p>The ID of the association for which you want to delete an association between the OpsItem and a related item.</p>
         126  +
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         127  +
        self.inner = self.inner.association_id(input.into());
         128  +
        self
         129  +
    }
         130  +
    /// <p>The ID of the association for which you want to delete an association between the OpsItem and a related item.</p>
         131  +
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         132  +
        self.inner = self.inner.set_association_id(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>The ID of the association for which you want to delete an association between the OpsItem and a related item.</p>
         136  +
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        self.inner.get_association_id()
         138  +
    }
         139  +
}

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

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