AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,180 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::start_session::_start_session_input::StartSessionInputBuilder;
           3  +
           4  +
pub use crate::operation::start_session::_start_session_output::StartSessionOutputBuilder;
           5  +
           6  +
impl crate::operation::start_session::builders::StartSessionInputBuilder {
           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::start_session::StartSessionOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::start_session::StartSessionError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.start_session();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `StartSession`.
          24  +
///
          25  +
/// <p>Initiates a connection to a target (for example, a managed node) for a Session Manager session. Returns a URL and token that can be used to open a WebSocket connection for sending input and receiving outputs.</p><note>
          26  +
/// <p>Amazon Web Services CLI usage: <code>start-session</code> is an interactive command that requires the Session Manager plugin to be installed on the client machine making the call. For information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html">Install the Session Manager plugin for the Amazon Web Services CLI</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          27  +
/// <p>Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently supported by Amazon Web Services Tools for PowerShell on Windows local machines.</p>
          28  +
/// </note>
          29  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
pub struct StartSessionFluentBuilder {
          31  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          32  +
    inner: crate::operation::start_session::builders::StartSessionInputBuilder,
          33  +
    config_override: ::std::option::Option<crate::config::Builder>,
          34  +
}
          35  +
impl
          36  +
    crate::client::customize::internal::CustomizableSend<
          37  +
        crate::operation::start_session::StartSessionOutput,
          38  +
        crate::operation::start_session::StartSessionError,
          39  +
    > for StartSessionFluentBuilder
          40  +
{
          41  +
    fn send(
          42  +
        self,
          43  +
        config_override: crate::config::Builder,
          44  +
    ) -> crate::client::customize::internal::BoxFuture<
          45  +
        crate::client::customize::internal::SendResult<
          46  +
            crate::operation::start_session::StartSessionOutput,
          47  +
            crate::operation::start_session::StartSessionError,
          48  +
        >,
          49  +
    > {
          50  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          51  +
    }
          52  +
}
          53  +
impl StartSessionFluentBuilder {
          54  +
    /// Creates a new `StartSessionFluentBuilder`.
          55  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          56  +
        Self {
          57  +
            handle,
          58  +
            inner: ::std::default::Default::default(),
          59  +
            config_override: ::std::option::Option::None,
          60  +
        }
          61  +
    }
          62  +
    /// Access the StartSession as a reference.
          63  +
    pub fn as_input(&self) -> &crate::operation::start_session::builders::StartSessionInputBuilder {
          64  +
        &self.inner
          65  +
    }
          66  +
    /// Sends the request and returns the response.
          67  +
    ///
          68  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          69  +
    /// can be matched against.
          70  +
    ///
          71  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          72  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          73  +
    /// set when configuring the client.
          74  +
    pub async fn send(
          75  +
        self,
          76  +
    ) -> ::std::result::Result<
          77  +
        crate::operation::start_session::StartSessionOutput,
          78  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          79  +
            crate::operation::start_session::StartSessionError,
          80  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          81  +
        >,
          82  +
    > {
          83  +
        let input = self
          84  +
            .inner
          85  +
            .build()
          86  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          87  +
        let runtime_plugins = crate::operation::start_session::StartSession::operation_runtime_plugins(
          88  +
            self.handle.runtime_plugins.clone(),
          89  +
            &self.handle.conf,
          90  +
            self.config_override,
          91  +
        );
          92  +
        crate::operation::start_session::StartSession::orchestrate(&runtime_plugins, input).await
          93  +
    }
          94  +
          95  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          96  +
    pub fn customize(
          97  +
        self,
          98  +
    ) -> crate::client::customize::CustomizableOperation<
          99  +
        crate::operation::start_session::StartSessionOutput,
         100  +
        crate::operation::start_session::StartSessionError,
         101  +
        Self,
         102  +
    > {
         103  +
        crate::client::customize::CustomizableOperation::new(self)
         104  +
    }
         105  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         106  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         107  +
        self
         108  +
    }
         109  +
         110  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         111  +
        self.config_override = config_override;
         112  +
        self
         113  +
    }
         114  +
    /// <p>The managed node to connect to for the session.</p>
         115  +
    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         116  +
        self.inner = self.inner.target(input.into());
         117  +
        self
         118  +
    }
         119  +
    /// <p>The managed node to connect to for the session.</p>
         120  +
    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        self.inner = self.inner.set_target(input);
         122  +
        self
         123  +
    }
         124  +
    /// <p>The managed node to connect to for the session.</p>
         125  +
    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
         126  +
        self.inner.get_target()
         127  +
    }
         128  +
    /// <p>The name of the SSM document you want to use to define the type of session, input parameters, or preferences for the session. For example, <code>SSM-SessionManagerRunShell</code>. You can call the <code>GetDocument</code> API to verify the document exists before attempting to start a session. If no document name is provided, a shell to the managed node is launched by default. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html">Start a session</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         129  +
    pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         130  +
        self.inner = self.inner.document_name(input.into());
         131  +
        self
         132  +
    }
         133  +
    /// <p>The name of the SSM document you want to use to define the type of session, input parameters, or preferences for the session. For example, <code>SSM-SessionManagerRunShell</code>. You can call the <code>GetDocument</code> API to verify the document exists before attempting to start a session. If no document name is provided, a shell to the managed node is launched by default. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html">Start a session</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         134  +
    pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         135  +
        self.inner = self.inner.set_document_name(input);
         136  +
        self
         137  +
    }
         138  +
    /// <p>The name of the SSM document you want to use to define the type of session, input parameters, or preferences for the session. For example, <code>SSM-SessionManagerRunShell</code>. You can call the <code>GetDocument</code> API to verify the document exists before attempting to start a session. If no document name is provided, a shell to the managed node is launched by default. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html">Start a session</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         139  +
    pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
         140  +
        self.inner.get_document_name()
         141  +
    }
         142  +
    /// <p>The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.</p>
         143  +
    pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         144  +
        self.inner = self.inner.reason(input.into());
         145  +
        self
         146  +
    }
         147  +
    /// <p>The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.</p>
         148  +
    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         149  +
        self.inner = self.inner.set_reason(input);
         150  +
        self
         151  +
    }
         152  +
    /// <p>The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.</p>
         153  +
    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
         154  +
        self.inner.get_reason()
         155  +
    }
         156  +
    ///
         157  +
    /// Adds a key-value pair to `Parameters`.
         158  +
    ///
         159  +
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
         160  +
    ///
         161  +
    /// <p>The values you want to specify for the parameters defined in the Session document. For more information about these parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-create-preferences-cli.html">Create a Session Manager preferences document</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         162  +
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
         163  +
        self.inner = self.inner.parameters(k.into(), v);
         164  +
        self
         165  +
    }
         166  +
    /// <p>The values you want to specify for the parameters defined in the Session document. For more information about these parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-create-preferences-cli.html">Create a Session Manager preferences document</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         167  +
    pub fn set_parameters(
         168  +
        mut self,
         169  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         170  +
    ) -> Self {
         171  +
        self.inner = self.inner.set_parameters(input);
         172  +
        self
         173  +
    }
         174  +
    /// <p>The values you want to specify for the parameters defined in the Session document. For more information about these parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/getting-started-create-preferences-cli.html">Create a Session Manager preferences document</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         175  +
    pub fn get_parameters(
         176  +
        &self,
         177  +
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         178  +
        self.inner.get_parameters()
         179  +
    }
         180  +
}

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

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

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

