AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,191 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_patch_groups::_describe_patch_groups_input::DescribePatchGroupsInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_patch_groups::_describe_patch_groups_output::DescribePatchGroupsOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_patch_groups::builders::DescribePatchGroupsInputBuilder {
           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_patch_groups::DescribePatchGroupsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_patch_groups::DescribePatchGroupsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_patch_groups();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribePatchGroups`.
          24  +
///
          25  +
/// <p>Lists all patch groups that have been registered with patch baselines.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribePatchGroupsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_patch_groups::builders::DescribePatchGroupsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_patch_groups::DescribePatchGroupsOutput,
          35  +
        crate::operation::describe_patch_groups::DescribePatchGroupsError,
          36  +
    > for DescribePatchGroupsFluentBuilder
          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_patch_groups::DescribePatchGroupsOutput,
          44  +
            crate::operation::describe_patch_groups::DescribePatchGroupsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribePatchGroupsFluentBuilder {
          51  +
    /// Creates a new `DescribePatchGroupsFluentBuilder`.
          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 DescribePatchGroups as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_patch_groups::builders::DescribePatchGroupsInputBuilder {
          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_patch_groups::DescribePatchGroupsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_patch_groups::DescribePatchGroupsError,
          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_patch_groups::DescribePatchGroups::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::describe_patch_groups::DescribePatchGroups::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_patch_groups::DescribePatchGroupsOutput,
          97  +
        crate::operation::describe_patch_groups::DescribePatchGroupsError,
          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_patch_groups::paginator::DescribePatchGroupsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::describe_patch_groups::paginator::DescribePatchGroupsPaginator {
         115  +
        crate::operation::describe_patch_groups::paginator::DescribePatchGroupsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>The maximum number of patch groups to return (per page).</p>
         118  +
    pub fn max_results(mut self, input: i32) -> Self {
         119  +
        self.inner = self.inner.max_results(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>The maximum number of patch groups to return (per page).</p>
         123  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         124  +
        self.inner = self.inner.set_max_results(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>The maximum number of patch groups to return (per page).</p>
         128  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         129  +
        self.inner.get_max_results()
         130  +
    }
         131  +
    ///
         132  +
    /// Appends an item to `Filters`.
         133  +
    ///
         134  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         135  +
    ///
         136  +
    /// <p>Each element in the array is a structure containing a key-value pair.</p>
         137  +
    /// <p>Supported keys for <code>DescribePatchGroups</code> include the following:</p>
         138  +
    /// <ul>
         139  +
    /// <li>
         140  +
    /// <p><b> <code>NAME_PREFIX</code> </b></p>
         141  +
    /// <p>Sample values: <code>AWS-</code> | <code>My-</code>.</p></li>
         142  +
    /// <li>
         143  +
    /// <p><b> <code>OPERATING_SYSTEM</code> </b></p>
         144  +
    /// <p>Sample values: <code>AMAZON_LINUX</code> | <code>SUSE</code> | <code>WINDOWS</code></p></li>
         145  +
    /// </ul>
         146  +
    pub fn filters(mut self, input: crate::types::PatchOrchestratorFilter) -> Self {
         147  +
        self.inner = self.inner.filters(input);
         148  +
        self
         149  +
    }
         150  +
    /// <p>Each element in the array is a structure containing a key-value pair.</p>
         151  +
    /// <p>Supported keys for <code>DescribePatchGroups</code> include the following:</p>
         152  +
    /// <ul>
         153  +
    /// <li>
         154  +
    /// <p><b> <code>NAME_PREFIX</code> </b></p>
         155  +
    /// <p>Sample values: <code>AWS-</code> | <code>My-</code>.</p></li>
         156  +
    /// <li>
         157  +
    /// <p><b> <code>OPERATING_SYSTEM</code> </b></p>
         158  +
    /// <p>Sample values: <code>AMAZON_LINUX</code> | <code>SUSE</code> | <code>WINDOWS</code></p></li>
         159  +
    /// </ul>
         160  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>) -> Self {
         161  +
        self.inner = self.inner.set_filters(input);
         162  +
        self
         163  +
    }
         164  +
    /// <p>Each element in the array is a structure containing a key-value pair.</p>
         165  +
    /// <p>Supported keys for <code>DescribePatchGroups</code> include the following:</p>
         166  +
    /// <ul>
         167  +
    /// <li>
         168  +
    /// <p><b> <code>NAME_PREFIX</code> </b></p>
         169  +
    /// <p>Sample values: <code>AWS-</code> | <code>My-</code>.</p></li>
         170  +
    /// <li>
         171  +
    /// <p><b> <code>OPERATING_SYSTEM</code> </b></p>
         172  +
    /// <p>Sample values: <code>AMAZON_LINUX</code> | <code>SUSE</code> | <code>WINDOWS</code></p></li>
         173  +
    /// </ul>
         174  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>> {
         175  +
        self.inner.get_filters()
         176  +
    }
         177  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         178  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         179  +
        self.inner = self.inner.next_token(input.into());
         180  +
        self
         181  +
    }
         182  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         183  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         184  +
        self.inner = self.inner.set_next_token(input);
         185  +
        self
         186  +
    }
         187  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         188  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         189  +
        self.inner.get_next_token()
         190  +
    }
         191  +
}

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

@@ -0,1 +0,148 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribePatchGroups`](crate::operation::describe_patch_groups::DescribePatchGroups)
           3  +
