AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,131 @@
           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 GetAccessTokenInput {
           6  +
    /// <p>The ID of a just-in-time node access request.</p>
           7  +
    pub access_request_id: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl GetAccessTokenInput {
          10  +
    /// <p>The ID of a just-in-time node access request.</p>
          11  +
    pub fn access_request_id(&self) -> ::std::option::Option<&str> {
          12  +
        self.access_request_id.as_deref()
          13  +
    }
          14  +
}
          15  +
static GETACCESSTOKENINPUT_MEMBER_ACCESS_REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#GetAccessTokenInput$AccessRequestId",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "GetAccessTokenInput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::String,
          22  +
    "AccessRequestId",
          23  +
    0,
          24  +
);
          25  +
static GETACCESSTOKENINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "com.amazonaws.ssm.synthetic#GetAccessTokenInput",
          28  +
        "com.amazonaws.ssm.synthetic",
          29  +
        "GetAccessTokenInput",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::Structure,
          32  +
    &[&GETACCESSTOKENINPUT_MEMBER_ACCESS_REQUEST_ID],
          33  +
)
          34  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          35  +
.with_original_name("GetAccessTokenRequest");
          36  +
impl GetAccessTokenInput {
          37  +
    /// The schema for this shape.
          38  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETACCESSTOKENINPUT_SCHEMA;
          39  +
}
          40  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetAccessTokenInput {
          41  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          42  +
    fn serialize_members(
          43  +
        &self,
          44  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          45  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          46  +
        if let Some(ref val) = self.access_request_id {
          47  +
            ser.write_string(&GETACCESSTOKENINPUT_MEMBER_ACCESS_REQUEST_ID, val)?;
          48  +
        }
          49  +
        Ok(())
          50  +
    }
          51  +
}
          52  +
impl GetAccessTokenInput {
          53  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          56  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          57  +
        #[allow(unused_variables, unused_mut)]
          58  +
        let mut builder = Self::builder();
          59  +
        #[allow(
          60  +
            unused_variables,
          61  +
            unreachable_code,
          62  +
            clippy::single_match,
          63  +
            clippy::match_single_binding,
          64  +
            clippy::diverging_sub_expression
          65  +
        )]
          66  +
        deserializer.read_struct(&GETACCESSTOKENINPUT_SCHEMA, &mut |member, deser| {
          67  +
            match member.member_index() {
          68  +
                Some(0) => {
          69  +
                    if deser.is_null() {
          70  +
                        deser.read_null()?;
          71  +
                    } else {
          72  +
                        builder.access_request_id = Some(deser.read_string(member)?);
          73  +
                    }
          74  +
                }
          75  +
                _ => {}
          76  +
            }
          77  +
            Ok(())
          78  +
        })?;
          79  +
        builder.access_request_id = builder.access_request_id.or(Some(String::new()));
          80  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          81  +
    }
          82  +
}
          83  +
impl GetAccessTokenInput {
          84  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          85  +
    pub fn deserialize_with_response(
          86  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          87  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          88  +
        _status: u16,
          89  +
        _body: &[u8],
          90  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          91  +
        Self::deserialize(deserializer)
          92  +
    }
          93  +
}
          94  +
impl GetAccessTokenInput {
          95  +
    /// Creates a new builder-style object to manufacture [`GetAccessTokenInput`](crate::operation::get_access_token::GetAccessTokenInput).
          96  +
    pub fn builder() -> crate::operation::get_access_token::builders::GetAccessTokenInputBuilder {
          97  +
        crate::operation::get_access_token::builders::GetAccessTokenInputBuilder::default()
          98  +
    }
          99  +
}
         100  +
         101  +
/// A builder for [`GetAccessTokenInput`](crate::operation::get_access_token::GetAccessTokenInput).
         102  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         103  +
#[non_exhaustive]
         104  +
pub struct GetAccessTokenInputBuilder {
         105  +
    pub(crate) access_request_id: ::std::option::Option<::std::string::String>,
         106  +
}
         107  +
