AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,157 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::get_command_invocation::_get_command_invocation_input::GetCommandInvocationInputBuilder;
           3  +
           4  +
pub use crate::operation::get_command_invocation::_get_command_invocation_output::GetCommandInvocationOutputBuilder;
           5  +
           6  +
impl crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder {
           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_command_invocation::GetCommandInvocationOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::get_command_invocation::GetCommandInvocationError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.get_command_invocation();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `GetCommandInvocation`.
          24  +
///
          25  +
/// <p>Returns detailed information about command execution for an invocation or plugin. The Run Command API follows an eventual consistency model, due to the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your resources might not be immediately visible to all subsequent commands you run. You should keep this in mind when you carry out an API command that immediately follows a previous API command.</p>
          26  +
/// <p><code>GetCommandInvocation</code> only gives the execution status of a plugin in a document. To get the command execution status on a specific managed node, use <code>ListCommandInvocations</code>. To get the command execution status across managed nodes, use <code>ListCommands</code>.</p>
          27  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          28  +
pub struct GetCommandInvocationFluentBuilder {
          29  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          30  +
    inner: crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder,
          31  +
    config_override: ::std::option::Option<crate::config::Builder>,
          32  +
}
          33  +
impl
          34  +
    crate::client::customize::internal::CustomizableSend<
          35  +
        crate::operation::get_command_invocation::GetCommandInvocationOutput,
          36  +
        crate::operation::get_command_invocation::GetCommandInvocationError,
          37  +
    > for GetCommandInvocationFluentBuilder
          38  +
{
          39  +
    fn send(
          40  +
        self,
          41  +
        config_override: crate::config::Builder,
          42  +
    ) -> crate::client::customize::internal::BoxFuture<
          43  +
        crate::client::customize::internal::SendResult<
          44  +
            crate::operation::get_command_invocation::GetCommandInvocationOutput,
          45  +
            crate::operation::get_command_invocation::GetCommandInvocationError,
          46  +
        >,
          47  +
    > {
          48  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          49  +
    }
          50  +
}
          51  +
impl GetCommandInvocationFluentBuilder {
          52  +
    /// Creates a new `GetCommandInvocationFluentBuilder`.
          53  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          54  +
        Self {
          55  +
            handle,
          56  +
            inner: ::std::default::Default::default(),
          57  +
            config_override: ::std::option::Option::None,
          58  +
        }
          59  +
    }
          60  +
    /// Access the GetCommandInvocation as a reference.
          61  +
    pub fn as_input(&self) -> &crate::operation::get_command_invocation::builders::GetCommandInvocationInputBuilder {
          62  +
        &self.inner
          63  +
    }
          64  +
    /// Sends the request and returns the response.
          65  +
    ///
          66  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          67  +
    /// can be matched against.
          68  +
    ///
          69  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          70  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          71  +
    /// set when configuring the client.
          72  +
    pub async fn send(
          73  +
        self,
          74  +
    ) -> ::std::result::Result<
          75  +
        crate::operation::get_command_invocation::GetCommandInvocationOutput,
          76  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          77  +
            crate::operation::get_command_invocation::GetCommandInvocationError,
          78  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          79  +
        >,
          80  +
    > {
          81  +
        let input = self
          82  +
            .inner
          83  +
            .build()
          84  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          85  +
        let runtime_plugins = crate::operation::get_command_invocation::GetCommandInvocation::operation_runtime_plugins(
          86  +
            self.handle.runtime_plugins.clone(),
          87  +
            &self.handle.conf,
          88  +
            self.config_override,
          89  +
        );
          90  +
        crate::operation::get_command_invocation::GetCommandInvocation::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::get_command_invocation::GetCommandInvocationOutput,
          98  +
        crate::operation::get_command_invocation::GetCommandInvocationError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// <p>(Required) The parent command ID of the invocation plugin.</p>
         113  +
    pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        self.inner = self.inner.command_id(input.into());
         115  +
        self
         116  +
    }
         117  +
    /// <p>(Required) The parent command ID of the invocation plugin.</p>
         118  +
    pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.set_command_id(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>(Required) The parent command ID of the invocation plugin.</p>
         123  +
    pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
         124  +
        self.inner.get_command_id()
         125  +
    }
         126  +
    /// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
         127  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.instance_id(input.into());
         129  +
        self
         130  +
    }
         131  +
    /// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
         132  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        self.inner = self.inner.set_instance_id(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>(Required) The ID of the managed node targeted by the command. A <i>managed node</i> can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.</p>
         137  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         138  +
        self.inner.get_instance_id()
         139  +
    }
         140  +
    /// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
         141  +
    /// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
         142  +
    pub fn plugin_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         143  +
        self.inner = self.inner.plugin_name(input.into());
         144  +
        self
         145  +
    }
         146  +
    /// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
         147  +
    /// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
         148  +
    pub fn set_plugin_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         149  +
        self.inner = self.inner.set_plugin_name(input);
         150  +
        self
         151  +
    }
         152  +
    /// <p>The name of the step for which you want detailed results. If the document contains only one step, you can omit the name and details for that step. If the document contains more than one step, you must specify the name of the step for which you want to view details. Be sure to specify the name of the step, not the name of a plugin like <code>aws:RunShellScript</code>.</p>
         153  +
    /// <p>To find the <code>PluginName</code>, check the document content and find the name of the step you want details for. Alternatively, use <code>ListCommandInvocations</code> with the <code>CommandId</code> and <code>Details</code> parameters. The <code>PluginName</code> is the <code>Name</code> attribute of the <code>CommandPlugin</code> object in the <code>CommandPlugins</code> list.</p>
         154  +
    pub fn get_plugin_name(&self) -> &::std::option::Option<::std::string::String> {
         155  +
        self.inner.get_plugin_name()
         156  +
    }
         157  +
}

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

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

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

