AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,273 @@
           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 DescribeParametersOutput {
           6  +
    /// <p>Parameters returned by the request.</p>
           7  +
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMetadata>>,
           8  +
    /// <p>The token to use when requesting the next set of items.</p>
           9  +
    pub next_token: ::std::option::Option<::std::string::String>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl DescribeParametersOutput {
          13  +
    /// <p>Parameters returned by the request.</p>
          14  +
    ///
          15  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
          16  +
    pub fn parameters(&self) -> &[crate::types::ParameterMetadata] {
          17  +
        self.parameters.as_deref().unwrap_or_default()
          18  +
    }
          19  +
    /// <p>The token to use when requesting the next set of items.</p>
          20  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          21  +
        self.next_token.as_deref()
          22  +
    }
          23  +
}
          24  +
static DESCRIBEPARAMETERSOUTPUT_MEMBER_PARAMETERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          25  +
    ::aws_smithy_schema::ShapeId::from_parts(
          26  +
        "com.amazonaws.ssm#ParameterMetadataList$member",
          27  +
        "com.amazonaws.ssm",
          28  +
        "ParameterMetadataList",
          29  +
    ),
          30  +
    ::aws_smithy_schema::ShapeType::Structure,
          31  +
    "member",
          32  +
    0,
          33  +
);
          34  +
static DESCRIBEPARAMETERSOUTPUT_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts(
          36  +
        "com.amazonaws.ssm.synthetic#DescribeParametersOutput$Parameters",
          37  +
        "com.amazonaws.ssm.synthetic",
          38  +
        "DescribeParametersOutput",
          39  +
    ),
          40  +
    ::aws_smithy_schema::ShapeType::List,
          41  +
    "Parameters",
          42  +
    0,
          43  +
)
          44  +
.with_list_member(&DESCRIBEPARAMETERSOUTPUT_MEMBER_PARAMETERS_MEMBER);
          45  +
static DESCRIBEPARAMETERSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm.synthetic#DescribeParametersOutput$NextToken",
          48  +
        "com.amazonaws.ssm.synthetic",
          49  +
        "DescribeParametersOutput",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "NextToken",
          53  +
    1,
          54  +
);
          55  +
static DESCRIBEPARAMETERSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          57  +
    ::aws_smithy_schema::ShapeType::String,
          58  +
    "request_id",
          59  +
    2,
          60  +
)
          61  +
.with_http_header("x-amzn-requestid");
          62  +
static DESCRIBEPARAMETERSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm.synthetic#DescribeParametersOutput",
          65  +
        "com.amazonaws.ssm.synthetic",
          66  +
        "DescribeParametersOutput",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::Structure,
          69  +
    &[
          70  +
        &DESCRIBEPARAMETERSOUTPUT_MEMBER_PARAMETERS,
          71  +
        &DESCRIBEPARAMETERSOUTPUT_MEMBER_NEXT_TOKEN,
          72  +
        &DESCRIBEPARAMETERSOUTPUT_MEMBER__REQUEST_ID,
          73  +
    ],
          74  +
)
          75  +
.with_original_name("DescribeParametersResult");
          76  +
impl DescribeParametersOutput {
          77  +
    /// The schema for this shape.
          78  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEPARAMETERSOUTPUT_SCHEMA;
          79  +
}
          80  +
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeParametersOutput {
          81  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          82  +
    fn serialize_members(
          83  +
        &self,
          84  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          85  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          86  +
        if let Some(ref val) = self.parameters {
          87  +
            ser.write_list(
          88  +
                &DESCRIBEPARAMETERSOUTPUT_MEMBER_PARAMETERS,
          89  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          90  +
                    for item in val {
          91  +
                        ser.write_struct(crate::types::ParameterMetadata::SCHEMA, item)?;
          92  +
                    }
          93  +
                    Ok(())
          94  +
                },
          95  +
            )?;
          96  +
        }
          97  +
        if let Some(ref val) = self.next_token {
          98  +
            ser.write_string(&DESCRIBEPARAMETERSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
          99  +
        }
         100  +
        Ok(())
         101  +
    }
         102  +
}
         103  +