pub struct DescribePatchGroupsPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_patch_groups::builders::DescribePatchGroupsInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribePatchGroupsPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_patch_groups::builders::DescribePatchGroupsInputBuilder,
          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 `mappings`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_patch_groups::paginator::DescribePatchGroupsPaginatorItems {
          35  +
        crate::operation::describe_patch_groups::paginator::DescribePatchGroupsPaginatorItems(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_patch_groups::DescribePatchGroupsOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_patch_groups::DescribePatchGroupsError,
          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_patch_groups::DescribePatchGroups::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_patch_groups::DescribePatchGroups::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_patch_groups_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 `DescribePatchGroupsPaginator`
         120  +
///
         121  +
/// This is created with [`.items()`](DescribePatchGroupsPaginator::items)
         122  +
pub struct DescribePatchGroupsPaginatorItems(DescribePatchGroupsPaginator);
         123  +
         124  +
impl DescribePatchGroupsPaginatorItems {
         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::PatchGroupPatchBaselineMapping,
         136  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         137  +
                crate::operation::describe_patch_groups::DescribePatchGroupsError,
         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_patch_groups_output_output_mappings(page)
         144  +
                .unwrap_or_default()
         145  +
                .into_iter()
         146  +
        })
         147  +
    }
         148  +
}

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

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

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

@@ -0,1 +0,308 @@
           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 DescribePatchPropertiesInput {
           6  +
    /// <p>The operating system type for which to list patches.</p>
           7  +
    pub operating_system: ::std::option::Option<crate::types::OperatingSystem>,
           8  +
    /// <p>The patch property for which you want to view patch details.</p>
           9  +
    pub property: ::std::option::Option<crate::types::PatchProperty>,
          10  +
    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
          11  +
    pub patch_set: ::std::option::Option<crate::types::PatchSet>,
          12  +
    /// <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>
          13  +
    pub max_results: ::std::option::Option<i32>,
          14  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          15  +
    pub next_token: ::std::option::Option<::std::string::String>,
          16  +
}
          17  +
impl DescribePatchPropertiesInput {
          18  +
    /// <p>The operating system type for which to list patches.</p>
          19  +
    pub fn operating_system(&self) -> ::std::option::Option<&crate::types::OperatingSystem> {
          20  +
        self.operating_system.as_ref()
          21  +
    }
          22  +
    /// <p>The patch property for which you want to view patch details.</p>
          23  +
    pub fn property(&self) -> ::std::option::Option<&crate::types::PatchProperty> {
          24  +
        self.property.as_ref()
          25  +
    }
          26  +
    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
          27  +
    pub fn patch_set(&self) -> ::std::option::Option<&crate::types::PatchSet> {
          28  +
        self.patch_set.as_ref()
          29  +
    }
          30  +
    /// <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>
          31  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          32  +
        self.max_results
          33  +
    }
          34  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          35  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          36  +
        self.next_token.as_deref()
          37  +
    }
          38  +
}
          39  +
static DESCRIBEPATCHPROPERTIESINPUT_MEMBER_OPERATING_SYSTEM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts(
          41  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput$OperatingSystem",
          42  +
        "com.amazonaws.ssm.synthetic",
          43  +
        "DescribePatchPropertiesInput",
          44  +
    ),
          45  +
    ::aws_smithy_schema::ShapeType::String,
          46  +
    "OperatingSystem",
          47  +
    0,
          48  +
);
          49  +
static DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PROPERTY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput$Property",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "DescribePatchPropertiesInput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::String,
          56  +
    "Property",
          57  +
    1,
          58  +
);
          59  +
static DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PATCH_SET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput$PatchSet",
          62  +
        "com.amazonaws.ssm.synthetic",
          63  +
        "DescribePatchPropertiesInput",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "PatchSet",
          67  +
    2,
          68  +
);
          69  +
static DESCRIBEPATCHPROPERTIESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput$MaxResults",
          72  +
        "com.amazonaws.ssm.synthetic",
          73  +
        "DescribePatchPropertiesInput",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::Integer,
          76  +
    "MaxResults",
          77  +
    3,
          78  +
);
          79  +
static DESCRIBEPATCHPROPERTIESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_parts(
          81  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput$NextToken",
          82  +
        "com.amazonaws.ssm.synthetic",
          83  +
        "DescribePatchPropertiesInput",
          84  +
    ),
          85  +
    ::aws_smithy_schema::ShapeType::String,
          86  +
    "NextToken",
          87  +
    4,
          88  +
);
          89  +
static DESCRIBEPATCHPROPERTIESINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          90  +
    ::aws_smithy_schema::ShapeId::from_parts(
          91  +
        "com.amazonaws.ssm.synthetic#DescribePatchPropertiesInput",
          92  +
        "com.amazonaws.ssm.synthetic",
          93  +
        "DescribePatchPropertiesInput",
          94  +
    ),
          95  +
    ::aws_smithy_schema::ShapeType::Structure,
          96  +
    &[
          97  +
        &DESCRIBEPATCHPROPERTIESINPUT_MEMBER_OPERATING_SYSTEM,
          98  +
        &DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PROPERTY,
          99  +
        &DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PATCH_SET,
         100  +
        &DESCRIBEPATCHPROPERTIESINPUT_MEMBER_MAX_RESULTS,
         101  +
        &DESCRIBEPATCHPROPERTIESINPUT_MEMBER_NEXT_TOKEN,
         102  +
    ],
         103  +
)
         104  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         105  +
.with_original_name("DescribePatchPropertiesRequest");
         106  +
impl DescribePatchPropertiesInput {
         107  +
    /// The schema for this shape.
         108  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEPATCHPROPERTIESINPUT_SCHEMA;
         109  +
}
         110  +
impl ::aws_smithy_schema::serde::SerializableStruct for DescribePatchPropertiesInput {
         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.operating_system {
         117  +
            ser.write_string(&DESCRIBEPATCHPROPERTIESINPUT_MEMBER_OPERATING_SYSTEM, val.as_str())?;
         118  +
        }
         119  +
        if let Some(ref val) = self.property {
         120  +
            ser.write_string(&DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PROPERTY, val.as_str())?;
         121  +
        }
         122  +
        if let Some(ref val) = self.patch_set {
         123  +
            ser.write_string(&DESCRIBEPATCHPROPERTIESINPUT_MEMBER_PATCH_SET, val.as_str())?;
         124  +
        }
         125  +
        if let Some(ref val) = self.max_results {
         126  +
            ser.write_integer(&DESCRIBEPATCHPROPERTIESINPUT_MEMBER_MAX_RESULTS, *val)?;
         127  +
        }
         128  +
        if let Some(ref val) = self.next_token {
         129  +
            ser.write_string(&DESCRIBEPATCHPROPERTIESINPUT_MEMBER_NEXT_TOKEN, val)?;
         130  +
        }
         131  +
        Ok(())
         132  +
    }
         133  +
}
         134  +
impl DescribePatchPropertiesInput {
         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(&DESCRIBEPATCHPROPERTIESINPUT_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.operating_system = Some(crate::types::OperatingSystem::from(deser.read_string(member)?.as_str()));
         155  +
                    }
         156  +
                }
         157  +
                Some(1) => {
         158  +
                    if deser.is_null() {
         159  +
                        deser.read_null()?;
         160  +
                    } else {
         161  +
                        builder.property = Some(crate::types::PatchProperty::from(deser.read_string(member)?.as_str()));
         162  +
                    }
         163  +
                }
         164  +
                Some(2) => {
         165  +
                    if deser.is_null() {
         166  +
                        deser.read_null()?;
         167  +
                    } else {
         168  +
                        builder.patch_set = Some(crate::types::PatchSet::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.max_results = Some(deser.read_integer(member)?);
         176  +
                    }
         177  +
                }
         178  +
                Some(4) => {
         179  +
                    if deser.is_null() {
         180  +
                        deser.read_null()?;
         181  +
                    } else {
         182  +
                        builder.next_token = Some(deser.read_string(member)?);
         183  +
                    }
         184  +
                }
         185  +
                _ => {}
         186  +
            }
         187  +
            Ok(())
         188  +
        })?;
         189  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         190  +
    }
         191  +
}
         192  +
impl DescribePatchPropertiesInput {
         193  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         194  +
    pub fn deserialize_with_response(
         195  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         196  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         197  +
        _status: u16,
         198  +
        _body: &[u8],
         199  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         200  +
        Self::deserialize(deserializer)
         201  +
    }
         202  +
}
         203  +
