AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/list_compliance_summaries/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::list_compliance_summaries::_list_compliance_summaries_input::ListComplianceSummariesInputBuilder;
           3  +
           4  +
pub use crate::operation::list_compliance_summaries::_list_compliance_summaries_output::ListComplianceSummariesOutputBuilder;
           5  +
           6  +
impl crate::operation::list_compliance_summaries::builders::ListComplianceSummariesInputBuilder {
           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::list_compliance_summaries::ListComplianceSummariesOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_compliance_summaries();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListComplianceSummaries`.
          24  +
///
          25  +
/// <p>Returns a summary count of compliant and non-compliant resources for a compliance type. For example, this call can return State Manager associations, patches, or custom compliance types according to the filter criteria that you specify.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListComplianceSummariesFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_compliance_summaries::builders::ListComplianceSummariesInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_compliance_summaries::ListComplianceSummariesOutput,
          35  +
        crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          36  +
    > for ListComplianceSummariesFluentBuilder
          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::list_compliance_summaries::ListComplianceSummariesOutput,
          44  +
            crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListComplianceSummariesFluentBuilder {
          51  +
    /// Creates a new `ListComplianceSummariesFluentBuilder`.
          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 ListComplianceSummaries as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_compliance_summaries::builders::ListComplianceSummariesInputBuilder {
          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::list_compliance_summaries::ListComplianceSummariesOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          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::list_compliance_summaries::ListComplianceSummaries::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_compliance_summaries::ListComplianceSummaries::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::list_compliance_summaries::ListComplianceSummariesOutput,
          97  +
        crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          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::list_compliance_summaries::paginator::ListComplianceSummariesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_compliance_summaries::paginator::ListComplianceSummariesPaginator {
         115  +
        crate::operation::list_compliance_summaries::paginator::ListComplianceSummariesPaginator::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>One or more compliance or inventory filters. Use a filter to return a more specific list of results.</p>
         123  +
    pub fn filters(mut self, input: crate::types::ComplianceStringFilter) -> Self {
         124  +
        self.inner = self.inner.filters(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>One or more compliance or inventory filters. Use a filter to return a more specific list of results.</p>
         128  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>>) -> Self {
         129  +
        self.inner = self.inner.set_filters(input);
         130  +
        self
         131  +
    }
         132  +
    /// <p>One or more compliance or inventory filters. Use a filter to return a more specific list of results.</p>
         133  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComplianceStringFilter>> {
         134  +
        self.inner.get_filters()
         135  +
    }
         136  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         137  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         138  +
        self.inner = self.inner.next_token(input.into());
         139  +
        self
         140  +
    }
         141  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         142  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         143  +
        self.inner = self.inner.set_next_token(input);
         144  +
        self
         145  +
    }
         146  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         147  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         148  +
        self.inner.get_next_token()
         149  +
    }
         150  +
    /// <p>The maximum number of items to return for this call. Currently, you can specify null or 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         151  +
    pub fn max_results(mut self, input: i32) -> Self {
         152  +
        self.inner = self.inner.max_results(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>The maximum number of items to return for this call. Currently, you can specify null or 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         156  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         157  +
        self.inner = self.inner.set_max_results(input);
         158  +
        self
         159  +
    }
         160  +
    /// <p>The maximum number of items to return for this call. Currently, you can specify null or 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         161  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         162  +
        self.inner.get_max_results()
         163  +
    }
         164  +
}

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

@@ -0,1 +0,149 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`ListComplianceSummaries`](crate::operation::list_compliance_summaries::ListComplianceSummaries)
           3  +
pub struct ListComplianceSummariesPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::list_compliance_summaries::builders::ListComplianceSummariesInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl ListComplianceSummariesPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::list_compliance_summaries::builders::ListComplianceSummariesInputBuilder,
          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 `compliance_summary_items`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::list_compliance_summaries::paginator::ListComplianceSummariesPaginatorItems {
          35  +
        crate::operation::list_compliance_summaries::paginator::ListComplianceSummariesPaginatorItems(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::list_compliance_summaries::ListComplianceSummariesOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::list_compliance_summaries::ListComplianceSummariesError,
          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::list_compliance_summaries::ListComplianceSummaries::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 =
          90  +
                            crate::operation::list_compliance_summaries::ListComplianceSummaries::orchestrate(&runtime_plugins, input.clone()).await;
          91  +
                        // If the input member is None or it was an error
          92  +
                        let done = match resp {
          93  +
                            ::std::result::Result::Ok(ref resp) => {
          94  +
                                let new_token = crate::lens::reflens_list_compliance_summaries_output_output_next_token(resp);
          95  +
                                // Pagination is exhausted when the next token is an empty string
          96  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          97  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          98  +
                                    true
          99  +
                                } else {
         100  +
                                    input.next_token = new_token.cloned();
         101  +
                                    is_empty
         102  +
                                }
         103  +
                            }
         104  +
                            ::std::result::Result::Err(_) => true,
         105  +
                        };
         106  +
                        if tx.send(resp).await.is_err() {
         107  +
                            // receiving end was dropped
         108  +
                            return;
         109  +
                        }
         110  +
                        if done {
         111  +
                            return;
         112  +
                        }
         113  +
                    }
         114  +
                })
         115  +
            },
         116  +
        ))
         117  +
    }
         118  +
}
         119  +
         120  +
/// Flattened paginator for `ListComplianceSummariesPaginator`
         121  +
///
         122  +
/// This is created with [`.items()`](ListComplianceSummariesPaginator::items)
         123  +
pub struct ListComplianceSummariesPaginatorItems(ListComplianceSummariesPaginator);
         124  +
         125  +
impl ListComplianceSummariesPaginatorItems {
         126  +
    /// Create the pagination stream
         127  +
    ///
         128  +
    /// _Note_: No requests will be dispatched until the stream is used
         129  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         130  +
    ///
         131  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         132  +
    pub fn send(
         133  +
        self,
         134  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         135  +
        ::std::result::Result<
         136  +
            crate::types::ComplianceSummaryItem,
         137  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         138  +
                crate::operation::list_compliance_summaries::ListComplianceSummariesError,
         139  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         140  +
            >,
         141  +
        >,
         142  +
    > {
         143  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         144  +
            crate::lens::lens_list_compliance_summaries_output_output_compliance_summary_items(page)
         145  +
                .unwrap_or_default()
         146  +
                .into_iter()
         147  +
        })
         148  +
    }
         149  +
}

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

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

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

@@ -0,1 +0,309 @@
           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 ListDocumentMetadataHistoryInput {
           6  +
    /// <p>The name of the change template.</p>
           7  +
    pub name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The version of the change template.</p>
           9  +
    pub document_version: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
          11  +
    pub metadata: ::std::option::Option<crate::types::DocumentMetadataEnum>,
          12  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          13  +
    pub next_token: ::std::option::Option<::std::string::String>,
          14  +
    /// <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>
          15  +
    pub max_results: ::std::option::Option<i32>,
          16  +
}
          17  +
impl ListDocumentMetadataHistoryInput {
          18  +
    /// <p>The name of the change template.</p>
          19  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          20  +
        self.name.as_deref()
          21  +
    }
          22  +
    /// <p>The version of the change template.</p>
          23  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          24  +
        self.document_version.as_deref()
          25  +
    }
          26  +
    /// <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
          27  +
    pub fn metadata(&self) -> ::std::option::Option<&crate::types::DocumentMetadataEnum> {
          28  +
        self.metadata.as_ref()
          29  +
    }
          30  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          31  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          32  +
        self.next_token.as_deref()
          33  +
    }
          34  +
    /// <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>
          35  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          36  +
        self.max_results
          37  +
    }
          38  +
}
          39  +
static LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts(
          41  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput$Name",
          42  +
        "com.amazonaws.ssm.synthetic",
          43  +
        "ListDocumentMetadataHistoryInput",
          44  +
    ),
          45  +
    ::aws_smithy_schema::ShapeType::String,
          46  +
    "Name",
          47  +
    0,
          48  +
);
          49  +
static LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput$DocumentVersion",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "ListDocumentMetadataHistoryInput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::String,
          56  +
    "DocumentVersion",
          57  +
    1,
          58  +
);
          59  +
static LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_METADATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput$Metadata",
          62  +
        "com.amazonaws.ssm.synthetic",
          63  +
        "ListDocumentMetadataHistoryInput",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "Metadata",
          67  +
    2,
          68  +
);
          69  +
static LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput$NextToken",
          72  +
        "com.amazonaws.ssm.synthetic",
          73  +
        "ListDocumentMetadataHistoryInput",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::String,
          76  +
    "NextToken",
          77  +
    3,
          78  +
);
          79  +
static LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_parts(
          81  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput$MaxResults",
          82  +
        "com.amazonaws.ssm.synthetic",
          83  +
        "ListDocumentMetadataHistoryInput",
          84  +
    ),
          85  +
    ::aws_smithy_schema::ShapeType::Integer,
          86  +
    "MaxResults",
          87  +
    4,
          88  +
);
          89  +
static LISTDOCUMENTMETADATAHISTORYINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          90  +
    ::aws_smithy_schema::ShapeId::from_parts(
          91  +
        "com.amazonaws.ssm.synthetic#ListDocumentMetadataHistoryInput",
          92  +
        "com.amazonaws.ssm.synthetic",
          93  +
        "ListDocumentMetadataHistoryInput",
          94  +
    ),
          95  +
    ::aws_smithy_schema::ShapeType::Structure,
          96  +
    &[
          97  +
        &LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NAME,
          98  +
        &LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_DOCUMENT_VERSION,
          99  +
        &LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_METADATA,
         100  +
        &LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NEXT_TOKEN,
         101  +
        &LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_MAX_RESULTS,
         102  +
    ],
         103  +
)
         104  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         105  +
.with_original_name("ListDocumentMetadataHistoryRequest");
         106  +
impl ListDocumentMetadataHistoryInput {
         107  +
    /// The schema for this shape.
         108  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTDOCUMENTMETADATAHISTORYINPUT_SCHEMA;
         109  +
}
         110  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListDocumentMetadataHistoryInput {
         111  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         112  +
    fn serialize_members(
         113  +
        &self,
         114  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         115  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         116  +
        if let Some(ref val) = self.name {
         117  +
            ser.write_string(&LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NAME, val)?;
         118  +
        }
         119  +
        if let Some(ref val) = self.document_version {
         120  +
            ser.write_string(&LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_DOCUMENT_VERSION, val)?;
         121  +
        }
         122  +
        if let Some(ref val) = self.metadata {
         123  +
            ser.write_string(&LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_METADATA, val.as_str())?;
         124  +
        }
         125  +
        if let Some(ref val) = self.next_token {
         126  +
            ser.write_string(&LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_NEXT_TOKEN, val)?;
         127  +
        }
         128  +
        if let Some(ref val) = self.max_results {
         129  +
            ser.write_integer(&LISTDOCUMENTMETADATAHISTORYINPUT_MEMBER_MAX_RESULTS, *val)?;
         130  +
        }
         131  +
        Ok(())
         132  +
    }
         133  +
}
         134  +
impl ListDocumentMetadataHistoryInput {
         135  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         136  +
    pub fn deserialize(
         137  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         138  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         139  +
        #[allow(unused_variables, unused_mut)]
         140  +
        let mut builder = Self::builder();
         141  +
        #[allow(
         142  +
            unused_variables,
         143  +
            unreachable_code,
         144  +
            clippy::single_match,
         145  +
            clippy::match_single_binding,
         146  +
            clippy::diverging_sub_expression
         147  +
        )]
         148  +
        deserializer.read_struct(&LISTDOCUMENTMETADATAHISTORYINPUT_SCHEMA, &mut |member, deser| {
         149  +
            match member.member_index() {
         150  +
                Some(0) => {
         151  +
                    if deser.is_null() {
         152  +
                        deser.read_null()?;
         153  +
                    } else {
         154  +
                        builder.name = Some(deser.read_string(member)?);
         155  +
                    }
         156  +
                }
         157  +
                Some(1) => {
         158  +
                    if deser.is_null() {
         159  +
                        deser.read_null()?;
         160  +
                    } else {
         161  +
                        builder.document_version = Some(deser.read_string(member)?);
         162  +
                    }
         163  +
                }
         164  +
                Some(2) => {
         165  +
                    if deser.is_null() {
         166  +
                        deser.read_null()?;
         167  +
                    } else {
         168  +
                        builder.metadata = Some(crate::types::DocumentMetadataEnum::from(deser.read_string(member)?.as_str()));
         169  +
                    }
         170  +
                }
         171  +
                Some(3) => {
         172  +
                    if deser.is_null() {
         173  +
                        deser.read_null()?;
         174  +
                    } else {
         175  +
                        builder.next_token = Some(deser.read_string(member)?);
         176  +
                    }
         177  +
                }
         178  +
                Some(4) => {
         179  +
                    if deser.is_null() {
         180  +
                        deser.read_null()?;
         181  +
                    } else {
         182  +
                        builder.max_results = Some(deser.read_integer(member)?);
         183  +
                    }
         184  +
                }
         185  +
                _ => {}
         186  +
            }
         187  +
            Ok(())
         188  +
        })?;
         189  +
        builder.name = builder.name.or(Some(String::new()));
         190  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         191  +
    }
         192  +
}
         193  +
impl ListDocumentMetadataHistoryInput {
         194  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         195  +
    pub fn deserialize_with_response(
         196  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         197  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         198  +
        _status: u16,
         199  +
        _body: &[u8],
         200  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         201  +
        Self::deserialize(deserializer)
         202  +
    }
         203  +
}
         204  +
impl ListDocumentMetadataHistoryInput {
         205  +
    /// Creates a new builder-style object to manufacture [`ListDocumentMetadataHistoryInput`](crate::operation::list_document_metadata_history::ListDocumentMetadataHistoryInput).
         206  +
    pub fn builder() -> crate::operation::list_document_metadata_history::builders::ListDocumentMetadataHistoryInputBuilder {
         207  +
        crate::operation::list_document_metadata_history::builders::ListDocumentMetadataHistoryInputBuilder::default()
         208  +
    }
         209  +
}
         210  +
         211  +
/// A builder for [`ListDocumentMetadataHistoryInput`](crate::operation::list_document_metadata_history::ListDocumentMetadataHistoryInput).
         212  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         213  +
#[non_exhaustive]
         214  +
pub struct ListDocumentMetadataHistoryInputBuilder {
         215  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         216  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         217  +
    pub(crate) metadata: ::std::option::Option<crate::types::DocumentMetadataEnum>,
         218  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         219  +
    pub(crate) max_results: ::std::option::Option<i32>,
         220  +
}
         221  +
impl ListDocumentMetadataHistoryInputBuilder {
         222  +
    /// <p>The name of the change template.</p>
         223  +
    /// This field is required.
         224  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         225  +
        self.name = ::std::option::Option::Some(input.into());
         226  +
        self
         227  +
    }
         228  +
    /// <p>The name of the change template.</p>
         229  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         230  +
        self.name = input;
         231  +
        self
         232  +
    }
         233  +
    /// <p>The name of the change template.</p>
         234  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         235  +
        &self.name
         236  +
    }
         237  +
    /// <p>The version of the change template.</p>
         238  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         239  +
        self.document_version = ::std::option::Option::Some(input.into());
         240  +
        self
         241  +
    }
         242  +
    /// <p>The version of the change template.</p>
         243  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         244  +
        self.document_version = input;
         245  +
        self
         246  +
    }
         247  +
    /// <p>The version of the change template.</p>
         248  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         249  +
        &self.document_version
         250  +
    }
         251  +
    /// <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
         252  +
    /// This field is required.
         253  +
    pub fn metadata(mut self, input: crate::types::DocumentMetadataEnum) -> Self {
         254  +
        self.metadata = ::std::option::Option::Some(input);
         255  +
        self
         256  +
    }
         257  +
    /// <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
         258  +
    pub fn set_metadata(mut self, input: ::std::option::Option<crate::types::DocumentMetadataEnum>) -> Self {
         259  +
        self.metadata = input;
         260  +
        self
         261  +
    }
         262  +
    /// <p>The type of data for which details are being requested. Currently, the only supported value is <code>DocumentReviews</code>.</p>
         263  +
    pub fn get_metadata(&self) -> &::std::option::Option<crate::types::DocumentMetadataEnum> {
         264  +
        &self.metadata
         265  +
    }
         266  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         267  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         268  +
        self.next_token = ::std::option::Option::Some(input.into());
         269  +
        self
         270  +
    }
         271  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         272  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         273  +
        self.next_token = input;
         274  +
        self
         275  +
    }
         276  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         277  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         278  +
        &self.next_token
         279  +
    }
         280  +
    /// <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>
         281  +
    pub fn max_results(mut self, input: i32) -> Self {
         282  +
        self.max_results = ::std::option::Option::Some(input);
         283  +
        self
         284  +
    }
         285  +
    /// <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>
         286  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         287  +
        self.max_results = input;
         288  +
        self
         289  +
    }
         290  +
    /// <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>
         291  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         292  +
        &self.max_results
         293  +
    }
         294  +
    /// Consumes the builder and constructs a [`ListDocumentMetadataHistoryInput`](crate::operation::list_document_metadata_history::ListDocumentMetadataHistoryInput).
         295  +
    pub fn build(
         296  +
        self,
         297  +
    ) -> ::std::result::Result<
         298  +
        crate::operation::list_document_metadata_history::ListDocumentMetadataHistoryInput,
         299  +
        ::aws_smithy_types::error::operation::BuildError,
         300  +
    > {
         301  +
        ::std::result::Result::Ok(crate::operation::list_document_metadata_history::ListDocumentMetadataHistoryInput {
         302  +
            name: self.name,
         303  +
            document_version: self.document_version,
         304  +
            metadata: self.metadata,
         305  +
            next_token: self.next_token,
         306  +
            max_results: self.max_results,
         307  +
        })
         308  +
    }
         309  +
}