impl DescribeParametersOutput {
         104  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         105  +
    pub fn deserialize(
         106  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        #[allow(
         111  +
            unused_variables,
         112  +
            unreachable_code,
         113  +
            clippy::single_match,
         114  +
            clippy::match_single_binding,
         115  +
            clippy::diverging_sub_expression
         116  +
        )]
         117  +
        deserializer.read_struct(&DESCRIBEPARAMETERSOUTPUT_SCHEMA, &mut |member, deser| {
         118  +
            match member.member_index() {
         119  +
                Some(0) => {
         120  +
                    if deser.is_null() {
         121  +
                        deser.read_null()?;
         122  +
                    } else {
         123  +
                        builder.parameters = Some({
         124  +
                            let mut container = Vec::new();
         125  +
                            deser.read_list(member, &mut |deser| {
         126  +
                                container.push(crate::types::ParameterMetadata::deserialize(deser)?);
         127  +
                                Ok(())
         128  +
                            })?;
         129  +
                            container
         130  +
                        });
         131  +
                    }
         132  +
                }
         133  +
                Some(1) => {
         134  +
                    if deser.is_null() {
         135  +
                        deser.read_null()?;
         136  +
                    } else {
         137  +
                        builder.next_token = Some(deser.read_string(member)?);
         138  +
                    }
         139  +
                }
         140  +
                Some(2) => {
         141  +
                    builder._request_id = Some(deser.read_string(member)?);
         142  +
                }
         143  +
                _ => {}
         144  +
            }
         145  +
            Ok(())
         146  +
        })?;
         147  +
        Ok(builder.build())
         148  +
    }
         149  +
}
         150  +
impl DescribeParametersOutput {
         151  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         152  +
    /// Header-bound members are read directly from headers, avoiding runtime
         153  +
    /// member iteration overhead. Body members are read via the deserializer.
         154  +
    pub fn deserialize_with_response(
         155  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         156  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         157  +
        _status: u16,
         158  +
        _body: &[u8],
         159  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         160  +
        #[allow(unused_variables, unused_mut)]
         161  +
        let mut builder = Self::builder();
         162  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         163  +
            builder._request_id = Some(val.to_string());
         164  +
        }
         165  +
         166  +
        #[allow(
         167  +
            unused_variables,
         168  +
            unreachable_code,
         169  +
            clippy::single_match,
         170  +
            clippy::match_single_binding,
         171  +
            clippy::diverging_sub_expression
         172  +
        )]
         173  +
        deserializer.read_struct(&DESCRIBEPARAMETERSOUTPUT_SCHEMA, &mut |member, deser| {
         174  +
            match member.member_index() {
         175  +
                Some(0) => {
         176  +
                    builder.parameters = Some({
         177  +
                        let mut container = Vec::new();
         178  +
                        deser.read_list(member, &mut |deser| {
         179  +
                            container.push(crate::types::ParameterMetadata::deserialize(deser)?);
         180  +
                            Ok(())
         181  +
                        })?;
         182  +
                        container
         183  +
                    });
         184  +
                }
         185  +
                Some(1) => {
         186  +
                    builder.next_token = Some(deser.read_string(member)?);
         187  +
                }
         188  +
                _ => {}
         189  +
            }
         190  +
            Ok(())
         191  +
        })?;
         192  +
        Ok(builder.build())
         193  +
    }
         194  +
}
         195  +
impl ::aws_types::request_id::RequestId for DescribeParametersOutput {
         196  +
    fn request_id(&self) -> Option<&str> {
         197  +
        self._request_id.as_deref()
         198  +
    }
         199  +
}
         200  +
impl DescribeParametersOutput {
         201  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         202  +
        self._request_id = request_id;
         203  +
        self
         204  +
    }
         205  +
}
         206  +
