AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

@@ -0,1 +0,164 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_activations::_describe_activations_input::DescribeActivationsInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_activations::_describe_activations_output::DescribeActivationsOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_activations::builders::DescribeActivationsInputBuilder {
           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::describe_activations::DescribeActivationsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_activations::DescribeActivationsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_activations();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeActivations`.
          24  +
///
          25  +
/// <p>Describes details about the activation, such as the date and time the activation was created, its expiration date, the Identity and Access Management (IAM) role assigned to the managed nodes in the activation, and the number of nodes registered by using this activation.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribeActivationsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_activations::builders::DescribeActivationsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_activations::DescribeActivationsOutput,
          35  +
        crate::operation::describe_activations::DescribeActivationsError,
          36  +
    > for DescribeActivationsFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::describe_activations::DescribeActivationsOutput,
          44  +
            crate::operation::describe_activations::DescribeActivationsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribeActivationsFluentBuilder {
          51  +
    /// Creates a new `DescribeActivationsFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the DescribeActivations as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_activations::builders::DescribeActivationsInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::describe_activations::DescribeActivationsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_activations::DescribeActivationsError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::describe_activations::DescribeActivations::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::describe_activations::DescribeActivations::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::describe_activations::DescribeActivationsOutput,
          97  +
        crate::operation::describe_activations::DescribeActivationsError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// Create a paginator for this request
         112  +
    ///
         113  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_activations::paginator::DescribeActivationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::describe_activations::paginator::DescribeActivationsPaginator {
         115  +
        crate::operation::describe_activations::paginator::DescribeActivationsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    ///
         118  +
    /// Appends an item to `Filters`.
         119  +
    ///
         120  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         121  +
    ///
         122  +
    /// <p>A filter to view information about your activations.</p>
         123  +
    pub fn filters(mut self, input: crate::types::DescribeActivationsFilter) -> Self {
         124  +
        self.inner = self.inner.filters(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>A filter to view information about your activations.</p>
         128  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DescribeActivationsFilter>>) -> Self {
         129  +
        self.inner = self.inner.set_filters(input);
         130  +
        self
         131  +
    }
         132  +
    /// <p>A filter to view information about your activations.</p>
         133  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DescribeActivationsFilter>> {
         134  +
        self.inner.get_filters()
         135  +
    }
         136  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         137  +
    pub fn max_results(mut self, input: i32) -> Self {
         138  +
        self.inner = self.inner.max_results(input);
         139  +
        self
         140  +
    }
         141  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         142  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         143  +
        self.inner = self.inner.set_max_results(input);
         144  +
        self
         145  +
    }
         146  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         147  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         148  +
        self.inner.get_max_results()
         149  +
    }
         150  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         151  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         152  +
        self.inner = self.inner.next_token(input.into());
         153  +
        self
         154  +
    }
         155  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         156  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        self.inner = self.inner.set_next_token(input);
         158  +
        self
         159  +
    }
         160  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         161  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         162  +
        self.inner.get_next_token()
         163  +
    }
         164  +
}

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

