AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,335 @@
           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 ListDocumentsInput {
           6  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
           7  +
    pub document_filter_list: ::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>>,
           8  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
           9  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
          10  +
    /// </note>
          11  +
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>>,
          12  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
          13  +
    pub max_results: ::std::option::Option<i32>,
          14  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          15  +
    pub next_token: ::std::option::Option<::std::string::String>,
          16  +
}
          17  +
impl ListDocumentsInput {
          18  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
          19  +
    ///
          20  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.document_filter_list.is_none()`.
          21  +
    pub fn document_filter_list(&self) -> &[crate::types::DocumentFilter] {
          22  +
        self.document_filter_list.as_deref().unwrap_or_default()
          23  +
    }
          24  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
          25  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
          26  +
    /// </note>
          27  +
    ///
          28  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
          29  +
    pub fn filters(&self) -> &[crate::types::DocumentKeyValuesFilter] {
          30  +
        self.filters.as_deref().unwrap_or_default()
          31  +
    }
          32  +
    /// <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>
          33  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          34  +
        self.max_results
          35  +
    }
          36  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          37  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          38  +
        self.next_token.as_deref()
          39  +
    }
          40  +
}
          41  +
static LISTDOCUMENTSINPUT_MEMBER_DOCUMENT_FILTER_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#DocumentFilterList$member", "com.amazonaws.ssm", "DocumentFilterList"),
          43  +
    ::aws_smithy_schema::ShapeType::Structure,
          44  +
    "member",
          45  +
    0,
          46  +
)
          47  +
.with_xml_name("DocumentFilter");
          48  +
static LISTDOCUMENTSINPUT_MEMBER_DOCUMENT_FILTER_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm.synthetic#ListDocumentsInput$DocumentFilterList",
          51  +
        "com.amazonaws.ssm.synthetic",
          52  +
        "ListDocumentsInput",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::List,
          55  +
    "DocumentFilterList",
          56  +
    0,
          57  +
)
          58  +
.with_list_member(&LISTDOCUMENTSINPUT_MEMBER_DOCUMENT_FILTER_LIST_MEMBER);
          59  +
static LISTDOCUMENTSINPUT_MEMBER_FILTERS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm#DocumentKeyValuesFilterList$member",
          62  +
        "com.amazonaws.ssm",
          63  +
        "DocumentKeyValuesFilterList",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::Structure,
          66  +
    "member",
          67  +
    0,
          68  +
);
          69  +
static LISTDOCUMENTSINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm.synthetic#ListDocumentsInput$Filters",
          72  +
        "com.amazonaws.ssm.synthetic",
          73  +
        "ListDocumentsInput",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::List,
          76  +
    "Filters",
          77  +
    1,
          78  +
)
          79  +
.with_list_member(&LISTDOCUMENTSINPUT_MEMBER_FILTERS_MEMBER);
          80  +
static LISTDOCUMENTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts(
          82  +
        "com.amazonaws.ssm.synthetic#ListDocumentsInput$MaxResults",
          83  +
        "com.amazonaws.ssm.synthetic",
          84  +
        "ListDocumentsInput",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::Integer,
          87  +
    "MaxResults",
          88  +
    2,
          89  +
);
          90  +
static LISTDOCUMENTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts(
          92  +
        "com.amazonaws.ssm.synthetic#ListDocumentsInput$NextToken",
          93  +
        "com.amazonaws.ssm.synthetic",
          94  +
        "ListDocumentsInput",
          95  +
    ),
          96  +
    ::aws_smithy_schema::ShapeType::String,
          97  +
    "NextToken",
          98  +
    3,
          99  +
);
         100  +
static LISTDOCUMENTSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         101  +
    ::aws_smithy_schema::ShapeId::from_parts(
         102  +
        "com.amazonaws.ssm.synthetic#ListDocumentsInput",
         103  +
        "com.amazonaws.ssm.synthetic",
         104  +
        "ListDocumentsInput",
         105  +
    ),
         106  +
    ::aws_smithy_schema::ShapeType::Structure,
         107  +
    &[
         108  +
        &LISTDOCUMENTSINPUT_MEMBER_DOCUMENT_FILTER_LIST,
         109  +
        &LISTDOCUMENTSINPUT_MEMBER_FILTERS,
         110  +
        &LISTDOCUMENTSINPUT_MEMBER_MAX_RESULTS,
         111  +
        &LISTDOCUMENTSINPUT_MEMBER_NEXT_TOKEN,
         112  +
    ],
         113  +
)
         114  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         115  +
.with_original_name("ListDocumentsRequest");
         116  +
impl ListDocumentsInput {
         117  +
    /// The schema for this shape.
         118  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTDOCUMENTSINPUT_SCHEMA;
         119  +
}
         120  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListDocumentsInput {
         121  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         122  +
    fn serialize_members(
         123  +
        &self,
         124  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         125  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         126  +
        if let Some(ref val) = self.document_filter_list {
         127  +
            ser.write_list(
         128  +
                &LISTDOCUMENTSINPUT_MEMBER_DOCUMENT_FILTER_LIST,
         129  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         130  +
                    for item in val {
         131  +
                        ser.write_struct(crate::types::DocumentFilter::SCHEMA, item)?;
         132  +
                    }
         133  +
                    Ok(())
         134  +
                },
         135  +
            )?;
         136  +
        }
         137  +
        if let Some(ref val) = self.filters {
         138  +
            ser.write_list(
         139  +
                &LISTDOCUMENTSINPUT_MEMBER_FILTERS,
         140  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         141  +
                    for item in val {
         142  +
                        ser.write_struct(crate::types::DocumentKeyValuesFilter::SCHEMA, item)?;
         143  +
                    }
         144  +
                    Ok(())
         145  +
                },
         146  +
            )?;
         147  +
        }
         148  +
        if let Some(ref val) = self.max_results {
         149  +
            ser.write_integer(&LISTDOCUMENTSINPUT_MEMBER_MAX_RESULTS, *val)?;
         150  +
        }
         151  +
        if let Some(ref val) = self.next_token {
         152  +
            ser.write_string(&LISTDOCUMENTSINPUT_MEMBER_NEXT_TOKEN, val)?;
         153  +
        }
         154  +
        Ok(())
         155  +
    }
         156  +
}
         157  +
impl ListDocumentsInput {
         158  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         159  +
    pub fn deserialize(
         160  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         161  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         162  +
        #[allow(unused_variables, unused_mut)]
         163  +
        let mut builder = Self::builder();
         164  +
        #[allow(
         165  +
            unused_variables,
         166  +
            unreachable_code,
         167  +
            clippy::single_match,
         168  +
            clippy::match_single_binding,
         169  +
            clippy::diverging_sub_expression
         170  +
        )]
         171  +
        deserializer.read_struct(&LISTDOCUMENTSINPUT_SCHEMA, &mut |member, deser| {
         172  +
            match member.member_index() {
         173  +
                Some(0) => {
         174  +
                    if deser.is_null() {
         175  +
                        deser.read_null()?;
         176  +
                    } else {
         177  +
                        builder.document_filter_list = Some({
         178  +
                            let mut container = Vec::new();
         179  +
                            deser.read_list(member, &mut |deser| {
         180  +
                                container.push(crate::types::DocumentFilter::deserialize(deser)?);
         181  +
                                Ok(())
         182  +
                            })?;
         183  +
                            container
         184  +
                        });
         185  +
                    }
         186  +
                }
         187  +
                Some(1) => {
         188  +
                    if deser.is_null() {
         189  +
                        deser.read_null()?;
         190  +
                    } else {
         191  +
                        builder.filters = Some({
         192  +
                            let mut container = Vec::new();
         193  +
                            deser.read_list(member, &mut |deser| {
         194  +
                                container.push(crate::types::DocumentKeyValuesFilter::deserialize(deser)?);
         195  +
                                Ok(())
         196  +
                            })?;
         197  +
                            container
         198  +
                        });
         199  +
                    }
         200  +
                }
         201  +
                Some(2) => {
         202  +
                    if deser.is_null() {
         203  +
                        deser.read_null()?;
         204  +
                    } else {
         205  +
                        builder.max_results = Some(deser.read_integer(member)?);
         206  +
                    }
         207  +
                }
         208  +
                Some(3) => {
         209  +
                    if deser.is_null() {
         210  +
                        deser.read_null()?;
         211  +
                    } else {
         212  +
                        builder.next_token = Some(deser.read_string(member)?);
         213  +
                    }
         214  +
                }
         215  +
                _ => {}
         216  +
            }
         217  +
            Ok(())
         218  +
        })?;
         219  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         220  +
    }
         221  +
}
         222  +
impl ListDocumentsInput {
         223  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         224  +
    pub fn deserialize_with_response(
         225  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         226  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         227  +
        _status: u16,
         228  +
        _body: &[u8],
         229  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         230  +
        Self::deserialize(deserializer)
         231  +
    }
         232  +
}
         233  +
impl ListDocumentsInput {
         234  +
    /// Creates a new builder-style object to manufacture [`ListDocumentsInput`](crate::operation::list_documents::ListDocumentsInput).
         235  +
    pub fn builder() -> crate::operation::list_documents::builders::ListDocumentsInputBuilder {
         236  +
        crate::operation::list_documents::builders::ListDocumentsInputBuilder::default()
         237  +
    }
         238  +
}
         239  +
         240  +
/// A builder for [`ListDocumentsInput`](crate::operation::list_documents::ListDocumentsInput).
         241  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         242  +
#[non_exhaustive]
         243  +
pub struct ListDocumentsInputBuilder {
         244  +
    pub(crate) document_filter_list: ::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>>,
         245  +
    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>>,
         246  +
    pub(crate) max_results: ::std::option::Option<i32>,
         247  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         248  +
}
         249  +
impl ListDocumentsInputBuilder {
         250  +
    /// Appends an item to `document_filter_list`.
         251  +
    ///
         252  +
    /// To override the contents of this collection use [`set_document_filter_list`](Self::set_document_filter_list).
         253  +
    ///
         254  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         255  +
    pub fn document_filter_list(mut self, input: crate::types::DocumentFilter) -> Self {
         256  +
        let mut v = self.document_filter_list.unwrap_or_default();
         257  +
        v.push(input);
         258  +
        self.document_filter_list = ::std::option::Option::Some(v);
         259  +
        self
         260  +
    }
         261  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         262  +
    pub fn set_document_filter_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>>) -> Self {
         263  +
        self.document_filter_list = input;
         264  +
        self
         265  +
    }
         266  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         267  +
    pub fn get_document_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>> {
         268  +
        &self.document_filter_list
         269  +
    }
         270  +
    /// Appends an item to `filters`.
         271  +
    ///
         272  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         273  +
    ///
         274  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         275  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         276  +
    /// </note>
         277  +
    pub fn filters(mut self, input: crate::types::DocumentKeyValuesFilter) -> Self {
         278  +
        let mut v = self.filters.unwrap_or_default();
         279  +
        v.push(input);
         280  +
        self.filters = ::std::option::Option::Some(v);
         281  +
        self
         282  +
    }
         283  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         284  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         285  +
    /// </note>
         286  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>>) -> Self {
         287  +
        self.filters = input;
         288  +
        self
         289  +
    }
         290  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         291  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         292  +
    /// </note>
         293  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>> {
         294  +
        &self.filters
         295  +
    }
         296  +
    /// <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>
         297  +
    pub fn max_results(mut self, input: i32) -> Self {
         298  +
        self.max_results = ::std::option::Option::Some(input);
         299  +
        self
         300  +
    }
         301  +
    /// <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>
         302  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         303  +
        self.max_results = input;
         304  +
        self
         305  +
    }
         306  +
    /// <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>
         307  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         308  +
        &self.max_results
         309  +
    }
         310  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         311  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         312  +
        self.next_token = ::std::option::Option::Some(input.into());
         313  +
        self
         314  +
    }
         315  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         316  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         317  +
        self.next_token = input;
         318  +
        self
         319  +
    }
         320  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         321  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         322  +
        &self.next_token
         323  +
    }
         324  +
    /// Consumes the builder and constructs a [`ListDocumentsInput`](crate::operation::list_documents::ListDocumentsInput).
         325  +
    pub fn build(
         326  +
        self,
         327  +
    ) -> ::std::result::Result<crate::operation::list_documents::ListDocumentsInput, ::aws_smithy_types::error::operation::BuildError> {
         328  +
        ::std::result::Result::Ok(crate::operation::list_documents::ListDocumentsInput {
         329  +
            document_filter_list: self.document_filter_list,
         330  +
            filters: self.filters,
         331  +
            max_results: self.max_results,
         332  +
            next_token: self.next_token,
         333  +
        })
         334  +
    }
         335  +
}

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

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

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

@@ -0,1 +0,189 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_documents::_list_documents_input::ListDocumentsInputBuilder;
           3  +
           4  +
pub use crate::operation::list_documents::_list_documents_output::ListDocumentsOutputBuilder;
           5  +
           6  +
impl crate::operation::list_documents::builders::ListDocumentsInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::list_documents::ListDocumentsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_documents::ListDocumentsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_documents();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListDocuments`.
          24  +
///
          25  +
/// <p>Returns all Systems Manager (SSM) documents in the current Amazon Web Services account and Amazon Web Services Region. You can limit the results of this request by using a filter.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListDocumentsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_documents::builders::ListDocumentsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_documents::ListDocumentsOutput,
          35  +
        crate::operation::list_documents::ListDocumentsError,
          36  +
    > for ListDocumentsFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::list_documents::ListDocumentsOutput,
          44  +
            crate::operation::list_documents::ListDocumentsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListDocumentsFluentBuilder {
          51  +
    /// Creates a new `ListDocumentsFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the ListDocuments as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_documents::builders::ListDocumentsInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::list_documents::ListDocumentsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_documents::ListDocumentsError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::list_documents::ListDocuments::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_documents::ListDocuments::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::list_documents::ListDocumentsOutput,
          97  +
        crate::operation::list_documents::ListDocumentsError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// Create a paginator for this request
         112  +
    ///
         113  +
    /// Paginators are used by calling [`send().await`](crate::operation::list_documents::paginator::ListDocumentsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_documents::paginator::ListDocumentsPaginator {
         115  +
        crate::operation::list_documents::paginator::ListDocumentsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    ///
         118  +
    /// Appends an item to `DocumentFilterList`.
         119  +
    ///
         120  +
    /// To override the contents of this collection use [`set_document_filter_list`](Self::set_document_filter_list).
         121  +
    ///
         122  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         123  +
    pub fn document_filter_list(mut self, input: crate::types::DocumentFilter) -> Self {
         124  +
        self.inner = self.inner.document_filter_list(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         128  +
    pub fn set_document_filter_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>>) -> Self {
         129  +
        self.inner = self.inner.set_document_filter_list(input);
         130  +
        self
         131  +
    }
         132  +
    /// <p>This data type is deprecated. Instead, use <code>Filters</code>.</p>
         133  +
    pub fn get_document_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentFilter>> {
         134  +
        self.inner.get_document_filter_list()
         135  +
    }
         136  +
    ///
         137  +
    /// Appends an item to `Filters`.
         138  +
    ///
         139  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         140  +
    ///
         141  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         142  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         143  +
    /// </note>
         144  +
    pub fn filters(mut self, input: crate::types::DocumentKeyValuesFilter) -> Self {
         145  +
        self.inner = self.inner.filters(input);
         146  +
        self
         147  +
    }
         148  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         149  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         150  +
    /// </note>
         151  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>>) -> Self {
         152  +
        self.inner = self.inner.set_filters(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>One or more <code>DocumentKeyValuesFilter</code> objects. Use a filter to return a more specific list of results. For keys, you can specify one or more key-value pair tags that have been applied to a document. Other valid keys include <code>Owner</code>, <code>Name</code>, <code>PlatformTypes</code>, <code>DocumentType</code>, and <code>TargetType</code>. For example, to return documents you own use <code>Key=Owner,Values=Self</code>. To specify a custom key-value pair, use the format <code>Key=tag:tagName,Values=valueName</code>.</p><note>
         156  +
    /// <p>This API operation only supports filtering documents by using a single tag key and one or more tag values. For example: <code>Key=tag:tagName,Values=valueName1,valueName2</code></p>
         157  +
    /// </note>
         158  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentKeyValuesFilter>> {
         159  +
        self.inner.get_filters()
         160  +
    }
         161  +
    /// <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>
         162  +
    pub fn max_results(mut self, input: i32) -> Self {
         163  +
        self.inner = self.inner.max_results(input);
         164  +
        self
         165  +
    }
         166  +
    /// <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>
         167  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         168  +
        self.inner = self.inner.set_max_results(input);
         169  +
        self
         170  +
    }
         171  +
    /// <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>
         172  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         173  +
        self.inner.get_max_results()
         174  +
    }
         175  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         176  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         177  +
        self.inner = self.inner.next_token(input.into());
         178  +
        self
         179  +
    }
         180  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         181  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         182  +
        self.inner = self.inner.set_next_token(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         186  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_next_token()
         188  +
    }
         189  +
}

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

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

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

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