impl DescribePatchPropertiesInput {
         204  +
    /// Creates a new builder-style object to manufacture [`DescribePatchPropertiesInput`](crate::operation::describe_patch_properties::DescribePatchPropertiesInput).
         205  +
    pub fn builder() -> crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder {
         206  +
        crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder::default()
         207  +
    }
         208  +
}
         209  +
         210  +
/// A builder for [`DescribePatchPropertiesInput`](crate::operation::describe_patch_properties::DescribePatchPropertiesInput).
         211  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         212  +
#[non_exhaustive]
         213  +
pub struct DescribePatchPropertiesInputBuilder {
         214  +
    pub(crate) operating_system: ::std::option::Option<crate::types::OperatingSystem>,
         215  +
    pub(crate) property: ::std::option::Option<crate::types::PatchProperty>,
         216  +
    pub(crate) patch_set: ::std::option::Option<crate::types::PatchSet>,
         217  +
    pub(crate) max_results: ::std::option::Option<i32>,
         218  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         219  +
}
         220  +
impl DescribePatchPropertiesInputBuilder {
         221  +
    /// <p>The operating system type for which to list patches.</p>
         222  +
    /// This field is required.
         223  +
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
         224  +
        self.operating_system = ::std::option::Option::Some(input);
         225  +
        self
         226  +
    }
         227  +
    /// <p>The operating system type for which to list patches.</p>
         228  +
    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
         229  +
        self.operating_system = input;
         230  +
        self
         231  +
    }
         232  +
    /// <p>The operating system type for which to list patches.</p>
         233  +
    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
         234  +
        &self.operating_system
         235  +
    }
         236  +
    /// <p>The patch property for which you want to view patch details.</p>
         237  +
    /// This field is required.
         238  +
    pub fn property(mut self, input: crate::types::PatchProperty) -> Self {
         239  +
        self.property = ::std::option::Option::Some(input);
         240  +
        self
         241  +
    }
         242  +
    /// <p>The patch property for which you want to view patch details.</p>
         243  +
    pub fn set_property(mut self, input: ::std::option::Option<crate::types::PatchProperty>) -> Self {
         244  +
        self.property = input;
         245  +
        self
         246  +
    }
         247  +
    /// <p>The patch property for which you want to view patch details.</p>
         248  +
    pub fn get_property(&self) -> &::std::option::Option<crate::types::PatchProperty> {
         249  +
        &self.property
         250  +
    }
         251  +
    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
         252  +
    pub fn patch_set(mut self, input: crate::types::PatchSet) -> Self {
         253  +
        self.patch_set = ::std::option::Option::Some(input);
         254  +
        self
         255  +
    }
         256  +
    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
         257  +
    pub fn set_patch_set(mut self, input: ::std::option::Option<crate::types::PatchSet>) -> Self {
         258  +
        self.patch_set = input;
         259  +
        self
         260  +
    }
         261  +
    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
         262  +
    pub fn get_patch_set(&self) -> &::std::option::Option<crate::types::PatchSet> {
         263  +
        &self.patch_set
         264  +
    }
         265  +
    /// <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>
         266  +
    pub fn max_results(mut self, input: i32) -> Self {
         267  +
        self.max_results = ::std::option::Option::Some(input);
         268  +
        self
         269  +
    }
         270  +
    /// <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>
         271  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         272  +
        self.max_results = input;
         273  +
        self
         274  +
    }
         275  +
    /// <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>
         276  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         277  +
        &self.max_results
         278  +
    }
         279  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         280  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         281  +
        self.next_token = ::std::option::Option::Some(input.into());
         282  +
        self
         283  +
    }
         284  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         285  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         286  +
        self.next_token = input;
         287  +
        self
         288  +
    }
         289  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         290  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         291  +
        &self.next_token
         292  +
    }
         293  +
    /// Consumes the builder and constructs a [`DescribePatchPropertiesInput`](crate::operation::describe_patch_properties::DescribePatchPropertiesInput).
         294  +
    pub fn build(
         295  +
        self,
         296  +
    ) -> ::std::result::Result<
         297  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesInput,
         298  +
        ::aws_smithy_types::error::operation::BuildError,
         299  +
    > {
         300  +
        ::std::result::Result::Ok(crate::operation::describe_patch_properties::DescribePatchPropertiesInput {
         301  +
            operating_system: self.operating_system,
         302  +
            property: self.property,
         303  +
            patch_set: self.patch_set,
         304  +
            max_results: self.max_results,
         305  +
            next_token: self.next_token,
         306  +
        })
         307  +
    }
         308  +
}