@@ -0,1 +0,130 @@
           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 GetConnectionStatusInput {
           6  +
    /// <p>The managed node ID.</p>
           7  +
    pub target: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl GetConnectionStatusInput {
          10  +
    /// <p>The managed node ID.</p>
          11  +
    pub fn target(&self) -> ::std::option::Option<&str> {
          12  +
        self.target.as_deref()
          13  +
    }
          14  +
}
          15  +
static GETCONNECTIONSTATUSINPUT_MEMBER_TARGET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#GetConnectionStatusInput$Target",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "GetConnectionStatusInput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::String,
          22  +
    "Target",
          23  +
    0,
          24  +
);
          25  +
static GETCONNECTIONSTATUSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "com.amazonaws.ssm.synthetic#GetConnectionStatusInput",
          28  +
        "com.amazonaws.ssm.synthetic",
          29  +
        "GetConnectionStatusInput",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::Structure,
          32  +
    &[&GETCONNECTIONSTATUSINPUT_MEMBER_TARGET],
          33  +
)
          34  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          35  +
.with_original_name("GetConnectionStatusRequest");
          36  +
impl GetConnectionStatusInput {
          37  +
    /// The schema for this shape.
          38  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETCONNECTIONSTATUSINPUT_SCHEMA;
          39  +
}
          40  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetConnectionStatusInput {
          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.target {
          47  +
            ser.write_string(&GETCONNECTIONSTATUSINPUT_MEMBER_TARGET, val)?;
          48  +
        }
          49  +
        Ok(())
          50  +
    }
          51  +
}
          52  +
impl GetConnectionStatusInput {
          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(&GETCONNECTIONSTATUSINPUT_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.target = Some(deser.read_string(member)?);
          73  +
                    }
          74  +
                }
          75  +
                _ => {}
          76  +
            }
          77  +
            Ok(())
          78  +
        })?;
          79  +
        builder.target = builder.target.or(Some(String::new()));
          80  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          81  +
    }
          82  +
}
          83  +