@@ -0,1 +0,148 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeActivations`](crate::operation::describe_activations::DescribeActivations)
           3  +
pub struct DescribeActivationsPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_activations::builders::DescribeActivationsInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeActivationsPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_activations::builders::DescribeActivationsInputBuilder,
          14  +
    ) -> Self {
          15  +
        Self {
          16  +
            handle,
          17  +
            builder,
          18  +
            stop_on_duplicate_token: true,
          19  +
        }
          20  +
    }
          21  +
          22  +
    /// Set the page size
          23  +
    ///
          24  +
    /// _Note: this method will override any previously set value for `max_results`_
          25  +
    pub fn page_size(mut self, limit: i32) -> Self {
          26  +
        self.builder.max_results = ::std::option::Option::Some(limit);
          27  +
        self
          28  +
    }
          29  +
          30  +
    /// Create a flattened paginator
          31  +
    ///
          32  +
    /// This paginator automatically flattens results using `activation_list`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_activations::paginator::DescribeActivationsPaginatorItems {
          35  +
        crate::operation::describe_activations::paginator::DescribeActivationsPaginatorItems(self)
          36  +
    }
          37  +
          38  +
    /// Stop paginating when the service returns the same pagination token twice in a row.
          39  +
    ///
          40  +
    /// Defaults to true.
          41  +
    ///
          42  +
    /// For certain operations, it may be useful to continue on duplicate token. For example,
          43  +
    /// if an operation is for tailing a log file in real-time, then continuing may be desired.
          44  +
    /// This option can be set to `false` to accommodate these use cases.
          45  +
    pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self {
          46  +
        self.stop_on_duplicate_token = stop_on_duplicate_token;
          47  +
        self
          48  +
    }
          49  +
          50  +
    /// Create the pagination stream
          51  +
    ///
          52  +
    /// _Note:_ No requests will be dispatched until the stream is used
          53  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
          54  +
    pub fn send(
          55  +
        self,
          56  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
          57  +
        ::std::result::Result<
          58  +
            crate::operation::describe_activations::DescribeActivationsOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_activations::DescribeActivationsError,
          61  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          62  +
            >,
          63  +
        >,
          64  +
    > {
          65  +
        // Move individual fields out of self for the borrow checker
          66  +
        let builder = self.builder;
          67  +
        let handle = self.handle;
          68  +
        let runtime_plugins = crate::operation::describe_activations::DescribeActivations::operation_runtime_plugins(
          69  +
            handle.runtime_plugins.clone(),
          70  +
            &handle.conf,
          71  +
            ::std::option::Option::None,
          72  +
        )
          73  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          74  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          75  +
            move |tx| {
          76  +
                ::std::boxed::Box::pin(async move {
          77  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          78  +
                    let mut input = match builder
          79  +
                        .build()
          80  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          81  +
                    {
          82  +
                        ::std::result::Result::Ok(input) => input,
          83  +
                        ::std::result::Result::Err(e) => {
          84  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          85  +
                            return;
          86  +
                        }
          87  +
                    };
          88  +
                    loop {
          89  +
                        let resp = crate::operation::describe_activations::DescribeActivations::orchestrate(&runtime_plugins, input.clone()).await;
          90  +
                        // If the input member is None or it was an error
          91  +
                        let done = match resp {
          92  +
                            ::std::result::Result::Ok(ref resp) => {
          93  +
                                let new_token = crate::lens::reflens_describe_activations_output_output_next_token(resp);
          94  +
                                // Pagination is exhausted when the next token is an empty string
          95  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          96  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          97  +
                                    true
          98  +
                                } else {
          99  +
                                    input.next_token = new_token.cloned();
         100  +
                                    is_empty
         101  +
                                }
         102  +
                            }
         103  +
                            ::std::result::Result::Err(_) => true,
         104  +
                        };
         105  +
                        if tx.send(resp).await.is_err() {
         106  +
                            // receiving end was dropped
         107  +
                            return;
         108  +
                        }
         109  +
                        if done {
         110  +
                            return;
         111  +
                        }
         112  +
                    }
         113  +
                })
         114  +
            },
         115  +
        ))
         116  +
    }
         117  +
}
         118  +
         119  +
/// Flattened paginator for `DescribeActivationsPaginator`
         120  +
///
         121  +
/// This is created with [`.items()`](DescribeActivationsPaginator::items)
         122  +
pub struct DescribeActivationsPaginatorItems(DescribeActivationsPaginator);
         123  +
         124  +
impl DescribeActivationsPaginatorItems {
         125  +
    /// Create the pagination stream
         126  +
    ///
         127  +
    /// _Note_: No requests will be dispatched until the stream is used
         128  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         129  +
    ///
         130  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         131  +
    pub fn send(
         132  +
        self,
         133  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         134  +
        ::std::result::Result<
         135  +
            crate::types::Activation,
         136  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         137  +
                crate::operation::describe_activations::DescribeActivationsError,
         138  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         139  +
            >,
         140  +
        >,
         141  +
    > {
         142  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         143  +
            crate::lens::lens_describe_activations_output_output_activation_list(page)
         144  +
                .unwrap_or_default()
         145  +
                .into_iter()
         146  +
        })
         147  +
    }
         148  +
}

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

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