AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b

Files changed:

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

@@ -0,1 +0,220 @@
           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 ListDocumentVersionsInput {
           6  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
           7  +
    pub name: ::std::option::Option<::std::string::String>,
           8  +
    /// <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>
           9  +
    pub max_results: ::std::option::Option<i32>,
          10  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          11  +
    pub next_token: ::std::option::Option<::std::string::String>,
          12  +
}
          13  +
impl ListDocumentVersionsInput {
          14  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
          15  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          16  +
        self.name.as_deref()
          17  +
    }
          18  +
    /// <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>
          19  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          20  +
        self.max_results
          21  +
    }
          22  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          23  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          24  +
        self.next_token.as_deref()
          25  +
    }
          26  +
}
          27  +
static LISTDOCUMENTVERSIONSINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts(
          29  +
        "com.amazonaws.ssm.synthetic#ListDocumentVersionsInput$Name",
          30  +
        "com.amazonaws.ssm.synthetic",
          31  +
        "ListDocumentVersionsInput",
          32  +
    ),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "Name",
          35  +
    0,
          36  +
);
          37  +
static LISTDOCUMENTVERSIONSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#ListDocumentVersionsInput$MaxResults",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "ListDocumentVersionsInput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::Integer,
          44  +
    "MaxResults",
          45  +
    1,
          46  +
);
          47  +
static LISTDOCUMENTVERSIONSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#ListDocumentVersionsInput$NextToken",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "ListDocumentVersionsInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "NextToken",
          55  +
    2,
          56  +
);
          57  +
static LISTDOCUMENTVERSIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#ListDocumentVersionsInput",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "ListDocumentVersionsInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    &[
          65  +
        &LISTDOCUMENTVERSIONSINPUT_MEMBER_NAME,
          66  +
        &LISTDOCUMENTVERSIONSINPUT_MEMBER_MAX_RESULTS,
          67  +
        &LISTDOCUMENTVERSIONSINPUT_MEMBER_NEXT_TOKEN,
          68  +
    ],
          69  +
)
          70  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          71  +
.with_original_name("ListDocumentVersionsRequest");
          72  +
impl ListDocumentVersionsInput {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTDOCUMENTVERSIONSINPUT_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListDocumentVersionsInput {
          77  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          78  +
    fn serialize_members(
          79  +
        &self,
          80  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          81  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          82  +
        if let Some(ref val) = self.name {
          83  +
            ser.write_string(&LISTDOCUMENTVERSIONSINPUT_MEMBER_NAME, val)?;
          84  +
        }
          85  +
        if let Some(ref val) = self.max_results {
          86  +
            ser.write_integer(&LISTDOCUMENTVERSIONSINPUT_MEMBER_MAX_RESULTS, *val)?;
          87  +
        }
          88  +
        if let Some(ref val) = self.next_token {
          89  +
            ser.write_string(&LISTDOCUMENTVERSIONSINPUT_MEMBER_NEXT_TOKEN, val)?;
          90  +
        }
          91  +
        Ok(())
          92  +
    }
          93  +
}
          94  +
impl ListDocumentVersionsInput {
          95  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          96  +
    pub fn deserialize(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          98  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          99  +
        #[allow(unused_variables, unused_mut)]
         100  +
        let mut builder = Self::builder();
         101  +
        #[allow(
         102  +
            unused_variables,
         103  +
            unreachable_code,
         104  +
            clippy::single_match,
         105  +
            clippy::match_single_binding,
         106  +
            clippy::diverging_sub_expression
         107  +
        )]
         108  +
        deserializer.read_struct(&LISTDOCUMENTVERSIONSINPUT_SCHEMA, &mut |member, deser| {
         109  +
            match member.member_index() {
         110  +
                Some(0) => {
         111  +
                    if deser.is_null() {
         112  +
                        deser.read_null()?;
         113  +
                    } else {
         114  +
                        builder.name = Some(deser.read_string(member)?);
         115  +
                    }
         116  +
                }
         117  +
                Some(1) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.max_results = Some(deser.read_integer(member)?);
         122  +
                    }
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    if deser.is_null() {
         126  +
                        deser.read_null()?;
         127  +
                    } else {
         128  +
                        builder.next_token = Some(deser.read_string(member)?);
         129  +
                    }
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.name = builder.name.or(Some(String::new()));
         136  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         137  +
    }
         138  +
}
         139  +
impl ListDocumentVersionsInput {
         140  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        Self::deserialize(deserializer)
         148  +
    }
         149  +
}
         150  +
impl ListDocumentVersionsInput {
         151  +
    /// Creates a new builder-style object to manufacture [`ListDocumentVersionsInput`](crate::operation::list_document_versions::ListDocumentVersionsInput).
         152  +
    pub fn builder() -> crate::operation::list_document_versions::builders::ListDocumentVersionsInputBuilder {
         153  +
        crate::operation::list_document_versions::builders::ListDocumentVersionsInputBuilder::default()
         154  +
    }
         155  +
}
         156  +
         157  +