impl GetAccessTokenInputBuilder {
         108  +
    /// <p>The ID of a just-in-time node access request.</p>
         109  +
    /// This field is required.
         110  +
    pub fn access_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        self.access_request_id = ::std::option::Option::Some(input.into());
         112  +
        self
         113  +
    }
         114  +
    /// <p>The ID of a just-in-time node access request.</p>
         115  +
    pub fn set_access_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         116  +
        self.access_request_id = input;
         117  +
        self
         118  +
    }
         119  +
    /// <p>The ID of a just-in-time node access request.</p>
         120  +
    pub fn get_access_request_id(&self) -> &::std::option::Option<::std::string::String> {
         121  +
        &self.access_request_id
         122  +
    }
         123  +
    /// Consumes the builder and constructs a [`GetAccessTokenInput`](crate::operation::get_access_token::GetAccessTokenInput).
         124  +
    pub fn build(
         125  +
        self,
         126  +
    ) -> ::std::result::Result<crate::operation::get_access_token::GetAccessTokenInput, ::aws_smithy_types::error::operation::BuildError> {
         127  +
        ::std::result::Result::Ok(crate::operation::get_access_token::GetAccessTokenInput {
         128  +
            access_request_id: self.access_request_id,
         129  +
        })
         130  +
    }
         131  +
}

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

@@ -0,1 +0,232 @@
           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 GetAccessTokenOutput {
           6  +
    /// <p>The temporary security credentials which can be used to start just-in-time node access sessions.</p>
           7  +
    pub credentials: ::std::option::Option<crate::types::Credentials>,
           8  +
    /// <p>The status of the access request.</p>
           9  +
    pub access_request_status: ::std::option::Option<crate::types::AccessRequestStatus>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl GetAccessTokenOutput {
          13  +
    /// <p>The temporary security credentials which can be used to start just-in-time node access sessions.</p>
          14  +
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::Credentials> {
          15  +
        self.credentials.as_ref()
          16  +
    }
          17  +
    /// <p>The status of the access request.</p>
          18  +
    pub fn access_request_status(&self) -> ::std::option::Option<&crate::types::AccessRequestStatus> {
          19  +
        self.access_request_status.as_ref()
          20  +
    }
          21  +
}
          22  +
static GETACCESSTOKENOUTPUT_MEMBER_CREDENTIALS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm.synthetic#GetAccessTokenOutput$Credentials",
          25  +
        "com.amazonaws.ssm.synthetic",
          26  +
        "GetAccessTokenOutput",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::Structure,
          29  +
    "Credentials",
          30  +
    0,
          31  +
);
          32  +
static GETACCESSTOKENOUTPUT_MEMBER_ACCESS_REQUEST_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm.synthetic#GetAccessTokenOutput$AccessRequestStatus",
          35  +
        "com.amazonaws.ssm.synthetic",
          36  +
        "GetAccessTokenOutput",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "AccessRequestStatus",
          40  +
    1,
          41  +
);
          42  +
static GETACCESSTOKENOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          44  +
    ::aws_smithy_schema::ShapeType::String,
          45  +
    "request_id",
          46  +
    2,
          47  +
)
          48  +
.with_http_header("x-amzn-requestid");
          49  +
static GETACCESSTOKENOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#GetAccessTokenOutput",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "GetAccessTokenOutput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::Structure,
          56  +
    &[
          57  +
        &GETACCESSTOKENOUTPUT_MEMBER_CREDENTIALS,
          58  +
        &GETACCESSTOKENOUTPUT_MEMBER_ACCESS_REQUEST_STATUS,
          59  +
        &GETACCESSTOKENOUTPUT_MEMBER__REQUEST_ID,
          60  +
    ],
          61  +
)
          62  +
.with_original_name("GetAccessTokenResponse");
          63  +
impl GetAccessTokenOutput {
          64  +
    /// The schema for this shape.
          65  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETACCESSTOKENOUTPUT_SCHEMA;
          66  +
}
          67  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetAccessTokenOutput {
          68  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          69  +
    fn serialize_members(
          70  +
        &self,
          71  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          72  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          73  +
        if let Some(ref val) = self.credentials {
          74  +
            ser.write_struct(&GETACCESSTOKENOUTPUT_MEMBER_CREDENTIALS, val)?;
          75  +
        }
          76  +
        if let Some(ref val) = self.access_request_status {
          77  +
            ser.write_string(&GETACCESSTOKENOUTPUT_MEMBER_ACCESS_REQUEST_STATUS, val.as_str())?;
          78  +
        }
          79  +
        Ok(())
          80  +
    }
          81  +
}
          82  +