impl DescribeParametersOutput {
         207  +
    /// Creates a new builder-style object to manufacture [`DescribeParametersOutput`](crate::operation::describe_parameters::DescribeParametersOutput).
         208  +
    pub fn builder() -> crate::operation::describe_parameters::builders::DescribeParametersOutputBuilder {
         209  +
        crate::operation::describe_parameters::builders::DescribeParametersOutputBuilder::default()
         210  +
    }
         211  +
}
         212  +
         213  +
/// A builder for [`DescribeParametersOutput`](crate::operation::describe_parameters::DescribeParametersOutput).
         214  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         215  +
#[non_exhaustive]
         216  +
pub struct DescribeParametersOutputBuilder {
         217  +
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMetadata>>,
         218  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         219  +
    _request_id: Option<String>,
         220  +
}
         221  +
impl DescribeParametersOutputBuilder {
         222  +
    /// Appends an item to `parameters`.
         223  +
    ///
         224  +
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
         225  +
    ///
         226  +
    /// <p>Parameters returned by the request.</p>
         227  +
    pub fn parameters(mut self, input: crate::types::ParameterMetadata) -> Self {
         228  +
        let mut v = self.parameters.unwrap_or_default();
         229  +
        v.push(input);
         230  +
        self.parameters = ::std::option::Option::Some(v);
         231  +
        self
         232  +
    }
         233  +
    /// <p>Parameters returned by the request.</p>
         234  +
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMetadata>>) -> Self {
         235  +
        self.parameters = input;
         236  +
        self
         237  +
    }
         238  +
    /// <p>Parameters returned by the request.</p>
         239  +
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterMetadata>> {
         240  +
        &self.parameters
         241  +
    }
         242  +
    /// <p>The token to use when requesting the next set of items.</p>
         243  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         244  +
        self.next_token = ::std::option::Option::Some(input.into());
         245  +
        self
         246  +
    }
         247  +
    /// <p>The token to use when requesting the next set of items.</p>
         248  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         249  +
        self.next_token = input;
         250  +
        self
         251  +
    }
         252  +
    /// <p>The token to use when requesting the next set of items.</p>
         253  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         254  +
        &self.next_token
         255  +
    }
         256  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         257  +
        self._request_id = Some(request_id.into());
         258  +
        self
         259  +
    }
         260  +
         261  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         262  +
        self._request_id = request_id;
         263  +
        self
         264  +
    }
         265  +
    /// Consumes the builder and constructs a [`DescribeParametersOutput`](crate::operation::describe_parameters::DescribeParametersOutput).
         266  +
    pub fn build(self) -> crate::operation::describe_parameters::DescribeParametersOutput {
         267  +
        crate::operation::describe_parameters::DescribeParametersOutput {
         268  +
            parameters: self.parameters,
         269  +
            next_token: self.next_token,
         270  +
            _request_id: self._request_id,
         271  +
        }
         272  +
    }
         273  +
}

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

