AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

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

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

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

@@ -0,1 +0,256 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_patch_properties::_describe_patch_properties_input::DescribePatchPropertiesInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_patch_properties::_describe_patch_properties_output::DescribePatchPropertiesOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder {
           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_properties::DescribePatchPropertiesOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_patch_properties();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribePatchProperties`.
          24  +
///
          25  +
/// <p>Lists the properties of available patches organized by product, product family, classification, severity, and other properties of available patches. You can use the reported properties in the filters you specify in requests for operations such as <code>CreatePatchBaseline</code>, <code>UpdatePatchBaseline</code>, <code>DescribeAvailablePatches</code>, and <code>DescribePatchBaselines</code>.</p>
          26  +
/// <p>The following section lists the properties that can be used in filters for each major operating system type:</p>
          27  +
/// <dl>
          28  +
/// <dt>
          29  +
/// AMAZON_LINUX
          30  +
/// </dt>
          31  +
/// <dd>
          32  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          33  +
/// </dd>
          34  +
/// <dt>
          35  +
/// AMAZON_LINUX_2
          36  +
/// </dt>
          37  +
/// <dd>
          38  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          39  +
/// </dd>
          40  +
/// <dt>
          41  +
/// AMAZON_LINUX_2023
          42  +
/// </dt>
          43  +
/// <dd>
          44  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          45  +
/// </dd>
          46  +
/// <dt>
          47  +
/// CENTOS
          48  +
/// </dt>
          49  +
/// <dd>
          50  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          51  +
/// </dd>
          52  +
/// <dt>
          53  +
/// DEBIAN
          54  +
/// </dt>
          55  +
/// <dd>
          56  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>PRIORITY</code></p>
          57  +
/// </dd>
          58  +
/// <dt>
          59  +
/// MACOS
          60  +
/// </dt>
          61  +
/// <dd>
          62  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code></p>
          63  +
/// </dd>
          64  +
/// <dt>
          65  +
/// ORACLE_LINUX
          66  +
/// </dt>
          67  +
/// <dd>
          68  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          69  +
/// </dd>
          70  +
/// <dt>
          71  +
/// REDHAT_ENTERPRISE_LINUX
          72  +
/// </dt>
          73  +
/// <dd>
          74  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          75  +
/// </dd>
          76  +
/// <dt>
          77  +
/// SUSE
          78  +
/// </dt>
          79  +
/// <dd>
          80  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
          81  +
/// </dd>
          82  +
/// <dt>
          83  +
/// UBUNTU
          84  +
/// </dt>
          85  +
/// <dd>
          86  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>PRIORITY</code></p>
          87  +
/// </dd>
          88  +
/// <dt>
          89  +
/// WINDOWS
          90  +
/// </dt>
          91  +
/// <dd>
          92  +
/// <p>Valid properties: <code>PRODUCT</code> | <code>PRODUCT_FAMILY</code> | <code>CLASSIFICATION</code> | <code>MSRC_SEVERITY</code></p>
          93  +
/// </dd>
          94  +
/// </dl>
          95  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          96  +
pub struct DescribePatchPropertiesFluentBuilder {
          97  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          98  +
    inner: crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder,
          99  +
    config_override: ::std::option::Option<crate::config::Builder>,
         100  +
}
         101  +
impl
         102  +
    crate::client::customize::internal::CustomizableSend<
         103  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
         104  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesError,
         105  +
    > for DescribePatchPropertiesFluentBuilder
         106  +
{
         107  +
    fn send(
         108  +
        self,
         109  +
        config_override: crate::config::Builder,
         110  +
    ) -> crate::client::customize::internal::BoxFuture<
         111  +
        crate::client::customize::internal::SendResult<
         112  +
            crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
         113  +
            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
         114  +
        >,
         115  +
    > {
         116  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
         117  +
    }
         118  +
}
         119  +
impl DescribePatchPropertiesFluentBuilder {
         120  +
    /// Creates a new `DescribePatchPropertiesFluentBuilder`.
         121  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
         122  +
        Self {
         123  +
            handle,
         124  +
            inner: ::std::default::Default::default(),
         125  +
            config_override: ::std::option::Option::None,
         126  +
        }
         127  +
    }
         128  +
    /// Access the DescribePatchProperties as a reference.
         129  +
    pub fn as_input(&self) -> &crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder {
         130  +
        &self.inner
         131  +
    }
         132  +
    /// Sends the request and returns the response.
         133  +
    ///
         134  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
         135  +
    /// can be matched against.
         136  +
    ///
         137  +
    /// By default, any retryable failures will be retried twice. Retry behavior
         138  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
         139  +
    /// set when configuring the client.
         140  +
    pub async fn send(
         141  +
        self,
         142  +
    ) -> ::std::result::Result<
         143  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
         144  +
        ::aws_smithy_runtime_api::client::result::SdkError<
         145  +
            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
         146  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        >,
         148  +
    > {
         149  +
        let input = self
         150  +
            .inner
         151  +
            .build()
         152  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
         153  +
        let runtime_plugins = crate::operation::describe_patch_properties::DescribePatchProperties::operation_runtime_plugins(
         154  +
            self.handle.runtime_plugins.clone(),
         155  +
            &self.handle.conf,
         156  +
            self.config_override,
         157  +
        );
         158  +
        crate::operation::describe_patch_properties::DescribePatchProperties::orchestrate(&runtime_plugins, input).await
         159  +
    }
         160  +
         161  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
         162  +
    pub fn customize(
         163  +
        self,
         164  +
    ) -> crate::client::customize::CustomizableOperation<
         165  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
         166  +
        crate::operation::describe_patch_properties::DescribePatchPropertiesError,
         167  +
        Self,
         168  +
    > {
         169  +
        crate::client::customize::CustomizableOperation::new(self)
         170  +
    }
         171  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         172  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         173  +
        self
         174  +
    }
         175  +
         176  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         177  +
        self.config_override = config_override;
         178  +
        self
         179  +
    }
         180  +
    /// Create a paginator for this request
         181  +
    ///
         182  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         183  +
    pub fn into_paginator(self) -> crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator {
         184  +
        crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator::new(self.handle, self.inner)
         185  +
    }
         186  +
    /// <p>The operating system type for which to list patches.</p>
         187  +
    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
         188  +
        self.inner = self.inner.operating_system(input);
         189  +
        self
         190  +
    }
         191  +
    /// <p>The operating system type for which to list patches.</p>
         192  +
    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
         193  +
        self.inner = self.inner.set_operating_system(input);
         194  +
        self
         195  +
    }
         196  +
    /// <p>The operating system type for which to list patches.</p>
         197  +
    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
         198  +
        self.inner.get_operating_system()
         199  +
    }
         200  +
    /// <p>The patch property for which you want to view patch details.</p>
         201  +
    pub fn property(mut self, input: crate::types::PatchProperty) -> Self {
         202  +
        self.inner = self.inner.property(input);
         203  +
        self
         204  +
    }
         205  +
    /// <p>The patch property for which you want to view patch details.</p>
         206  +
    pub fn set_property(mut self, input: ::std::option::Option<crate::types::PatchProperty>) -> Self {
         207  +
        self.inner = self.inner.set_property(input);
         208  +
        self
         209  +
    }
         210  +
    /// <p>The patch property for which you want to view patch details.</p>
         211  +
    pub fn get_property(&self) -> &::std::option::Option<crate::types::PatchProperty> {
         212  +
        self.inner.get_property()
         213  +
    }
         214  +
    /// <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>
         215  +
    pub fn patch_set(mut self, input: crate::types::PatchSet) -> Self {
         216  +
        self.inner = self.inner.patch_set(input);
         217  +
        self
         218  +
    }
         219  +
    /// <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>
         220  +
    pub fn set_patch_set(mut self, input: ::std::option::Option<crate::types::PatchSet>) -> Self {
         221  +
        self.inner = self.inner.set_patch_set(input);
         222  +
        self
         223  +
    }
         224  +
    /// <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>
         225  +
    pub fn get_patch_set(&self) -> &::std::option::Option<crate::types::PatchSet> {
         226  +
        self.inner.get_patch_set()
         227  +
    }
         228  +
    /// <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>
         229  +
    pub fn max_results(mut self, input: i32) -> Self {
         230  +
        self.inner = self.inner.max_results(input);
         231  +
        self
         232  +
    }
         233  +
    /// <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>
         234  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         235  +
        self.inner = self.inner.set_max_results(input);
         236  +
        self
         237  +
    }
         238  +
    /// <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>
         239  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         240  +
        self.inner.get_max_results()
         241  +
    }
         242  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         243  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         244  +
        self.inner = self.inner.next_token(input.into());
         245  +
        self
         246  +
    }
         247  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         248  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         249  +
        self.inner = self.inner.set_next_token(input);
         250  +
        self
         251  +
    }
         252  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         253  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         254  +
        self.inner.get_next_token()
         255  +
    }
         256  +
}

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

@@ -0,1 +0,149 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribePatchProperties`](crate::operation::describe_patch_properties::DescribePatchProperties)
           3  +