impl GetAccessTokenOutput {
          83  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        #[allow(unused_variables, unused_mut)]
          88  +
        let mut builder = Self::builder();
          89  +
        #[allow(
          90  +
            unused_variables,
          91  +
            unreachable_code,
          92  +
            clippy::single_match,
          93  +
            clippy::match_single_binding,
          94  +
            clippy::diverging_sub_expression
          95  +
        )]
          96  +
        deserializer.read_struct(&GETACCESSTOKENOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    if deser.is_null() {
         100  +
                        deser.read_null()?;
         101  +
                    } else {
         102  +
                        builder.credentials = Some(crate::types::Credentials::deserialize(deser)?);
         103  +
                    }
         104  +
                }
         105  +
                Some(1) => {
         106  +
                    if deser.is_null() {
         107  +
                        deser.read_null()?;
         108  +
                    } else {
         109  +
                        builder.access_request_status = Some(crate::types::AccessRequestStatus::from(deser.read_string(member)?.as_str()));
         110  +
                    }
         111  +
                }
         112  +
                Some(2) => {
         113  +
                    builder._request_id = Some(deser.read_string(member)?);
         114  +
                }
         115  +
                _ => {}
         116  +
            }
         117  +
            Ok(())
         118  +
        })?;
         119  +
        Ok(builder.build())
         120  +
    }
         121  +
}
         122  +
impl GetAccessTokenOutput {
         123  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         124  +
    /// Header-bound members are read directly from headers, avoiding runtime
         125  +
    /// member iteration overhead. Body members are read via the deserializer.
         126  +
    pub fn deserialize_with_response(
         127  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         128  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         129  +
        _status: u16,
         130  +
        _body: &[u8],
         131  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         132  +
        #[allow(unused_variables, unused_mut)]
         133  +
        let mut builder = Self::builder();
         134  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         135  +
            builder._request_id = Some(val.to_string());
         136  +
        }
         137  +
         138  +
        #[allow(
         139  +
            unused_variables,
         140  +
            unreachable_code,
         141  +
            clippy::single_match,
         142  +
            clippy::match_single_binding,
         143  +
            clippy::diverging_sub_expression
         144  +
        )]
         145  +
        deserializer.read_struct(&GETACCESSTOKENOUTPUT_SCHEMA, &mut |member, deser| {
         146  +
            match member.member_index() {
         147  +
                Some(0) => {
         148  +
                    builder.credentials = Some(crate::types::Credentials::deserialize(deser)?);
         149  +
                }
         150  +
                Some(1) => {
         151  +
                    builder.access_request_status = Some(crate::types::AccessRequestStatus::from(deser.read_string(member)?.as_str()));
         152  +
                }
         153  +
                _ => {}
         154  +
            }
         155  +
            Ok(())
         156  +
        })?;
         157  +
        Ok(builder.build())
         158  +
    }
         159  +
}
         160  +
impl ::aws_types::request_id::RequestId for GetAccessTokenOutput {
         161  +
    fn request_id(&self) -> Option<&str> {
         162  +
        self._request_id.as_deref()
         163  +
    }
         164  +
}
         165  +
impl GetAccessTokenOutput {
         166  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         167  +
        self._request_id = request_id;
         168  +
        self
         169  +
    }
         170  +
}
         171  +
impl GetAccessTokenOutput {
         172  +
    /// Creates a new builder-style object to manufacture [`GetAccessTokenOutput`](crate::operation::get_access_token::GetAccessTokenOutput).
         173  +
    pub fn builder() -> crate::operation::get_access_token::builders::GetAccessTokenOutputBuilder {
         174  +
        crate::operation::get_access_token::builders::GetAccessTokenOutputBuilder::default()
         175  +
    }
         176  +
}
         177  +
         178  +
/// A builder for [`GetAccessTokenOutput`](crate::operation::get_access_token::GetAccessTokenOutput).
         179  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         180  +
#[non_exhaustive]
         181  +
pub struct GetAccessTokenOutputBuilder {
         182  +
    pub(crate) credentials: ::std::option::Option<crate::types::Credentials>,
         183  +
    pub(crate) access_request_status: ::std::option::Option<crate::types::AccessRequestStatus>,
         184  +
    _request_id: Option<String>,
         185  +
}
         186  +
