AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

@@ -0,1 +0,262 @@
           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 ListAssociationsInput {
           6  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
           7  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
           8  +
    /// </note>
           9  +
    pub association_filter_list: ::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>>,
          10  +
    /// <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>
          11  +
    pub max_results: ::std::option::Option<i32>,
          12  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          13  +
    pub next_token: ::std::option::Option<::std::string::String>,
          14  +
}
          15  +
impl ListAssociationsInput {
          16  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
          17  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
          18  +
    /// </note>
          19  +
    ///
          20  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.association_filter_list.is_none()`.
          21  +
    pub fn association_filter_list(&self) -> &[crate::types::AssociationFilter] {
          22  +
        self.association_filter_list.as_deref().unwrap_or_default()
          23  +
    }
          24  +
    /// <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>
          25  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          26  +
        self.max_results
          27  +
    }
          28  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
          29  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          30  +
        self.next_token.as_deref()
          31  +
    }
          32  +
}
          33  +
static LISTASSOCIATIONSINPUT_MEMBER_ASSOCIATION_FILTER_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm#AssociationFilterList$member",
          36  +
        "com.amazonaws.ssm",
          37  +
        "AssociationFilterList",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    "member",
          41  +
    0,
          42  +
)
          43  +
.with_xml_name("AssociationFilter");
          44  +
static LISTASSOCIATIONSINPUT_MEMBER_ASSOCIATION_FILTER_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "com.amazonaws.ssm.synthetic#ListAssociationsInput$AssociationFilterList",
          47  +
        "com.amazonaws.ssm.synthetic",
          48  +
        "ListAssociationsInput",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::List,
          51  +
    "AssociationFilterList",
          52  +
    0,
          53  +
)
          54  +
.with_list_member(&LISTASSOCIATIONSINPUT_MEMBER_ASSOCIATION_FILTER_LIST_MEMBER);
          55  +
static LISTASSOCIATIONSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts(
          57  +
        "com.amazonaws.ssm.synthetic#ListAssociationsInput$MaxResults",
          58  +
        "com.amazonaws.ssm.synthetic",
          59  +
        "ListAssociationsInput",
          60  +
    ),
          61  +
    ::aws_smithy_schema::ShapeType::Integer,
          62  +
    "MaxResults",
          63  +
    1,
          64  +
);
          65  +
static LISTASSOCIATIONSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          66  +
    ::aws_smithy_schema::ShapeId::from_parts(
          67  +
        "com.amazonaws.ssm.synthetic#ListAssociationsInput$NextToken",
          68  +
        "com.amazonaws.ssm.synthetic",
          69  +
        "ListAssociationsInput",
          70  +
    ),
          71  +
    ::aws_smithy_schema::ShapeType::String,
          72  +
    "NextToken",
          73  +
    2,
          74  +
);
          75  +
static LISTASSOCIATIONSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          76  +
    ::aws_smithy_schema::ShapeId::from_parts(
          77  +
        "com.amazonaws.ssm.synthetic#ListAssociationsInput",
          78  +
        "com.amazonaws.ssm.synthetic",
          79  +
        "ListAssociationsInput",
          80  +
    ),
          81  +
    ::aws_smithy_schema::ShapeType::Structure,
          82  +
    &[
          83  +
        &LISTASSOCIATIONSINPUT_MEMBER_ASSOCIATION_FILTER_LIST,
          84  +
        &LISTASSOCIATIONSINPUT_MEMBER_MAX_RESULTS,
          85  +
        &LISTASSOCIATIONSINPUT_MEMBER_NEXT_TOKEN,
          86  +
    ],
          87  +
)
          88  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          89  +
.with_original_name("ListAssociationsRequest");
          90  +
impl ListAssociationsInput {
          91  +
    /// The schema for this shape.
          92  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &LISTASSOCIATIONSINPUT_SCHEMA;
          93  +
}
          94  +
impl ::aws_smithy_schema::serde::SerializableStruct for ListAssociationsInput {
          95  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          96  +
    fn serialize_members(
          97  +
        &self,
          98  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          99  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         100  +
        if let Some(ref val) = self.association_filter_list {
         101  +
            ser.write_list(
         102  +
                &LISTASSOCIATIONSINPUT_MEMBER_ASSOCIATION_FILTER_LIST,
         103  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         104  +
                    for item in val {
         105  +
                        ser.write_struct(crate::types::AssociationFilter::SCHEMA, item)?;
         106  +
                    }
         107  +
                    Ok(())
         108  +
                },
         109  +
            )?;
         110  +
        }
         111  +
        if let Some(ref val) = self.max_results {
         112  +
            ser.write_integer(&LISTASSOCIATIONSINPUT_MEMBER_MAX_RESULTS, *val)?;
         113  +
        }
         114  +
        if let Some(ref val) = self.next_token {
         115  +
            ser.write_string(&LISTASSOCIATIONSINPUT_MEMBER_NEXT_TOKEN, val)?;
         116  +
        }
         117  +
        Ok(())
         118  +
    }
         119  +
}
         120  +
impl ListAssociationsInput {
         121  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         122  +
    pub fn deserialize(
         123  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         124  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         125  +
        #[allow(unused_variables, unused_mut)]
         126  +
        let mut builder = Self::builder();
         127  +
        #[allow(
         128  +
            unused_variables,
         129  +
            unreachable_code,
         130  +
            clippy::single_match,
         131  +
            clippy::match_single_binding,
         132  +
            clippy::diverging_sub_expression
         133  +
        )]
         134  +
        deserializer.read_struct(&LISTASSOCIATIONSINPUT_SCHEMA, &mut |member, deser| {
         135  +
            match member.member_index() {
         136  +
                Some(0) => {
         137  +
                    if deser.is_null() {
         138  +
                        deser.read_null()?;
         139  +
                    } else {
         140  +
                        builder.association_filter_list = Some({
         141  +
                            let mut container = Vec::new();
         142  +
                            deser.read_list(member, &mut |deser| {
         143  +
                                container.push(crate::types::AssociationFilter::deserialize(deser)?);
         144  +
                                Ok(())
         145  +
                            })?;
         146  +
                            container
         147  +
                        });
         148  +
                    }
         149  +
                }
         150  +
                Some(1) => {
         151  +
                    if deser.is_null() {
         152  +
                        deser.read_null()?;
         153  +
                    } else {
         154  +
                        builder.max_results = Some(deser.read_integer(member)?);
         155  +
                    }
         156  +
                }
         157  +
                Some(2) => {
         158  +
                    if deser.is_null() {
         159  +
                        deser.read_null()?;
         160  +
                    } else {
         161  +
                        builder.next_token = Some(deser.read_string(member)?);
         162  +
                    }
         163  +
                }
         164  +
                _ => {}
         165  +
            }
         166  +
            Ok(())
         167  +
        })?;
         168  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         169  +
    }
         170  +
}
         171  +
impl ListAssociationsInput {
         172  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         173  +
    pub fn deserialize_with_response(
         174  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         175  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         176  +
        _status: u16,
         177  +
        _body: &[u8],
         178  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         179  +
        Self::deserialize(deserializer)
         180  +
    }
         181  +
}
         182  +
impl ListAssociationsInput {
         183  +
    /// Creates a new builder-style object to manufacture [`ListAssociationsInput`](crate::operation::list_associations::ListAssociationsInput).
         184  +
    pub fn builder() -> crate::operation::list_associations::builders::ListAssociationsInputBuilder {
         185  +
        crate::operation::list_associations::builders::ListAssociationsInputBuilder::default()
         186  +
    }
         187  +
}
         188  +
         189  +
/// A builder for [`ListAssociationsInput`](crate::operation::list_associations::ListAssociationsInput).
         190  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         191  +
#[non_exhaustive]
         192  +
pub struct ListAssociationsInputBuilder {
         193  +
    pub(crate) association_filter_list: ::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>>,
         194  +
    pub(crate) max_results: ::std::option::Option<i32>,
         195  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         196  +
}
         197  +
impl ListAssociationsInputBuilder {
         198  +
    /// Appends an item to `association_filter_list`.
         199  +
    ///
         200  +
    /// To override the contents of this collection use [`set_association_filter_list`](Self::set_association_filter_list).
         201  +
    ///
         202  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         203  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         204  +
    /// </note>
         205  +
    pub fn association_filter_list(mut self, input: crate::types::AssociationFilter) -> Self {
         206  +
        let mut v = self.association_filter_list.unwrap_or_default();
         207  +
        v.push(input);
         208  +
        self.association_filter_list = ::std::option::Option::Some(v);
         209  +
        self
         210  +
    }
         211  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         212  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         213  +
    /// </note>
         214  +
    pub fn set_association_filter_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>>) -> Self {
         215  +
        self.association_filter_list = input;
         216  +
        self
         217  +
    }
         218  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         219  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         220  +
    /// </note>
         221  +
    pub fn get_association_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>> {
         222  +
        &self.association_filter_list
         223  +
    }
         224  +
    /// <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>
         225  +
    pub fn max_results(mut self, input: i32) -> Self {
         226  +
        self.max_results = ::std::option::Option::Some(input);
         227  +
        self
         228  +
    }
         229  +
    /// <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>
         230  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         231  +
        self.max_results = input;
         232  +
        self
         233  +
    }
         234  +
    /// <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>
         235  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         236  +
        &self.max_results
         237  +
    }
         238  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</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 for the next set of items to return. (You received this token from a previous call.)</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 for the next set of items to return. (You received this token from a previous call.)</p>
         249  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         250  +
        &self.next_token
         251  +
    }
         252  +
    /// Consumes the builder and constructs a [`ListAssociationsInput`](crate::operation::list_associations::ListAssociationsInput).
         253  +
    pub fn build(
         254  +
        self,
         255  +
    ) -> ::std::result::Result<crate::operation::list_associations::ListAssociationsInput, ::aws_smithy_types::error::operation::BuildError> {
         256  +
        ::std::result::Result::Ok(crate::operation::list_associations::ListAssociationsInput {
         257  +
            association_filter_list: self.association_filter_list,
         258  +
            max_results: self.max_results,
         259  +
            next_token: self.next_token,
         260  +
        })
         261  +
    }
         262  +
}

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

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

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

@@ -0,1 +0,170 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::list_associations::_list_associations_input::ListAssociationsInputBuilder;
           3  +
           4  +
pub use crate::operation::list_associations::_list_associations_output::ListAssociationsOutputBuilder;
           5  +
           6  +
impl crate::operation::list_associations::builders::ListAssociationsInputBuilder {
           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_associations::ListAssociationsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::list_associations::ListAssociationsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.list_associations();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ListAssociations`.
          24  +
///
          25  +
/// <p>Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You can limit the results to a specific State Manager association document or managed node by specifying a filter. State Manager is a tool in Amazon Web Services Systems Manager.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ListAssociationsFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::list_associations::builders::ListAssociationsInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::list_associations::ListAssociationsOutput,
          35  +
        crate::operation::list_associations::ListAssociationsError,
          36  +
    > for ListAssociationsFluentBuilder
          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_associations::ListAssociationsOutput,
          44  +
            crate::operation::list_associations::ListAssociationsError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ListAssociationsFluentBuilder {
          51  +
    /// Creates a new `ListAssociationsFluentBuilder`.
          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 ListAssociations as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::list_associations::builders::ListAssociationsInputBuilder {
          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_associations::ListAssociationsOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::list_associations::ListAssociationsError,
          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_associations::ListAssociations::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::list_associations::ListAssociations::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_associations::ListAssociationsOutput,
          97  +
        crate::operation::list_associations::ListAssociationsError,
          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_associations::paginator::ListAssociationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::list_associations::paginator::ListAssociationsPaginator {
         115  +
        crate::operation::list_associations::paginator::ListAssociationsPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    ///
         118  +
    /// Appends an item to `AssociationFilterList`.
         119  +
    ///
         120  +
    /// To override the contents of this collection use [`set_association_filter_list`](Self::set_association_filter_list).
         121  +
    ///
         122  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         123  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         124  +
    /// </note>
         125  +
    pub fn association_filter_list(mut self, input: crate::types::AssociationFilter) -> Self {
         126  +
        self.inner = self.inner.association_filter_list(input);
         127  +
        self
         128  +
    }
         129  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         130  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         131  +
    /// </note>
         132  +
    pub fn set_association_filter_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>>) -> Self {
         133  +
        self.inner = self.inner.set_association_filter_list(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>One or more filters. Use a filter to return a more specific list of results.</p><note>
         137  +
    /// <p>Filtering associations using the <code>InstanceID</code> attribute only returns legacy associations created using the <code>InstanceID</code> attribute. Associations targeting the managed node that are part of the Target Attributes <code>ResourceGroup</code> or <code>Tags</code> aren't returned.</p>
         138  +
    /// </note>
         139  +
    pub fn get_association_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AssociationFilter>> {
         140  +
        self.inner.get_association_filter_list()
         141  +
    }
         142  +
    /// <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>
         143  +
    pub fn max_results(mut self, input: i32) -> Self {
         144  +
        self.inner = self.inner.max_results(input);
         145  +
        self
         146  +
    }
         147  +
    /// <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>
         148  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         149  +
        self.inner = self.inner.set_max_results(input);
         150  +
        self
         151  +
    }
         152  +
    /// <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>
         153  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         154  +
        self.inner.get_max_results()
         155  +
    }
         156  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         157  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         158  +
        self.inner = self.inner.next_token(input.into());
         159  +
        self
         160  +
    }
         161  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         162  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         163  +
        self.inner = self.inner.set_next_token(input);
         164  +
        self
         165  +
    }
         166  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         167  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         168  +
        self.inner.get_next_token()
         169  +
    }
         170  +
}

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

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

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

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