@@ -0,1 +0,179 @@
           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 StopAutomationExecutionInput {
           6  +
    /// <p>The execution ID of the Automation to stop.</p>
           7  +
    pub automation_execution_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.</p>
           9  +
    pub r#type: ::std::option::Option<crate::types::StopType>,
          10  +
}
          11  +
impl StopAutomationExecutionInput {
          12  +
    /// <p>The execution ID of the Automation to stop.</p>
          13  +
    pub fn automation_execution_id(&self) -> ::std::option::Option<&str> {
          14  +
        self.automation_execution_id.as_deref()
          15  +
    }
          16  +
    /// <p>The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.</p>
          17  +
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::StopType> {
          18  +
        self.r#type.as_ref()
          19  +
    }
          20  +
}
          21  +
static STOPAUTOMATIONEXECUTIONINPUT_MEMBER_AUTOMATION_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          22  +
    ::aws_smithy_schema::ShapeId::from_parts(
          23  +
        "com.amazonaws.ssm.synthetic#StopAutomationExecutionInput$AutomationExecutionId",
          24  +
        "com.amazonaws.ssm.synthetic",
          25  +
        "StopAutomationExecutionInput",
          26  +
    ),
          27  +
    ::aws_smithy_schema::ShapeType::String,
          28  +
    "AutomationExecutionId",
          29  +
    0,
          30  +
);
          31  +
static STOPAUTOMATIONEXECUTIONINPUT_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_parts(
          33  +
        "com.amazonaws.ssm.synthetic#StopAutomationExecutionInput$Type",
          34  +
        "com.amazonaws.ssm.synthetic",
          35  +
        "StopAutomationExecutionInput",
          36  +
    ),
          37  +
    ::aws_smithy_schema::ShapeType::String,
          38  +
    "Type",
          39  +
    1,
          40  +
);
          41  +
static STOPAUTOMATIONEXECUTIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts(
          43  +
        "com.amazonaws.ssm.synthetic#StopAutomationExecutionInput",
          44  +
        "com.amazonaws.ssm.synthetic",
          45  +
        "StopAutomationExecutionInput",
          46  +
    ),
          47  +
    ::aws_smithy_schema::ShapeType::Structure,
          48  +
    &[
          49  +
        &STOPAUTOMATIONEXECUTIONINPUT_MEMBER_AUTOMATION_EXECUTION_ID,
          50  +
        &STOPAUTOMATIONEXECUTIONINPUT_MEMBER_TYPE,
          51  +
    ],
          52  +
)
          53  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          54  +