impl GetAccessTokenOutputBuilder {
         187  +
    /// <p>The temporary security credentials which can be used to start just-in-time node access sessions.</p>
         188  +
    pub fn credentials(mut self, input: crate::types::Credentials) -> Self {
         189  +
        self.credentials = ::std::option::Option::Some(input);
         190  +
        self
         191  +
    }
         192  +
    /// <p>The temporary security credentials which can be used to start just-in-time node access sessions.</p>
         193  +
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::Credentials>) -> Self {
         194  +
        self.credentials = input;
         195  +
        self
         196  +
    }
         197  +
    /// <p>The temporary security credentials which can be used to start just-in-time node access sessions.</p>
         198  +
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::Credentials> {
         199  +
        &self.credentials
         200  +
    }
         201  +
    /// <p>The status of the access request.</p>
         202  +
    pub fn access_request_status(mut self, input: crate::types::AccessRequestStatus) -> Self {
         203  +
        self.access_request_status = ::std::option::Option::Some(input);
         204  +
        self
         205  +
    }
         206  +
    /// <p>The status of the access request.</p>
         207  +
    pub fn set_access_request_status(mut self, input: ::std::option::Option<crate::types::AccessRequestStatus>) -> Self {
         208  +
        self.access_request_status = input;
         209  +
        self
         210  +
    }
         211  +
    /// <p>The status of the access request.</p>
         212  +
    pub fn get_access_request_status(&self) -> &::std::option::Option<crate::types::AccessRequestStatus> {
         213  +
        &self.access_request_status
         214  +
    }
         215  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         216  +
        self._request_id = Some(request_id.into());
         217  +
        self
         218  +
    }
         219  +
         220  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         221  +
        self._request_id = request_id;
         222  +
        self
         223  +
    }
         224  +
    /// Consumes the builder and constructs a [`GetAccessTokenOutput`](crate::operation::get_access_token::GetAccessTokenOutput).
         225  +
    pub fn build(self) -> crate::operation::get_access_token::GetAccessTokenOutput {
         226  +
        crate::operation::get_access_token::GetAccessTokenOutput {
         227  +
            credentials: self.credentials,
         228  +
            access_request_status: self.access_request_status,
         229  +
            _request_id: self._request_id,
         230  +
        }
         231  +
    }
         232  +
}

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

@@ -0,1 +0,125 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::get_access_token::_get_access_token_input::GetAccessTokenInputBuilder;
           3  +
           4  +
pub use crate::operation::get_access_token::_get_access_token_output::GetAccessTokenOutputBuilder;
           5  +
           6  +