impl GetConnectionStatusInput {
          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 GetConnectionStatusInput {
          95  +
    /// Creates a new builder-style object to manufacture [`GetConnectionStatusInput`](crate::operation::get_connection_status::GetConnectionStatusInput).
          96  +
    pub fn builder() -> crate::operation::get_connection_status::builders::GetConnectionStatusInputBuilder {
          97  +
        crate::operation::get_connection_status::builders::GetConnectionStatusInputBuilder::default()
          98  +
    }
          99  +
}
         100  +
         101  +
/// A builder for [`GetConnectionStatusInput`](crate::operation::get_connection_status::GetConnectionStatusInput).
         102  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         103  +
#[non_exhaustive]
         104  +
pub struct GetConnectionStatusInputBuilder {
         105  +
    pub(crate) target: ::std::option::Option<::std::string::String>,
         106  +
}
         107  +
impl GetConnectionStatusInputBuilder {
         108  +
    /// <p>The managed node ID.</p>
         109  +
    /// This field is required.
         110  +
    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        self.target = ::std::option::Option::Some(input.into());
         112  +
        self
         113  +
    }
         114  +
    /// <p>The managed node ID.</p>
         115  +
    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         116  +
        self.target = input;
         117  +
        self
         118  +
    }
         119  +
    /// <p>The managed node ID.</p>
         120  +
    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
         121  +
        &self.target
         122  +
    }
         123  +
    /// Consumes the builder and constructs a [`GetConnectionStatusInput`](crate::operation::get_connection_status::GetConnectionStatusInput).
         124  +
    pub fn build(
         125  +
        self,
         126  +
    ) -> ::std::result::Result<crate::operation::get_connection_status::GetConnectionStatusInput, ::aws_smithy_types::error::operation::BuildError>
         127  +
    {
         128  +
        ::std::result::Result::Ok(crate::operation::get_connection_status::GetConnectionStatusInput { target: self.target })
         129  +
    }
         130  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/get_connection_status/_get_connection_status_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 GetConnectionStatusOutput {
           6  +
    /// <p>The ID of the managed node to check connection status.</p>
           7  +
    pub target: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The status of the connection to the managed node.</p>
           9  +
    pub status: ::std::option::Option<crate::types::ConnectionStatus>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl GetConnectionStatusOutput {
          13  +
    /// <p>The ID of the managed node to check connection status.</p>
          14  +
    pub fn target(&self) -> ::std::option::Option<&str> {
          15  +
        self.target.as_deref()
          16  +
    }
          17  +
    /// <p>The status of the connection to the managed node.</p>
          18  +
    pub fn status(&self) -> ::std::option::Option<&crate::types::ConnectionStatus> {
          19  +
        self.status.as_ref()
          20  +
    }
          21  +
}
          22  +
static GETCONNECTIONSTATUSOUTPUT_MEMBER_TARGET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm.synthetic#GetConnectionStatusOutput$Target",
          25  +
        "com.amazonaws.ssm.synthetic",
          26  +
        "GetConnectionStatusOutput",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "Target",
          30  +
    0,
          31  +
);
          32  +
static GETCONNECTIONSTATUSOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm.synthetic#GetConnectionStatusOutput$Status",
          35  +
        "com.amazonaws.ssm.synthetic",
          36  +
        "GetConnectionStatusOutput",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "Status",
          40  +
    1,
          41  +
);
          42  +
static GETCONNECTIONSTATUSOUTPUT_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 GETCONNECTIONSTATUSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#GetConnectionStatusOutput",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "GetConnectionStatusOutput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::Structure,
          56  +
    &[
          57  +
        &GETCONNECTIONSTATUSOUTPUT_MEMBER_TARGET,
          58  +
        &GETCONNECTIONSTATUSOUTPUT_MEMBER_STATUS,
          59  +
        &GETCONNECTIONSTATUSOUTPUT_MEMBER__REQUEST_ID,
          60  +
    ],
          61  +
)
          62  +
.with_original_name("GetConnectionStatusResponse");
          63  +
impl GetConnectionStatusOutput {
          64  +
    /// The schema for this shape.
          65  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETCONNECTIONSTATUSOUTPUT_SCHEMA;
          66  +
}
          67  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetConnectionStatusOutput {
          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.target {
          74  +
            ser.write_string(&GETCONNECTIONSTATUSOUTPUT_MEMBER_TARGET, val)?;
          75  +
        }
          76  +
        if let Some(ref val) = self.status {
          77  +
            ser.write_string(&GETCONNECTIONSTATUSOUTPUT_MEMBER_STATUS, val.as_str())?;
          78  +
        }
          79  +
        Ok(())
          80  +
    }
          81  +
}
          82  +