.with_original_name("StopAutomationExecutionRequest");
          55  +
impl StopAutomationExecutionInput {
          56  +
    /// The schema for this shape.
          57  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &STOPAUTOMATIONEXECUTIONINPUT_SCHEMA;
          58  +
}
          59  +
impl ::aws_smithy_schema::serde::SerializableStruct for StopAutomationExecutionInput {
          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.automation_execution_id {
          66  +
            ser.write_string(&STOPAUTOMATIONEXECUTIONINPUT_MEMBER_AUTOMATION_EXECUTION_ID, val)?;
          67  +
        }
          68  +
        if let Some(ref val) = self.r#type {
          69  +
            ser.write_string(&STOPAUTOMATIONEXECUTIONINPUT_MEMBER_TYPE, val.as_str())?;
          70  +
        }
          71  +
        Ok(())
          72  +
    }
          73  +
}
          74  +
impl StopAutomationExecutionInput {
          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(&STOPAUTOMATIONEXECUTIONINPUT_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.automation_execution_id = Some(deser.read_string(member)?);
          95  +
                    }
          96  +
                }
          97  +
                Some(1) => {
          98  +
                    if deser.is_null() {
          99  +
                        deser.read_null()?;
         100  +
                    } else {
         101  +
                        builder.r#type = Some(crate::types::StopType::from(deser.read_string(member)?.as_str()));
         102  +
                    }
         103  +
                }
         104  +
                _ => {}
         105  +
            }
         106  +
            Ok(())
         107  +
        })?;
         108  +
        builder.automation_execution_id = builder.automation_execution_id.or(Some(String::new()));
         109  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         110  +
    }
         111  +
}
         112  +
impl StopAutomationExecutionInput {
         113  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         114  +
    pub fn deserialize_with_response(
         115  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         116  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         117  +
        _status: u16,
         118  +
        _body: &[u8],
         119  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         120  +
        Self::deserialize(deserializer)
         121  +
    }
         122  +
}
         123  +
impl StopAutomationExecutionInput {
         124  +
    /// Creates a new builder-style object to manufacture [`StopAutomationExecutionInput`](crate::operation::stop_automation_execution::StopAutomationExecutionInput).
         125  +
    pub fn builder() -> crate::operation::stop_automation_execution::builders::StopAutomationExecutionInputBuilder {
         126  +
        crate::operation::stop_automation_execution::builders::StopAutomationExecutionInputBuilder::default()
         127  +
    }
         128  +
}
         129  +
         130  +
/// A builder for [`StopAutomationExecutionInput`](crate::operation::stop_automation_execution::StopAutomationExecutionInput).
         131  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         132  +
#[non_exhaustive]
         133  +
pub struct StopAutomationExecutionInputBuilder {
         134  +
    pub(crate) automation_execution_id: ::std::option::Option<::std::string::String>,
         135  +
    pub(crate) r#type: ::std::option::Option<crate::types::StopType>,
         136  +
}
         137  +
impl StopAutomationExecutionInputBuilder {
         138  +
    /// <p>The execution ID of the Automation to stop.</p>
         139  +
    /// This field is required.
         140  +
    pub fn automation_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         141  +
        self.automation_execution_id = ::std::option::Option::Some(input.into());
         142  +
        self
         143  +
    }
         144  +
    /// <p>The execution ID of the Automation to stop.</p>
         145  +
    pub fn set_automation_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         146  +
        self.automation_execution_id = input;
         147  +
        self
         148  +
    }
         149  +
    /// <p>The execution ID of the Automation to stop.</p>
         150  +
    pub fn get_automation_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         151  +
        &self.automation_execution_id
         152  +
    }
         153  +
    /// <p>The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.</p>
         154  +
    pub fn r#type(mut self, input: crate::types::StopType) -> Self {
         155  +
        self.r#type = ::std::option::Option::Some(input);
         156  +
        self
         157  +
    }
         158  +
    /// <p>The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.</p>
         159  +
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::StopType>) -> Self {
         160  +
        self.r#type = input;
         161  +
        self
         162  +
    }
         163  +
    /// <p>The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.</p>
         164  +
    pub fn get_type(&self) -> &::std::option::Option<crate::types::StopType> {
         165  +
        &self.r#type
         166  +
    }
         167  +
    /// Consumes the builder and constructs a [`StopAutomationExecutionInput`](crate::operation::stop_automation_execution::StopAutomationExecutionInput).
         168  +
    pub fn build(
         169  +
        self,
         170  +
    ) -> ::std::result::Result<
         171  +
        crate::operation::stop_automation_execution::StopAutomationExecutionInput,
         172  +
        ::aws_smithy_types::error::operation::BuildError,
         173  +
    > {
         174  +
        ::std::result::Result::Ok(crate::operation::stop_automation_execution::StopAutomationExecutionInput {
         175  +
            automation_execution_id: self.automation_execution_id,
         176  +
            r#type: self.r#type,
         177  +
        })
         178  +
    }
         179  +
}

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