@@ -0,1 +0,210 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_parameters::_describe_parameters_input::DescribeParametersInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_parameters::_describe_parameters_output::DescribeParametersOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_parameters::builders::DescribeParametersInputBuilder {
           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_parameters::DescribeParametersOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_parameters::DescribeParametersError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_parameters();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeParameters`.
          24  +
///
          25  +
/// <p>Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html#systemsmanager-DescribeParameters-request-Shared">Shared</a> option.</p>
          26  +
/// <p>Request results are returned on a best-effort basis. If you specify <code>MaxResults</code> in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of <code>MaxResults</code>. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a <code>NextToken</code>. You can specify the <code>NextToken</code> in a subsequent call to get the next set of results.</p>
          27  +
/// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p><important>
          28  +
/// <p>If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, <code>DescribeParameters</code> retrieves whatever the original key alias was referencing.</p>
          29  +
/// </important>
          30  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
pub struct DescribeParametersFluentBuilder {
          32  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          33  +
    inner: crate::operation::describe_parameters::builders::DescribeParametersInputBuilder,
          34  +
    config_override: ::std::option::Option<crate::config::Builder>,
          35  +
}
          36  +
impl
          37  +
    crate::client::customize::internal::CustomizableSend<
          38  +
        crate::operation::describe_parameters::DescribeParametersOutput,
          39  +
        crate::operation::describe_parameters::DescribeParametersError,
          40  +
    > for DescribeParametersFluentBuilder
          41  +
{
          42  +
    fn send(
          43  +
        self,
          44  +
        config_override: crate::config::Builder,
          45  +
    ) -> crate::client::customize::internal::BoxFuture<
          46  +
        crate::client::customize::internal::SendResult<
          47  +
            crate::operation::describe_parameters::DescribeParametersOutput,
          48  +
            crate::operation::describe_parameters::DescribeParametersError,
          49  +
        >,
          50  +
    > {
          51  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          52  +
    }
          53  +
}
          54  +
impl DescribeParametersFluentBuilder {
          55  +
    /// Creates a new `DescribeParametersFluentBuilder`.
          56  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          57  +
        Self {
          58  +
            handle,
          59  +
            inner: ::std::default::Default::default(),
          60  +
            config_override: ::std::option::Option::None,
          61  +
        }
          62  +
    }
          63  +
    /// Access the DescribeParameters as a reference.
          64  +
    pub fn as_input(&self) -> &crate::operation::describe_parameters::builders::DescribeParametersInputBuilder {
          65  +
        &self.inner
          66  +
    }
          67  +
    /// Sends the request and returns the response.
          68  +
    ///
          69  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          70  +
    /// can be matched against.
          71  +
    ///
          72  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          73  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          74  +
    /// set when configuring the client.
          75  +
    pub async fn send(
          76  +
        self,
          77  +
    ) -> ::std::result::Result<
          78  +
        crate::operation::describe_parameters::DescribeParametersOutput,
          79  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          80  +
            crate::operation::describe_parameters::DescribeParametersError,
          81  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          82  +
        >,
          83  +
    > {
          84  +
        let input = self
          85  +
            .inner
          86  +
            .build()
          87  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          88  +
        let runtime_plugins = crate::operation::describe_parameters::DescribeParameters::operation_runtime_plugins(
          89  +
            self.handle.runtime_plugins.clone(),
          90  +
            &self.handle.conf,
          91  +
            self.config_override,
          92  +
        );
          93  +
        crate::operation::describe_parameters::DescribeParameters::orchestrate(&runtime_plugins, input).await
          94  +
    }
          95  +
          96  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          97  +
    pub fn customize(
          98  +
        self,
          99  +
    ) -> crate::client::customize::CustomizableOperation<
         100  +
        crate::operation::describe_parameters::DescribeParametersOutput,
         101  +
        crate::operation::describe_parameters::DescribeParametersError,
         102  +
        Self,
         103  +
    > {
         104  +
        crate::client::customize::CustomizableOperation::new(self)
         105  +
    }
         106  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         107  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         108  +
        self
         109  +
    }
         110  +
         111  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         112  +
        self.config_override = config_override;
         113  +
        self
         114  +
    }
         115  +
    /// Create a paginator for this request
         116  +
    ///
         117  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_parameters::paginator::DescribeParametersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         118  +
    pub fn into_paginator(self) -> crate::operation::describe_parameters::paginator::DescribeParametersPaginator {
         119  +
        crate::operation::describe_parameters::paginator::DescribeParametersPaginator::new(self.handle, self.inner)
         120  +
    }
         121  +
    ///
         122  +
    /// Appends an item to `Filters`.
         123  +
    ///
         124  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         125  +
    ///
         126  +
    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
         127  +
    pub fn filters(mut self, input: crate::types::ParametersFilter) -> Self {
         128  +
        self.inner = self.inner.filters(input);
         129  +
        self
         130  +
    }
         131  +
    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
         132  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>>) -> Self {
         133  +
        self.inner = self.inner.set_filters(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
         137  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>> {
         138  +
        self.inner.get_filters()
         139  +
    }
         140  +
    ///
         141  +
    /// Appends an item to `ParameterFilters`.
         142  +
    ///
         143  +
    /// To override the contents of this collection use [`set_parameter_filters`](Self::set_parameter_filters).
         144  +
    ///
         145  +
    /// <p>Filters to limit the request results.</p>
         146  +
    pub fn parameter_filters(mut self, input: crate::types::ParameterStringFilter) -> Self {
         147  +
        self.inner = self.inner.parameter_filters(input);
         148  +
        self
         149  +
    }
         150  +
    /// <p>Filters to limit the request results.</p>
         151  +
    pub fn set_parameter_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>) -> Self {
         152  +
        self.inner = self.inner.set_parameter_filters(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>Filters to limit the request results.</p>
         156  +
    pub fn get_parameter_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>> {
         157  +
        self.inner.get_parameter_filters()
         158  +
    }
         159  +
    /// <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>
         160  +
    pub fn max_results(mut self, input: i32) -> Self {
         161  +
        self.inner = self.inner.max_results(input);
         162  +
        self
         163  +
    }
         164  +
    /// <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>
         165  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         166  +
        self.inner = self.inner.set_max_results(input);
         167  +
        self
         168  +
    }
         169  +
    /// <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>
         170  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         171  +
        self.inner.get_max_results()
         172  +
    }
         173  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         174  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         175  +
        self.inner = self.inner.next_token(input.into());
         176  +
        self
         177  +
    }
         178  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         179  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         180  +
        self.inner = self.inner.set_next_token(input);
         181  +
        self
         182  +
    }
         183  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         184  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         185  +
        self.inner.get_next_token()
         186  +
    }
         187  +
    /// <p>Lists parameters that are shared with you.</p><note>
         188  +
    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
         189  +
    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         190  +
    /// </note>
         191  +
    pub fn shared(mut self, input: bool) -> Self {
         192  +
        self.inner = self.inner.shared(input);
         193  +
        self
         194  +
    }
         195  +
    /// <p>Lists parameters that are shared with you.</p><note>
         196  +
    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
         197  +
    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         198  +
    /// </note>
         199  +
    pub fn set_shared(mut self, input: ::std::option::Option<bool>) -> Self {
         200  +
        self.inner = self.inner.set_shared(input);
         201  +
        self
         202  +
    }
         203  +
    /// <p>Lists parameters that are shared with you.</p><note>
         204  +
    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
         205  +
    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         206  +
    /// </note>
         207  +
    pub fn get_shared(&self) -> &::std::option::Option<bool> {
         208  +
        self.inner.get_shared()
         209  +
    }
         210  +
}

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

@@ -0,1 +0,109 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeParameters`](crate::operation::describe_parameters::DescribeParameters)
           3  +