/// A builder for [`ListDocumentVersionsInput`](crate::operation::list_document_versions::ListDocumentVersionsInput).
         158  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         159  +
#[non_exhaustive]
         160  +
pub struct ListDocumentVersionsInputBuilder {
         161  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         162  +
    pub(crate) max_results: ::std::option::Option<i32>,
         163  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         164  +
}
         165  +
impl ListDocumentVersionsInputBuilder {
         166  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         167  +
    /// This field is required.
         168  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         169  +
        self.name = ::std::option::Option::Some(input.into());
         170  +
        self
         171  +
    }
         172  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         173  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         174  +
        self.name = input;
         175  +
        self
         176  +
    }
         177  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         178  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         179  +
        &self.name
         180  +
    }
         181  +
    /// <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>
         182  +
    pub fn max_results(mut self, input: i32) -> Self {
         183  +
        self.max_results = ::std::option::Option::Some(input);
         184  +
        self
         185  +
    }
         186  +
    /// <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>
         187  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         188  +
        self.max_results = input;
         189  +
        self
         190  +
    }
         191  +
    /// <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>
         192  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         193  +
        &self.max_results
         194  +
    }
         195  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         196  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         197  +
        self.next_token = ::std::option::Option::Some(input.into());
         198  +
        self
         199  +
    }
         200  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         201  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         202  +
        self.next_token = input;
         203  +
        self
         204  +
    }
         205  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         206  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         207  +
        &self.next_token
         208  +
    }
         209  +
    /// Consumes the builder and constructs a [`ListDocumentVersionsInput`](crate::operation::list_document_versions::ListDocumentVersionsInput).
         210  +
    pub fn build(
         211  +
        self,
         212  +
    ) -> ::std::result::Result<crate::operation::list_document_versions::ListDocumentVersionsInput, ::aws_smithy_types::error::operation::BuildError>
         213  +
    {
         214  +
        ::std::result::Result::Ok(crate::operation::list_document_versions::ListDocumentVersionsInput {
         215  +
            name: self.name,
         216  +
            max_results: self.max_results,
         217  +
            next_token: self.next_token,
         218  +
        })
         219  +
    }
         220  +
}

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

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

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

@@ -0,1 +0,159 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_document_versions::_list_document_versions_input::ListDocumentVersionsInputBuilder;
           3  +
           4  +
pub use crate::operation::list_document_versions::_list_document_versions_output::ListDocumentVersionsOutputBuilder;
           5  +
           6  +
impl crate::operation::list_document_versions::builders::ListDocumentVersionsInputBuilder {
           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_document_versions::ListDocumentVersionsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_document_versions::ListDocumentVersionsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_document_versions();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListDocumentVersions`.
          24  +
///
          25  +
/// <p>List all versions for a document.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListDocumentVersionsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_document_versions::builders::ListDocumentVersionsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_document_versions::ListDocumentVersionsOutput,
          35  +
        crate::operation::list_document_versions::ListDocumentVersionsError,
          36  +
    > for ListDocumentVersionsFluentBuilder
          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_document_versions::ListDocumentVersionsOutput,
          44  +
            crate::operation::list_document_versions::ListDocumentVersionsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListDocumentVersionsFluentBuilder {
          51  +
    /// Creates a new `ListDocumentVersionsFluentBuilder`.
          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 ListDocumentVersions as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_document_versions::builders::ListDocumentVersionsInputBuilder {
          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_document_versions::ListDocumentVersionsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_document_versions::ListDocumentVersionsError,
          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_document_versions::ListDocumentVersions::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_document_versions::ListDocumentVersions::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_document_versions::ListDocumentVersionsOutput,
          97  +
        crate::operation::list_document_versions::ListDocumentVersionsError,
          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_document_versions::paginator::ListDocumentVersionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_document_versions::paginator::ListDocumentVersionsPaginator {
         115  +
        crate::operation::list_document_versions::paginator::ListDocumentVersionsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         118  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.name(input.into());
         120  +
        self
         121  +
    }
         122  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         123  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_name(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>The name of the document. You can specify an Amazon Resource Name (ARN).</p>
         128  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         129  +
        self.inner.get_name()
         130  +
    }
         131  +
    /// <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>
         132  +
    pub fn max_results(mut self, input: i32) -> Self {
         133  +
        self.inner = self.inner.max_results(input);
         134  +
        self
         135  +
    }
         136  +
    /// <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>
         137  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         138  +
        self.inner = self.inner.set_max_results(input);
         139  +
        self
         140  +
    }
         141  +
    /// <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>
         142  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         143  +
        self.inner.get_max_results()
         144  +
    }
         145  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         146  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         147  +
        self.inner = self.inner.next_token(input.into());
         148  +
        self
         149  +
    }
         150  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         151  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         152  +
        self.inner = self.inner.set_next_token(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         156  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         157  +
        self.inner.get_next_token()
         158  +
    }
         159  +
}

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

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

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

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