impl crate::operation::get_access_token::builders::GetAccessTokenInputBuilder {
           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::get_access_token::GetAccessTokenOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::get_access_token::GetAccessTokenError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.get_access_token();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `GetAccessToken`.
          24  +
///
          25  +
/// <p>Returns a credentials set to be used with just-in-time node access.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct GetAccessTokenFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::get_access_token::builders::GetAccessTokenInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::get_access_token::GetAccessTokenOutput,
          35  +
        crate::operation::get_access_token::GetAccessTokenError,
          36  +
    > for GetAccessTokenFluentBuilder
          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::get_access_token::GetAccessTokenOutput,
          44  +
            crate::operation::get_access_token::GetAccessTokenError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl GetAccessTokenFluentBuilder {
          51  +
    /// Creates a new `GetAccessTokenFluentBuilder`.
          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 GetAccessToken as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::get_access_token::builders::GetAccessTokenInputBuilder {
          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::get_access_token::GetAccessTokenOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::get_access_token::GetAccessTokenError,
          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::get_access_token::GetAccessToken::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::get_access_token::GetAccessToken::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::get_access_token::GetAccessTokenOutput,
          97  +
        crate::operation::get_access_token::GetAccessTokenError,
          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 a just-in-time node access request.</p>
         112  +
    pub fn access_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.access_request_id(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The ID of a just-in-time node access request.</p>
         117  +
    pub fn set_access_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_access_request_id(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The ID of a just-in-time node access request.</p>
         122  +
    pub fn get_access_request_id(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_access_request_id()
         124  +
    }
         125  +
}

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

@@ -0,1 +0,564 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `GetAutomationExecution`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct GetAutomationExecution;
           6  +
impl GetAutomationExecution {
           7  +
    /// Creates a new `GetAutomationExecution`
           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::get_automation_execution::GetAutomationExecutionInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::get_automation_execution::GetAutomationExecutionOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::get_automation_execution::GetAutomationExecutionInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::get_automation_execution::GetAutomationExecutionOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::get_automation_execution::GetAutomationExecutionError,
          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::get_automation_execution::GetAutomationExecutionError>()
          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::get_automation_execution::GetAutomationExecutionOutput>()
          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::get_automation_execution::GetAutomationExecutionInput,
          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", "GetAutomationExecution", 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.GetAutomationExecution",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "GetAutomationExecution",
          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::AutomationExecutionNotFoundException::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::AutomationExecutionNotFoundException::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::AutomationExecutionNotFoundException::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::InternalServerError::SCHEMA,
         115  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         116  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         117  +
                        },
         118  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         119  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
                            .build()
         123  +
    });
         124  +
}
         125  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetAutomationExecution {
         126  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         127  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetAutomationExecution");
         128  +
         129  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         130  +
            GetAutomationExecutionRequestSerializer,
         131  +
        ));
         132  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         133  +
            GetAutomationExecutionResponseDeserializer,
         134  +
        ));
         135  +
         136  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         137  +
            crate::config::auth::Params::builder()
         138  +
                .operation_name("GetAutomationExecution")
         139  +
                .build()
         140  +
                .expect("required fields set"),
         141  +
        ));
         142  +
         143  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         144  +
            "GetAutomationExecution",
         145  +
            "SSM",
         146  +
        ));
         147  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         148  +
        signing_options.double_uri_encode = true;
         149  +
        signing_options.content_sha256_header = false;
         150  +
        signing_options.normalize_uri_path = true;
         151  +
        signing_options.payload_override = None;
         152  +
         153  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         154  +
            signing_options,
         155  +
            ..::std::default::Default::default()
         156  +
        });
         157  +
         158  +
        ::std::option::Option::Some(cfg.freeze())
         159  +
    }
         160  +
         161  +
    fn runtime_components(
         162  +
        &self,
         163  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         164  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         165  +
        #[allow(unused_mut)]
         166  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetAutomationExecution")
         167  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         168  +
                GetAutomationExecutionTelemetryInputCaptureInterceptor,
         169  +
            ))
         170  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         171  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         172  +
            ))
         173  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         174  +
                GetAutomationExecutionEndpointParamsInterceptor,
         175  +
            ))
         176  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         177  +
                crate::operation::get_automation_execution::GetAutomationExecutionError,
         178  +
            >::new())
         179  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         180  +
                crate::operation::get_automation_execution::GetAutomationExecutionError,
         181  +
            >::new())
         182  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         183  +
                crate::operation::get_automation_execution::GetAutomationExecutionError,
         184  +
            >::new())
         185  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         186  +
                crate::operation::get_automation_execution::GetAutomationExecutionError,
         187  +
            >::new());
         188  +
         189  +
        ::std::borrow::Cow::Owned(rcb)
         190  +
    }
         191  +
}
         192  +
         193  +
#[derive(Debug)]
         194  +
struct GetAutomationExecutionTelemetryInputCaptureInterceptor;
         195  +
         196  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         197  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetAutomationExecutionTelemetryInputCaptureInterceptor {
         198  +
    fn name(&self) -> &'static str {
         199  +
        "GetAutomationExecutionTelemetryInputCaptureInterceptor"
         200  +
    }
         201  +
         202  +
    fn read_before_execution(
         203  +
        &self,
         204  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         205  +
            '_,
         206  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         207  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         208  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         209  +
        >,
         210  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         211  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         212  +
        // Nothing to do unless the customer opted in by naming members to record.
         213  +
        let ::std::option::Option::Some(requested) = cfg
         214  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         215  +
            .filter(|r| !r.is_empty())
         216  +
        else {
         217  +
            return ::std::result::Result::Ok(());
         218  +
        };
         219  +
         220  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetAutomationExecutionInput>() else {
         221  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         222  +
            return ::std::result::Result::Ok(());
         223  +
        };
         224  +
         225  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         226  +
        if requested.should_capture("AutomationExecutionId") {
         227  +
            if let ::std::option::Option::Some(value) = input.automation_execution_id.as_deref() {
         228  +
                captured.insert("AutomationExecutionId", value);
         229  +
            }
         230  +
        }
         231  +
         232  +
        cfg.interceptor_state().store_put(captured);
         233  +
        ::std::result::Result::Ok(())
         234  +
    }
         235  +
}
         236  +
