AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b

Files changed:

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

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

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

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

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

@@ -0,1 +0,159 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_instance_associations_status::_describe_instance_associations_status_input::DescribeInstanceAssociationsStatusInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_instance_associations_status::_describe_instance_associations_status_output::DescribeInstanceAssociationsStatusOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_instance_associations_status::builders::DescribeInstanceAssociationsStatusInputBuilder {
           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_associations_status::DescribeInstanceAssociationsStatusOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_instance_associations_status();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeInstanceAssociationsStatus`.
          24  +
///
          25  +
/// <p>The status of the associations for the managed nodes.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribeInstanceAssociationsStatusFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_instance_associations_status::builders::DescribeInstanceAssociationsStatusInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusOutput,
          35  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          36  +
    > for DescribeInstanceAssociationsStatusFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusOutput,
          44  +
            crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribeInstanceAssociationsStatusFluentBuilder {
          51  +
    /// Creates a new `DescribeInstanceAssociationsStatusFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the DescribeInstanceAssociationsStatus as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_instance_associations_status::builders::DescribeInstanceAssociationsStatusInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatus::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatus::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusOutput,
          97  +
        crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
    /// Create a paginator for this request
         112  +
    ///
         113  +
    /// Paginators are used by calling [`send().await`](crate::operation::describe_instance_associations_status::paginator::DescribeInstanceAssociationsStatusPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
         114  +
    pub fn into_paginator(self) -> crate::operation::describe_instance_associations_status::paginator::DescribeInstanceAssociationsStatusPaginator {
         115  +
        crate::operation::describe_instance_associations_status::paginator::DescribeInstanceAssociationsStatusPaginator::new(self.handle, self.inner)
         116  +
    }
         117  +
    /// <p>The managed node IDs for which you want association status information.</p>
         118  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.instance_id(input.into());
         120  +
        self
         121  +
    }
         122  +
    /// <p>The managed node IDs for which you want association status information.</p>
         123  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_instance_id(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>The managed node IDs for which you want association status information.</p>
         128  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         129  +
        self.inner.get_instance_id()
         130  +
    }
         131  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         132  +
    pub fn max_results(mut self, input: i32) -> Self {
         133  +
        self.inner = self.inner.max_results(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         137  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         138  +
        self.inner = self.inner.set_max_results(input);
         139  +
        self
         140  +
    }
         141  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         142  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         143  +
        self.inner.get_max_results()
         144  +
    }
         145  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         146  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         147  +
        self.inner = self.inner.next_token(input.into());
         148  +
        self
         149  +
    }
         150  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         151  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         152  +
        self.inner = self.inner.set_next_token(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         156  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         157  +
        self.inner.get_next_token()
         158  +
    }
         159  +
}

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

@@ -0,1 +0,152 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Paginator for [`DescribeInstanceAssociationsStatus`](crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatus)
           3  +
pub struct DescribeInstanceAssociationsStatusPaginator {
           4  +
    handle: std::sync::Arc<crate::client::Handle>,
           5  +
    builder: crate::operation::describe_instance_associations_status::builders::DescribeInstanceAssociationsStatusInputBuilder,
           6  +
    stop_on_duplicate_token: bool,
           7  +
}
           8  +
           9  +
impl DescribeInstanceAssociationsStatusPaginator {
          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_associations_status::builders::DescribeInstanceAssociationsStatusInputBuilder,
          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_association_status_infos`. Queries to the underlying service
          33  +
    /// are dispatched lazily.
          34  +
    pub fn items(self) -> crate::operation::describe_instance_associations_status::paginator::DescribeInstanceAssociationsStatusPaginatorItems {
          35  +
        crate::operation::describe_instance_associations_status::paginator::DescribeInstanceAssociationsStatusPaginatorItems(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_associations_status::DescribeInstanceAssociationsStatusOutput,
          59  +
            ::aws_smithy_runtime_api::client::result::SdkError<
          60  +
                crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
          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_associations_status::DescribeInstanceAssociationsStatus::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_associations_status::DescribeInstanceAssociationsStatus::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_associations_status_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 `DescribeInstanceAssociationsStatusPaginator`
         124  +
///
         125  +
/// This is created with [`.items()`](DescribeInstanceAssociationsStatusPaginator::items)
         126  +
pub struct DescribeInstanceAssociationsStatusPaginatorItems(DescribeInstanceAssociationsStatusPaginator);
         127  +
         128  +
impl DescribeInstanceAssociationsStatusPaginatorItems {
         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::InstanceAssociationStatusInfo,
         140  +
            ::aws_smithy_runtime_api::client::result::SdkError<
         141  +
                crate::operation::describe_instance_associations_status::DescribeInstanceAssociationsStatusError,
         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_associations_status_output_output_instance_association_status_infos(page)
         148  +
                .unwrap_or_default()
         149  +
                .into_iter()
         150  +
        })
         151  +
    }
         152  +
}

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

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