pub struct DescribeParametersPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_parameters::builders::DescribeParametersInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeParametersPaginator {
          10  +
    /// Create a new paginator-wrapper
          11  +
    pub(crate) fn new(
          12  +
        handle: std::sync::Arc<crate::client::Handle>,
          13  +
        builder: crate::operation::describe_parameters::builders::DescribeParametersInputBuilder,
          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  +
    /// Stop paginating when the service returns the same pagination token twice in a row.
          31  +
    ///
          32  +
    /// Defaults to true.
          33  +
    ///
          34  +
    /// For certain operations, it may be useful to continue on duplicate token. For example,
          35  +
    /// if an operation is for tailing a log file in real-time, then continuing may be desired.
          36  +
    /// This option can be set to `false` to accommodate these use cases.
          37  +
    pub fn stop_on_duplicate_token(mut self, stop_on_duplicate_token: bool) -> Self {
          38  +
        self.stop_on_duplicate_token = stop_on_duplicate_token;
          39  +
        self
          40  +
    }
          41  +
          42  +
    /// Create the pagination stream
          43  +
    ///
          44  +
    /// _Note:_ No requests will be dispatched until the stream is used
          45  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
          46  +
    pub fn send(
          47  +
        self,
          48  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
          49  +
        ::std::result::Result<
          50  +
            crate::operation::describe_parameters::DescribeParametersOutput,
          51  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          52  +
                crate::operation::describe_parameters::DescribeParametersError,
          53  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          54  +
            >,
          55  +
        >,
          56  +
    > {
          57  +
        // Move individual fields out of self for the borrow checker
          58  +
        let builder = self.builder;
          59  +
        let handle = self.handle;
          60  +
        let runtime_plugins = crate::operation::describe_parameters::DescribeParameters::operation_runtime_plugins(
          61  +
            handle.runtime_plugins.clone(),
          62  +
            &handle.conf,
          63  +
            ::std::option::Option::None,
          64  +
        )
          65  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          66  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          67  +
            move |tx| {
          68  +
                ::std::boxed::Box::pin(async move {
          69  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          70  +
                    let mut input = match builder
          71  +
                        .build()
          72  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          73  +
                    {
          74  +
                        ::std::result::Result::Ok(input) => input,
          75  +
                        ::std::result::Result::Err(e) => {
          76  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          77  +
                            return;
          78  +
                        }
          79  +
                    };
          80  +
                    loop {
          81  +
                        let resp = crate::operation::describe_parameters::DescribeParameters::orchestrate(&runtime_plugins, input.clone()).await;
          82  +
                        // If the input member is None or it was an error
          83  +
                        let done = match resp {
          84  +
                            ::std::result::Result::Ok(ref resp) => {
          85  +
                                let new_token = crate::lens::reflens_describe_parameters_output_output_next_token(resp);
          86  +
                                // Pagination is exhausted when the next token is an empty string
          87  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          88  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          89  +
                                    true
          90  +
                                } else {
          91  +
                                    input.next_token = new_token.cloned();
          92  +
                                    is_empty
          93  +
                                }
          94  +
                            }
          95  +
                            ::std::result::Result::Err(_) => true,
          96  +
                        };
          97  +
                        if tx.send(resp).await.is_err() {
          98  +
                            // receiving end was dropped
          99  +
                            return;
         100  +
                        }
         101  +
                        if done {
         102  +
                            return;
         103  +
                        }
         104  +
                    }
         105  +
                })
         106  +
            },
         107  +
        ))
         108  +
    }
         109  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/describe_patch_baselines.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 `DescribePatchBaselines`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct DescribePatchBaselines;
           6  +