#[derive(Debug)]
         237  +
struct GetAutomationExecutionResponseDeserializer;
         238  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetAutomationExecutionResponseDeserializer {
         239  +
    fn deserialize_nonstreaming_with_config(
         240  +
        &self,
         241  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         242  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         243  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         244  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         245  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         246  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         247  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         248  +
        // loads `body` before firing this hook.
         249  +
        let body = response.body().bytes().expect("body loaded");
         250  +
        let headers = response.headers();
         251  +
        #[allow(unused_mut)]
         252  +
        let mut force_error = false;
         253  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         254  +
        if !success && status != 200 || force_error {
         255  +
            let protocol = _cfg
         256  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         257  +
                .expect("a SharedClientProtocol is required");
         258  +
            #[allow(unused_mut)]
         259  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         260  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         261  +
            })?;
         262  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         263  +
            let generic = generic_builder.build();
         264  +
            let error_code = match generic.code() {
         265  +
                ::std::option::Option::Some(code) => code,
         266  +
                ::std::option::Option::None => {
         267  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         268  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         269  +
                            crate::operation::get_automation_execution::GetAutomationExecutionError::unhandled(generic),
         270  +
                        ),
         271  +
                    ))
         272  +
                }
         273  +
            };
         274  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         275  +
            let err = match error_code {
         276  +
                "AutomationExecutionNotFoundException" => {
         277  +
                    crate::operation::get_automation_execution::GetAutomationExecutionError::AutomationExecutionNotFoundException({
         278  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         279  +
                            crate::types::error::AutomationExecutionNotFoundException::deserialize_with_response(
         280  +
                                &mut *deser,
         281  +
                                response.headers(),
         282  +
                                response.status().into(),
         283  +
                                body,
         284  +
                            )
         285  +
                        }) {
         286  +
                            ::std::result::Result::Ok(val) => val,
         287  +
                            ::std::result::Result::Err(e) => {
         288  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         289  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         290  +
                                ))
         291  +
                            }
         292  +
                        };
         293  +
                        tmp.meta = generic;
         294  +
                        if tmp.message.is_none() {
         295  +
                            tmp.message = _error_message;
         296  +
                        }
         297  +
                        tmp
         298  +
                    })
         299  +
                }
         300  +
                "InternalServerError" => crate::operation::get_automation_execution::GetAutomationExecutionError::InternalServerError({
         301  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         302  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         303  +
                            &mut *deser,
         304  +
                            response.headers(),
         305  +
                            response.status().into(),
         306  +
                            body,
         307  +
                        )
         308  +
                    }) {
         309  +
                        ::std::result::Result::Ok(val) => val,
         310  +
                        ::std::result::Result::Err(e) => {
         311  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         312  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         313  +
                            ))
         314  +
                        }
         315  +
                    };
         316  +
                    tmp.meta = generic;
         317  +
                    if tmp.message.is_none() {
         318  +
                        tmp.message = _error_message;
         319  +
                    }
         320  +
                    tmp
         321  +
                }),
         322  +
                _ => {
         323  +
                    // Registry-backed, operation-scoped reification of an error whose
         324  +
                    // code this operation does not model directly: the operation's own
         325  +
                    // error registry is consulted first, then the lookup widens to the
         326  +
                    // service-wide error registry. On a hit, the reified error is attached
         327  +
                    // as the source of the returned unhandled error while its metadata
         328  +
                    // (code, message, request id) is preserved; on a miss the generic
         329  +
                    // error is returned unchanged.
         330  +
                    match protocol
         331  +
                        .deserialize_error_response(response, _cfg)
         332  +
                        .ok()
         333  +
                        .and_then(|mut deser| {
         334  +
                            ::aws_smithy_schema::registry::reify_error(
         335  +
                                crate::operation::get_automation_execution::error_registry::REGISTRY
         336  +
                                    .or(&crate::error_type_registry::REGISTRY),
         337  +
                                error_code,
         338  +
                                &mut *deser,
         339  +
                            )
         340  +
                        }) {
         341  +
                        ::std::option::Option::Some(source) => <crate::operation::get_automation_execution::GetAutomationExecutionError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         342  +
                        ::std::option::Option::None => crate::operation::get_automation_execution::GetAutomationExecutionError::generic(generic),
         343  +
                    }
         344  +
                }
         345  +
            };
         346  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         347  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         348  +
            ))
         349  +
        } else {
         350  +
            let protocol = _cfg
         351  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         352  +
                .expect("a SharedClientProtocol is required");
         353  +
            let mut deser = protocol
         354  +
                .deserialize_response(response, GetAutomationExecution::OUTPUT_SCHEMA, _cfg)
         355  +
                .map_err(|e| {
         356  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         357  +
                })?;
         358  +
            // body and headers are already in scope from the top of the function;
         359  +
            // alias `headers` as `_response_headers` so MutateOutput
         360  +
            // customizations have a stable name to read from.
         361  +
            let _response_headers = headers;
         362  +
            #[allow(unused_mut)]
         363  +
            let mut output = crate::operation::get_automation_execution::GetAutomationExecutionOutput::deserialize_with_response(
         364  +
                &mut *deser,
         365  +
                _response_headers,
         366  +
                response.status().into(),
         367  +
                body,
         368  +
            )
         369  +
            .map_err(|e| {
         370  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         371  +
            })?;
         372  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         373  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         374  +
        }
         375  +
    }
         376  +
}
         377  +