pub struct DescribePatchPropertiesPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribePatchPropertiesPaginator {
          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_properties::builders::DescribePatchPropertiesInputBuilder,
          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 `properties`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginatorItems {
          35  +
        crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginatorItems(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_properties::DescribePatchPropertiesOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_patch_properties::DescribePatchPropertiesError,
          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_properties::DescribePatchProperties::operation_runtime_plugins(
          69  +
            handle.runtime_plugins.clone(),
          70  +
            &handle.conf,
          71  +
            ::std::option::Option::None,
          72  +
        )
          73  +
        .with_operation_plugin(crate::sdk_feature_tracker::paginator::PaginatorFeatureTrackerRuntimePlugin::new());
          74  +
        ::aws_smithy_async::future::pagination_stream::PaginationStream::new(::aws_smithy_async::future::pagination_stream::fn_stream::FnStream::new(
          75  +
            move |tx| {
          76  +
                ::std::boxed::Box::pin(async move {
          77  +
                    // Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
          78  +
                    let mut input = match builder
          79  +
                        .build()
          80  +
                        .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
          81  +
                    {
          82  +
                        ::std::result::Result::Ok(input) => input,
          83  +
                        ::std::result::Result::Err(e) => {
          84  +
                            let _ = tx.send(::std::result::Result::Err(e)).await;
          85  +
                            return;
          86  +
                        }
          87  +
                    };
          88  +
                    loop {
          89  +
                        let resp =
          90  +
                            crate::operation::describe_patch_properties::DescribePatchProperties::orchestrate(&runtime_plugins, input.clone()).await;
          91  +
                        // If the input member is None or it was an error
          92  +
                        let done = match resp {
          93  +
                            ::std::result::Result::Ok(ref resp) => {
          94  +
                                let new_token = crate::lens::reflens_describe_patch_properties_output_output_next_token(resp);
          95  +
                                // Pagination is exhausted when the next token is an empty string
          96  +
                                let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
          97  +
                                if !is_empty && new_token == input.next_token.as_ref() && self.stop_on_duplicate_token {
          98  +
                                    true
          99  +
                                } else {
         100  +
                                    input.next_token = new_token.cloned();
         101  +
                                    is_empty
         102  +
                                }
         103  +
                            }
         104  +
                            ::std::result::Result::Err(_) => true,
         105  +
                        };
         106  +
                        if tx.send(resp).await.is_err() {
         107  +
                            // receiving end was dropped
         108  +
                            return;
         109  +
                        }
         110  +
                        if done {
         111  +
                            return;
         112  +
                        }
         113  +
                    }
         114  +
                })
         115  +
            },
         116  +
        ))
         117  +
    }
         118  +
}
         119  +
         120  +
/// Flattened paginator for `DescribePatchPropertiesPaginator`
         121  +
///
         122  +
/// This is created with [`.items()`](DescribePatchPropertiesPaginator::items)
         123  +
pub struct DescribePatchPropertiesPaginatorItems(DescribePatchPropertiesPaginator);
         124  +
         125  +
impl DescribePatchPropertiesPaginatorItems {
         126  +
    /// Create the pagination stream
         127  +
    ///
         128  +
    /// _Note_: No requests will be dispatched until the stream is used
         129  +
    /// (e.g. with the [`.next().await`](aws_smithy_async::future::pagination_stream::PaginationStream::next) method).
         130  +
    ///
         131  +
    /// To read the entirety of the paginator, use [`.collect::<Result<Vec<_>, _>()`](aws_smithy_async::future::pagination_stream::PaginationStream::collect).
         132  +
    pub fn send(
         133  +
        self,
         134  +
    ) -> ::aws_smithy_async::future::pagination_stream::PaginationStream<
         135  +
        ::std::result::Result<
         136  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         137  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         138  +
                crate::operation::describe_patch_properties::DescribePatchPropertiesError,
         139  +
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         140  +
            >,
         141  +
        >,
         142  +
    > {
         143  +
        ::aws_smithy_async::future::pagination_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
         144  +
            crate::lens::lens_describe_patch_properties_output_output_properties(page)
         145  +
                .unwrap_or_default()
         146  +
                .into_iter()
         147  +
        })
         148  +
    }
         149  +
}

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

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