impl DescribePatchBaselines {
           7  +
    /// Creates a new `DescribePatchBaselines`
           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_baselines::DescribePatchBaselinesInput::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_baselines::DescribePatchBaselinesOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::describe_patch_baselines::DescribePatchBaselinesInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::describe_patch_baselines::DescribePatchBaselinesOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::describe_patch_baselines::DescribePatchBaselinesError,
          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_baselines::DescribePatchBaselinesError>()
          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_baselines::DescribePatchBaselinesOutput>()
          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_baselines::DescribePatchBaselinesInput,
          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", "DescribePatchBaselines", 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.DescribePatchBaselines",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "DescribePatchBaselines",
          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 DescribePatchBaselines {
         117  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         118  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DescribePatchBaselines");
         119  +
         120  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         121  +
            DescribePatchBaselinesRequestSerializer,
         122  +
        ));
         123  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         124  +
            DescribePatchBaselinesResponseDeserializer,
         125  +
        ));
         126  +
         127  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         128  +
            crate::config::auth::Params::builder()
         129  +
                .operation_name("DescribePatchBaselines")
         130  +
                .build()
         131  +
                .expect("required fields set"),
         132  +
        ));
         133  +
         134  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         135  +
            "DescribePatchBaselines",
         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("DescribePatchBaselines")
         158  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         159  +
                DescribePatchBaselinesTelemetryInputCaptureInterceptor,
         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  +
                DescribePatchBaselinesEndpointParamsInterceptor,
         166  +
            ))
         167  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         168  +
                crate::operation::describe_patch_baselines::DescribePatchBaselinesError,
         169  +
            >::new())
         170  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         171  +
                crate::operation::describe_patch_baselines::DescribePatchBaselinesError,
         172  +
            >::new())
         173  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         174  +
                crate::operation::describe_patch_baselines::DescribePatchBaselinesError,
         175  +
            >::new())
         176  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         177  +
                crate::operation::describe_patch_baselines::DescribePatchBaselinesError,
         178  +
            >::new());
         179  +
         180  +
        ::std::borrow::Cow::Owned(rcb)
         181  +
    }
         182  +
}
         183  +
         184  +