#[derive(Debug)]
         378  +
struct GetAutomationExecutionRequestSerializer;
         379  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetAutomationExecutionRequestSerializer {
         380  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         381  +
    fn serialize_input(
         382  +
        &self,
         383  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         384  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         385  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         386  +
        let input = input
         387  +
            .downcast::<crate::operation::get_automation_execution::GetAutomationExecutionInput>()
         388  +
            .expect("correct type");
         389  +
         390  +
        let protocol = _cfg
         391  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         392  +
            .expect("a SharedClientProtocol is required");
         393  +
        let mut request = protocol
         394  +
            .serialize_request(&input, GetAutomationExecution::INPUT_SCHEMA, "/", _cfg)
         395  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         396  +
         397  +
        return ::std::result::Result::Ok(request);
         398  +
    }
         399  +
}
         400  +
#[derive(Debug)]
         401  +
struct GetAutomationExecutionEndpointParamsInterceptor;
         402  +
         403  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         404  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetAutomationExecutionEndpointParamsInterceptor {
         405  +
    fn name(&self) -> &'static str {
         406  +
        "GetAutomationExecutionEndpointParamsInterceptor"
         407  +
    }
         408  +
         409  +
    fn read_before_execution(
         410  +
        &self,
         411  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         412  +
            '_,
         413  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         414  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         415  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         416  +
        >,
         417  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         418  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         419  +
        let _input = context
         420  +
            .input()
         421  +
            .downcast_ref::<GetAutomationExecutionInput>()
         422  +
            .ok_or("failed to downcast to GetAutomationExecutionInput")?;
         423  +
         424  +
        let params = crate::config::endpoint::Params::builder()
         425  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         426  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         427  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         428  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         429  +
            .build()
         430  +
            .map_err(|err| {
         431  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         432  +
            })?;
         433  +
        cfg.interceptor_state()
         434  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         435  +
        ::std::result::Result::Ok(())
         436  +
    }
         437  +
}
         438  +
         439  +
// The get_* functions below are generated from JMESPath expressions in the
         440  +
// operationContextParams trait. They target the operation's input shape.
         441  +
         442  +
/// Error type for the `GetAutomationExecutionError` operation.
         443  +
#[non_exhaustive]
         444  +
#[derive(::std::fmt::Debug)]
         445  +
