AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -0,1 +0,195 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_instance_information::_describe_instance_information_input::DescribeInstanceInformationInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_instance_information::_describe_instance_information_output::DescribeInstanceInformationOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_instance_information::builders::DescribeInstanceInformationInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::describe_instance_information::DescribeInstanceInformationOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_instance_information::DescribeInstanceInformationError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_instance_information();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeInstanceInformation`.
          24  +
///
          25  +
/// <p>Provides information about one or more of your managed nodes, including the operating system platform, SSM Agent version, association status, and IP address. This operation does not return information for nodes that are either Stopped or Terminated.</p>
          26  +
/// <p>If you specify one or more node IDs, the operation returns information for those managed nodes. If you don't specify node IDs, it returns information for all your managed nodes. If you specify a node ID that isn't valid or a node that you don't own, you receive an error.</p><note>
          27  +
/// <p>The <code>IamRole</code> field returned for this API operation is the role assigned to an Amazon EC2 instance configured with a Systems Manager Quick Setup host management configuration or the role assigned to an on-premises managed node.</p>
          28  +
/// </note>
          29  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
pub struct DescribeInstanceInformationFluentBuilder {
          31  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          32  +
    inner: crate::operation::describe_instance_information::builders::DescribeInstanceInformationInputBuilder,
          33  +
    config_override: ::std::option::Option<crate::config::Builder>,
          34  +
}
          35  +
impl
          36  +
    crate::client::customize::internal::CustomizableSend<
          37  +
        crate::operation::describe_instance_information::DescribeInstanceInformationOutput,
          38  +
        crate::operation::describe_instance_information::DescribeInstanceInformationError,
          39  +
    > for DescribeInstanceInformationFluentBuilder
          40  +
{
          41  +
    fn send(
          42  +
        self,
          43  +
        config_override: crate::config::Builder,
          44  +
    ) -> crate::client::customize::internal::BoxFuture<
          45  +
        crate::client::customize::internal::SendResult<
          46  +
            crate::operation::describe_instance_information::DescribeInstanceInformationOutput,
          47  +
            crate::operation::describe_instance_information::DescribeInstanceInformationError,
          48  +
        >,
          49  +
    > {
          50  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          51  +
    }
          52  +
}
          53  +
impl DescribeInstanceInformationFluentBuilder {
          54  +
    /// Creates a new `DescribeInstanceInformationFluentBuilder`.
          55  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          56  +
        Self {
          57  +
            handle,
          58  +
            inner: ::std::default::Default::default(),
          59  +
            config_override: ::std::option::Option::None,
          60  +
        }
          61  +
    }
          62  +
    /// Access the DescribeInstanceInformation as a reference.
          63  +
    pub fn as_input(&self) -> &crate::operation::describe_instance_information::builders::DescribeInstanceInformationInputBuilder {
          64  +
        &self.inner
          65  +
    }
          66  +
    /// Sends the request and returns the response.
          67  +
    ///
          68  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          69  +
    /// can be matched against.
          70  +
    ///
          71  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          72  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          73  +
    /// set when configuring the client.
          74  +
    pub async fn send(
          75  +
        self,
          76  +
    ) -> ::std::result::Result<
          77  +
        crate::operation::describe_instance_information::DescribeInstanceInformationOutput,
          78  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          79  +
            crate::operation::describe_instance_information::DescribeInstanceInformationError,
          80  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          81  +
        >,
          82  +
    > {
          83  +
        let input = self
          84  +
            .inner
          85  +
            .build()
          86  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          87  +
        let runtime_plugins = crate::operation::describe_instance_information::DescribeInstanceInformation::operation_runtime_plugins(
          88  +
            self.handle.runtime_plugins.clone(),
          89  +
            &self.handle.conf,
          90  +
            self.config_override,
          91  +
        );
          92  +
        crate::operation::describe_instance_information::DescribeInstanceInformation::orchestrate(&runtime_plugins, input).await
          93  +
    }
          94  +
          95  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          96  +
    pub fn customize(
          97  +
        self,
          98  +
    ) -> crate::client::customize::CustomizableOperation<
          99  +
        crate::operation::describe_instance_information::DescribeInstanceInformationOutput,
         100  +
        crate::operation::describe_instance_information::DescribeInstanceInformationError,
         101  +
        Self,
         102  +
    > {
         103  +
        crate::client::customize::CustomizableOperation::new(self)
         104  +
    }
         105  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         106  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         107  +
        self
         108  +
    }
         109  +
         110  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         111  +
        self.config_override = config_override;
         112  +
        self
         113  +
    }
         114  +
    /// Create a paginator for this request
         115  +
    ///
         116  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_instance_information::paginator::DescribeInstanceInformationPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         117  +
    pub fn into_paginator(self) -> crate::operation::describe_instance_information::paginator::DescribeInstanceInformationPaginator {
         118  +
        crate::operation::describe_instance_information::paginator::DescribeInstanceInformationPaginator::new(self.handle, self.inner)
         119  +
    }
         120  +
    ///
         121  +
    /// Appends an item to `InstanceInformationFilterList`.
         122  +
    ///
         123  +
    /// To override the contents of this collection use [`set_instance_information_filter_list`](Self::set_instance_information_filter_list).
         124  +
    ///
         125  +
    /// <p>This is a legacy method. We recommend that you don't use this method. Instead, use the <code>Filters</code> data type. <code>Filters</code> enables you to return node information by filtering based on tags applied to managed nodes.</p><note>
         126  +
    /// <p>Attempting to use <code>InstanceInformationFilterList</code> and <code>Filters</code> leads to an exception error.</p>
         127  +
    /// </note>
         128  +
    pub fn instance_information_filter_list(mut self, input: crate::types::InstanceInformationFilter) -> Self {
         129  +
        self.inner = self.inner.instance_information_filter_list(input);
         130  +
        self
         131  +
    }
         132  +
    /// <p>This is a legacy method. We recommend that you don't use this method. Instead, use the <code>Filters</code> data type. <code>Filters</code> enables you to return node information by filtering based on tags applied to managed nodes.</p><note>
         133  +
    /// <p>Attempting to use <code>InstanceInformationFilterList</code> and <code>Filters</code> leads to an exception error.</p>
         134  +
    /// </note>
         135  +
    pub fn set_instance_information_filter_list(
         136  +
        mut self,
         137  +
        input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceInformationFilter>>,
         138  +
    ) -> Self {
         139  +
        self.inner = self.inner.set_instance_information_filter_list(input);
         140  +
        self
         141  +
    }
         142  +
    /// <p>This is a legacy method. We recommend that you don't use this method. Instead, use the <code>Filters</code> data type. <code>Filters</code> enables you to return node information by filtering based on tags applied to managed nodes.</p><note>
         143  +
    /// <p>Attempting to use <code>InstanceInformationFilterList</code> and <code>Filters</code> leads to an exception error.</p>
         144  +
    /// </note>
         145  +
    pub fn get_instance_information_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceInformationFilter>> {
         146  +
        self.inner.get_instance_information_filter_list()
         147  +
    }
         148  +
    ///
         149  +
    /// Appends an item to `Filters`.
         150  +
    ///
         151  +
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
         152  +
    ///
         153  +
    /// <p>One or more filters. Use a filter to return a more specific list of managed nodes. You can filter based on tags applied to your managed nodes. Tag filters can't be combined with other filter types. Use this <code>Filters</code> data type instead of <code>InstanceInformationFilterList</code>, which is deprecated.</p>
         154  +
    pub fn filters(mut self, input: crate::types::InstanceInformationStringFilter) -> Self {
         155  +
        self.inner = self.inner.filters(input);
         156  +
        self
         157  +
    }
         158  +
    /// <p>One or more filters. Use a filter to return a more specific list of managed nodes. You can filter based on tags applied to your managed nodes. Tag filters can't be combined with other filter types. Use this <code>Filters</code> data type instead of <code>InstanceInformationFilterList</code>, which is deprecated.</p>
         159  +
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceInformationStringFilter>>) -> Self {
         160  +
        self.inner = self.inner.set_filters(input);
         161  +
        self
         162  +
    }
         163  +
    /// <p>One or more filters. Use a filter to return a more specific list of managed nodes. You can filter based on tags applied to your managed nodes. Tag filters can't be combined with other filter types. Use this <code>Filters</code> data type instead of <code>InstanceInformationFilterList</code>, which is deprecated.</p>
         164  +
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceInformationStringFilter>> {
         165  +
        self.inner.get_filters()
         166  +
    }
         167  +
    /// <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. The default value is 10 items.</p>
         168  +
    pub fn max_results(mut self, input: i32) -> Self {
         169  +
        self.inner = self.inner.max_results(input);
         170  +
        self
         171  +
    }
         172  +
    /// <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. The default value is 10 items.</p>
         173  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         174  +
        self.inner = self.inner.set_max_results(input);
         175  +
        self
         176  +
    }
         177  +
    /// <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. The default value is 10 items.</p>
         178  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         179  +
        self.inner.get_max_results()
         180  +
    }
         181  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         182  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         183  +
        self.inner = self.inner.next_token(input.into());
         184  +
        self
         185  +
    }
         186  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         187  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         188  +
        self.inner = self.inner.set_next_token(input);
         189  +
        self
         190  +
    }
         191  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         192  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         193  +
        self.inner.get_next_token()
         194  +
    }
         195  +
}

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

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

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

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