#[derive(Debug)]
         185  +
struct DescribePatchBaselinesTelemetryInputCaptureInterceptor;
         186  +
         187  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         188  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribePatchBaselinesTelemetryInputCaptureInterceptor {
         189  +
    fn name(&self) -> &'static str {
         190  +
        "DescribePatchBaselinesTelemetryInputCaptureInterceptor"
         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::<DescribePatchBaselinesInput>() 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 DescribePatchBaselinesResponseDeserializer;
         229  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribePatchBaselinesResponseDeserializer {
         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_baselines::DescribePatchBaselinesError::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_baselines::DescribePatchBaselinesError::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_baselines::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_baselines::DescribePatchBaselinesError 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_baselines::DescribePatchBaselinesError::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, DescribePatchBaselines::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_baselines::DescribePatchBaselinesOutput::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 DescribePatchBaselinesRequestSerializer;
         346  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribePatchBaselinesRequestSerializer {
         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_baselines::DescribePatchBaselinesInput>()
         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, DescribePatchBaselines::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 DescribePatchBaselinesEndpointParamsInterceptor;
         369  +
         370  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         371  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribePatchBaselinesEndpointParamsInterceptor {
         372  +
    fn name(&self) -> &'static str {
         373  +
        "DescribePatchBaselinesEndpointParamsInterceptor"
         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::<DescribePatchBaselinesInput>()
         389  +
            .ok_or("failed to downcast to DescribePatchBaselinesInput")?;
         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 `DescribePatchBaselinesError` operation.
         410  +
#[non_exhaustive]
         411  +
#[derive(::std::fmt::Debug)]
         412  +
pub enum DescribePatchBaselinesError {
         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-DescribePatchBaselinesError) for what information is available for the error.")]
         422  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         423  +
}
         424  +
impl DescribePatchBaselinesError {
         425  +
    /// Creates the `DescribePatchBaselinesError::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 `DescribePatchBaselinesError::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 `DescribePatchBaselinesError::InternalServerError`.
         453  +
    pub fn is_internal_server_error(&self) -> bool {
         454  +
        matches!(self, Self::InternalServerError(_))
         455  +
    }
         456  +
}
         457  +
impl ::std::error::Error for DescribePatchBaselinesError {
         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 DescribePatchBaselinesError {
         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 DescribePatchBaselinesError {
         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 DescribePatchBaselinesError {
         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 DescribePatchBaselinesError {
         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_baselines::DescribePatchBaselinesError {
         507  +
    fn request_id(&self) -> Option<&str> {
         508  +
        self.meta().request_id()
         509  +
    }
         510  +
}
         511  +
         512  +
pub use crate::operation::describe_patch_baselines::_describe_patch_baselines_input::DescribePatchBaselinesInput;
         513  +
         514  +
pub use crate::operation::describe_patch_baselines::_describe_patch_baselines_output::DescribePatchBaselinesOutput;
         515  +
         516  +
mod _describe_patch_baselines_input;
         517  +
         518  +
mod _describe_patch_baselines_output;
         519  +
         520  +
/// Builders
         521  +
pub mod builders;
         522  +
         523  +
/// Paginator for this operation
         524  +
pub mod paginator;