impl GetConnectionStatusOutput {
          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(&GETCONNECTIONSTATUSOUTPUT_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.target = Some(deser.read_string(member)?);
         103  +
                    }
         104  +
                }
         105  +
                Some(1) => {
         106  +
                    if deser.is_null() {
         107  +
                        deser.read_null()?;
         108  +
                    } else {
         109  +
                        builder.status = Some(crate::types::ConnectionStatus::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 GetConnectionStatusOutput {
         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(&GETCONNECTIONSTATUSOUTPUT_SCHEMA, &mut |member, deser| {
         146  +
            match member.member_index() {
         147  +
                Some(0) => {
         148  +
                    builder.target = Some(deser.read_string(member)?);
         149  +
                }
         150  +
                Some(1) => {
         151  +
                    builder.status = Some(crate::types::ConnectionStatus::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 GetConnectionStatusOutput {
         161  +
    fn request_id(&self) -> Option<&str> {
         162  +
        self._request_id.as_deref()
         163  +
    }
         164  +
}
         165  +
impl GetConnectionStatusOutput {
         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 GetConnectionStatusOutput {
         172  +
    /// Creates a new builder-style object to manufacture [`GetConnectionStatusOutput`](crate::operation::get_connection_status::GetConnectionStatusOutput).
         173  +
    pub fn builder() -> crate::operation::get_connection_status::builders::GetConnectionStatusOutputBuilder {
         174  +
        crate::operation::get_connection_status::builders::GetConnectionStatusOutputBuilder::default()
         175  +
    }
         176  +
}
         177  +
         178  +
/// A builder for [`GetConnectionStatusOutput`](crate::operation::get_connection_status::GetConnectionStatusOutput).
         179  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         180  +
#[non_exhaustive]
         181  +
pub struct GetConnectionStatusOutputBuilder {
         182  +
    pub(crate) target: ::std::option::Option<::std::string::String>,
         183  +
    pub(crate) status: ::std::option::Option<crate::types::ConnectionStatus>,
         184  +
    _request_id: Option<String>,
         185  +
}
         186  +
impl GetConnectionStatusOutputBuilder {
         187  +
    /// <p>The ID of the managed node to check connection status.</p>
         188  +
    pub fn target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         189  +
        self.target = ::std::option::Option::Some(input.into());
         190  +
        self
         191  +
    }
         192  +
    /// <p>The ID of the managed node to check connection status.</p>
         193  +
    pub fn set_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         194  +
        self.target = input;
         195  +
        self
         196  +
    }
         197  +
    /// <p>The ID of the managed node to check connection status.</p>
         198  +
    pub fn get_target(&self) -> &::std::option::Option<::std::string::String> {
         199  +
        &self.target
         200  +
    }
         201  +
    /// <p>The status of the connection to the managed node.</p>
         202  +
    pub fn status(mut self, input: crate::types::ConnectionStatus) -> Self {
         203  +
        self.status = ::std::option::Option::Some(input);
         204  +
        self
         205  +
    }
         206  +
    /// <p>The status of the connection to the managed node.</p>
         207  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ConnectionStatus>) -> Self {
         208  +
        self.status = input;
         209  +
        self
         210  +
    }
         211  +
    /// <p>The status of the connection to the managed node.</p>
         212  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ConnectionStatus> {
         213  +
        &self.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 [`GetConnectionStatusOutput`](crate::operation::get_connection_status::GetConnectionStatusOutput).
         225  +
    pub fn build(self) -> crate::operation::get_connection_status::GetConnectionStatusOutput {
         226  +
        crate::operation::get_connection_status::GetConnectionStatusOutput {
         227  +
            target: self.target,
         228  +
            status: self.status,
         229  +
            _request_id: self._request_id,
         230  +
        }
         231  +
    }
         232  +
}