pub enum GetAutomationExecutionError {
         446  +
    /// <p>There is no automation execution information for the requested automation execution ID.</p>
         447  +
    AutomationExecutionNotFoundException(crate::types::error::AutomationExecutionNotFoundException),
         448  +
    /// <p>An error occurred on the server side.</p>
         449  +
    InternalServerError(crate::types::error::InternalServerError),
         450  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         451  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         452  +
    variable wildcard pattern and check `.code()`:
         453  +
     \
         454  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         455  +
     \
         456  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetAutomationExecutionError) for what information is available for the error.")]
         457  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         458  +
}
         459  +
impl GetAutomationExecutionError {
         460  +
    /// Creates the `GetAutomationExecutionError::Unhandled` variant from any error type.
         461  +
    pub fn unhandled(
         462  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         463  +
    ) -> Self {
         464  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         465  +
            source: err.into(),
         466  +
            meta: ::std::default::Default::default(),
         467  +
        })
         468  +
    }
         469  +
         470  +
    /// Creates the `GetAutomationExecutionError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         471  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         472  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         473  +
            source: err.clone().into(),
         474  +
            meta: err,
         475  +
        })
         476  +
    }
         477  +
    ///
         478  +
    /// Returns error metadata, which includes the error code, message,
         479  +
    /// request ID, and potentially additional information.
         480  +
    ///
         481  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         482  +
        match self {
         483  +
            Self::AutomationExecutionNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         484  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         485  +
            Self::Unhandled(e) => &e.meta,
         486  +
        }
         487  +
    }
         488  +
    /// Returns `true` if the error kind is `GetAutomationExecutionError::AutomationExecutionNotFoundException`.
         489  +
    pub fn is_automation_execution_not_found_exception(&self) -> bool {
         490  +
        matches!(self, Self::AutomationExecutionNotFoundException(_))
         491  +
    }
         492  +
    /// Returns `true` if the error kind is `GetAutomationExecutionError::InternalServerError`.
         493  +
    pub fn is_internal_server_error(&self) -> bool {
         494  +
        matches!(self, Self::InternalServerError(_))
         495  +
    }
         496  +
}
         497  +
impl ::std::error::Error for GetAutomationExecutionError {
         498  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         499  +
        match self {
         500  +
            Self::AutomationExecutionNotFoundException(_inner) => ::std::option::Option::Some(_inner),
         501  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         502  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         503  +
        }
         504  +
    }
         505  +
}
         506  +
impl ::std::fmt::Display for GetAutomationExecutionError {
         507  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         508  +
        match self {
         509  +
            Self::AutomationExecutionNotFoundException(_inner) => _inner.fmt(f),
         510  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         511  +
            Self::Unhandled(_inner) => {
         512  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         513  +
                    write!(f, "unhandled error ({code})")
         514  +
                } else {
         515  +
                    f.write_str("unhandled error")
         516  +
                }
         517  +
            }
         518  +
        }
         519  +
    }
         520  +
}
         521  +
impl ::aws_smithy_types::retry::ProvideErrorKind for GetAutomationExecutionError {
         522  +
    fn code(&self) -> ::std::option::Option<&str> {
         523  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         524  +
    }
         525  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         526  +
        ::std::option::Option::None
         527  +
    }
         528  +
}
         529  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetAutomationExecutionError {
         530  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         531  +
        match self {
         532  +
            Self::AutomationExecutionNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         533  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         534  +
            Self::Unhandled(_inner) => &_inner.meta,
         535  +
        }
         536  +
    }
         537  +
}
         538  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetAutomationExecutionError {
         539  +
    fn create_unhandled_error(
         540  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         541  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         542  +
    ) -> Self {
         543  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         544  +
            source,
         545  +
            meta: meta.unwrap_or_default(),
         546  +
        })
         547  +
    }
         548  +
}
         549  +
impl ::aws_types::request_id::RequestId for crate::operation::get_automation_execution::GetAutomationExecutionError {
         550  +
    fn request_id(&self) -> Option<&str> {
         551  +
        self.meta().request_id()
         552  +
    }
         553  +
}
         554  +
         555  +
pub use crate::operation::get_automation_execution::_get_automation_execution_input::GetAutomationExecutionInput;
         556  +
         557  +
pub use crate::operation::get_automation_execution::_get_automation_execution_output::GetAutomationExecutionOutput;
         558  +
         559  +
mod _get_automation_execution_input;
         560  +
         561  +
mod _get_automation_execution_output;
         562  +
         563  +
/// Builders
         564  +
pub mod builders;