AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

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

@@ -0,1 +0,346 @@
           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 DescribeDocumentPermissionOutput {
           6  +
    /// <p>The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or <code>all</code>.</p>
           7  +
    pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           8  +
    /// <p>A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.</p>
           9  +
    pub account_sharing_info_list: ::std::option::Option<::std::vec::Vec<crate::types::AccountSharingInfo>>,
          10  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
          11  +
    pub next_token: ::std::option::Option<::std::string::String>,
          12  +
    _request_id: Option<String>,
          13  +
}
          14  +
impl DescribeDocumentPermissionOutput {
          15  +
    /// <p>The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or <code>all</code>.</p>
          16  +
    ///
          17  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.account_ids.is_none()`.
          18  +
    pub fn account_ids(&self) -> &[::std::string::String] {
          19  +
        self.account_ids.as_deref().unwrap_or_default()
          20  +
    }
          21  +
    /// <p>A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.</p>
          22  +
    ///
          23  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.account_sharing_info_list.is_none()`.
          24  +
    pub fn account_sharing_info_list(&self) -> &[crate::types::AccountSharingInfo] {
          25  +
        self.account_sharing_info_list.as_deref().unwrap_or_default()
          26  +
    }
          27  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
          28  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          29  +
        self.next_token.as_deref()
          30  +
    }
          31  +
}
          32  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_IDS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AccountIdList$member", "com.amazonaws.ssm", "AccountIdList"),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "member",
          36  +
    0,
          37  +
)
          38  +
.with_xml_name("AccountId");
          39  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_IDS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts(
          41  +
        "com.amazonaws.ssm.synthetic#DescribeDocumentPermissionOutput$AccountIds",
          42  +
        "com.amazonaws.ssm.synthetic",
          43  +
        "DescribeDocumentPermissionOutput",
          44  +
    ),
          45  +
    ::aws_smithy_schema::ShapeType::List,
          46  +
    "AccountIds",
          47  +
    0,
          48  +
)
          49  +
.with_list_member(&DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_IDS_MEMBER);
          50  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_SHARING_INFO_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> =
          51  +
    ::aws_smithy_schema::Schema::new_member(
          52  +
        ::aws_smithy_schema::ShapeId::from_parts(
          53  +
            "com.amazonaws.ssm#AccountSharingInfoList$member",
          54  +
            "com.amazonaws.ssm",
          55  +
            "AccountSharingInfoList",
          56  +
        ),
          57  +
        ::aws_smithy_schema::ShapeType::Structure,
          58  +
        "member",
          59  +
        0,
          60  +
    )
          61  +
    .with_xml_name("AccountSharingInfo");
          62  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_SHARING_INFO_LIST: ::aws_smithy_schema::Schema<'static> =
          63  +
    ::aws_smithy_schema::Schema::new_member(
          64  +
        ::aws_smithy_schema::ShapeId::from_parts(
          65  +
            "com.amazonaws.ssm.synthetic#DescribeDocumentPermissionOutput$AccountSharingInfoList",
          66  +
            "com.amazonaws.ssm.synthetic",
          67  +
            "DescribeDocumentPermissionOutput",
          68  +
        ),
          69  +
        ::aws_smithy_schema::ShapeType::List,
          70  +
        "AccountSharingInfoList",
          71  +
        1,
          72  +
    )
          73  +
    .with_list_member(&DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_SHARING_INFO_LIST_MEMBER);
          74  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts(
          76  +
        "com.amazonaws.ssm.synthetic#DescribeDocumentPermissionOutput$NextToken",
          77  +
        "com.amazonaws.ssm.synthetic",
          78  +
        "DescribeDocumentPermissionOutput",
          79  +
    ),
          80  +
    ::aws_smithy_schema::ShapeType::String,
          81  +
    "NextToken",
          82  +
    2,
          83  +
);
          84  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          85  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          86  +
    ::aws_smithy_schema::ShapeType::String,
          87  +
    "request_id",
          88  +
    3,
          89  +
)
          90  +
.with_http_header("x-amzn-requestid");
          91  +
static DESCRIBEDOCUMENTPERMISSIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          92  +
    ::aws_smithy_schema::ShapeId::from_parts(
          93  +
        "com.amazonaws.ssm.synthetic#DescribeDocumentPermissionOutput",
          94  +
        "com.amazonaws.ssm.synthetic",
          95  +
        "DescribeDocumentPermissionOutput",
          96  +
    ),
          97  +
    ::aws_smithy_schema::ShapeType::Structure,
          98  +
    &[
          99  +
        &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_IDS,
         100  +
        &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_SHARING_INFO_LIST,
         101  +
        &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_NEXT_TOKEN,
         102  +
        &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER__REQUEST_ID,
         103  +
    ],
         104  +
)
         105  +
.with_original_name("DescribeDocumentPermissionResponse");
         106  +
impl DescribeDocumentPermissionOutput {
         107  +
    /// The schema for this shape.
         108  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &DESCRIBEDOCUMENTPERMISSIONOUTPUT_SCHEMA;
         109  +
}
         110  +
impl ::aws_smithy_schema::serde::SerializableStruct for DescribeDocumentPermissionOutput {
         111  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         112  +
    fn serialize_members(
         113  +
        &self,
         114  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         115  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         116  +
        if let Some(ref val) = self.account_ids {
         117  +
            ser.write_list(
         118  +
                &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_IDS,
         119  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         120  +
                    for item in val {
         121  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         122  +
                    }
         123  +
                    Ok(())
         124  +
                },
         125  +
            )?;
         126  +
        }
         127  +
        if let Some(ref val) = self.account_sharing_info_list {
         128  +
            ser.write_list(
         129  +
                &DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_ACCOUNT_SHARING_INFO_LIST,
         130  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         131  +
                    for item in val {
         132  +
                        ser.write_struct(crate::types::AccountSharingInfo::SCHEMA, item)?;
         133  +
                    }
         134  +
                    Ok(())
         135  +
                },
         136  +
            )?;
         137  +
        }
         138  +
        if let Some(ref val) = self.next_token {
         139  +
            ser.write_string(&DESCRIBEDOCUMENTPERMISSIONOUTPUT_MEMBER_NEXT_TOKEN, val)?;
         140  +
        }
         141  +
        Ok(())
         142  +
    }
         143  +
}
         144  +
impl DescribeDocumentPermissionOutput {
         145  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         146  +
    pub fn deserialize(
         147  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         148  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         149  +
        #[allow(unused_variables, unused_mut)]
         150  +
        let mut builder = Self::builder();
         151  +
        #[allow(
         152  +
            unused_variables,
         153  +
            unreachable_code,
         154  +
            clippy::single_match,
         155  +
            clippy::match_single_binding,
         156  +
            clippy::diverging_sub_expression
         157  +
        )]
         158  +
        deserializer.read_struct(&DESCRIBEDOCUMENTPERMISSIONOUTPUT_SCHEMA, &mut |member, deser| {
         159  +
            match member.member_index() {
         160  +
                Some(0) => {
         161  +
                    if deser.is_null() {
         162  +
                        deser.read_null()?;
         163  +
                    } else {
         164  +
                        builder.account_ids = Some(deser.read_string_list(member)?);
         165  +
                    }
         166  +
                }
         167  +
                Some(1) => {
         168  +
                    if deser.is_null() {
         169  +
                        deser.read_null()?;
         170  +
                    } else {
         171  +
                        builder.account_sharing_info_list = Some({
         172  +
                            let mut container = Vec::new();
         173  +
                            deser.read_list(member, &mut |deser| {
         174  +
                                container.push(crate::types::AccountSharingInfo::deserialize(deser)?);
         175  +
                                Ok(())
         176  +
                            })?;
         177  +
                            container
         178  +
                        });
         179  +
                    }
         180  +
                }
         181  +
                Some(2) => {
         182  +
                    if deser.is_null() {
         183  +
                        deser.read_null()?;
         184  +
                    } else {
         185  +
                        builder.next_token = Some(deser.read_string(member)?);
         186  +
                    }
         187  +
                }
         188  +
                Some(3) => {
         189  +
                    builder._request_id = Some(deser.read_string(member)?);
         190  +
                }
         191  +
                _ => {}
         192  +
            }
         193  +
            Ok(())
         194  +
        })?;
         195  +
        Ok(builder.build())
         196  +
    }
         197  +
}
         198  +
impl DescribeDocumentPermissionOutput {
         199  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         200  +
    /// Header-bound members are read directly from headers, avoiding runtime
         201  +
    /// member iteration overhead. Body members are read via the deserializer.
         202  +
    pub fn deserialize_with_response(
         203  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         204  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         205  +
        _status: u16,
         206  +
        _body: &[u8],
         207  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         208  +
        #[allow(unused_variables, unused_mut)]
         209  +
        let mut builder = Self::builder();
         210  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         211  +
            builder._request_id = Some(val.to_string());
         212  +
        }
         213  +
         214  +
        #[allow(
         215  +
            unused_variables,
         216  +
            unreachable_code,
         217  +
            clippy::single_match,
         218  +
            clippy::match_single_binding,
         219  +
            clippy::diverging_sub_expression
         220  +
        )]
         221  +
        deserializer.read_struct(&DESCRIBEDOCUMENTPERMISSIONOUTPUT_SCHEMA, &mut |member, deser| {
         222  +
            match member.member_index() {
         223  +
                Some(0) => {
         224  +
                    builder.account_ids = Some(deser.read_string_list(member)?);
         225  +
                }
         226  +
                Some(1) => {
         227  +
                    builder.account_sharing_info_list = Some({
         228  +
                        let mut container = Vec::new();
         229  +
                        deser.read_list(member, &mut |deser| {
         230  +
                            container.push(crate::types::AccountSharingInfo::deserialize(deser)?);
         231  +
                            Ok(())
         232  +
                        })?;
         233  +
                        container
         234  +
                    });
         235  +
                }
         236  +
                Some(2) => {
         237  +
                    builder.next_token = Some(deser.read_string(member)?);
         238  +
                }
         239  +
                _ => {}
         240  +
            }
         241  +
            Ok(())
         242  +
        })?;
         243  +
        Ok(builder.build())
         244  +
    }
         245  +
}
         246  +
impl ::aws_types::request_id::RequestId for DescribeDocumentPermissionOutput {
         247  +
    fn request_id(&self) -> Option<&str> {
         248  +
        self._request_id.as_deref()
         249  +
    }
         250  +
}
         251  +
impl DescribeDocumentPermissionOutput {
         252  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         253  +
        self._request_id = request_id;
         254  +
        self
         255  +
    }
         256  +
}
         257  +
impl DescribeDocumentPermissionOutput {
         258  +
    /// Creates a new builder-style object to manufacture [`DescribeDocumentPermissionOutput`](crate::operation::describe_document_permission::DescribeDocumentPermissionOutput).
         259  +
    pub fn builder() -> crate::operation::describe_document_permission::builders::DescribeDocumentPermissionOutputBuilder {
         260  +
        crate::operation::describe_document_permission::builders::DescribeDocumentPermissionOutputBuilder::default()
         261  +
    }
         262  +
}
         263  +
         264  +
/// A builder for [`DescribeDocumentPermissionOutput`](crate::operation::describe_document_permission::DescribeDocumentPermissionOutput).
         265  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         266  +
#[non_exhaustive]
         267  +
pub struct DescribeDocumentPermissionOutputBuilder {
         268  +
    pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         269  +
    pub(crate) account_sharing_info_list: ::std::option::Option<::std::vec::Vec<crate::types::AccountSharingInfo>>,
         270  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         271  +
    _request_id: Option<String>,
         272  +
}
         273  +
impl DescribeDocumentPermissionOutputBuilder {
         274  +
    /// Appends an item to `account_ids`.
         275  +
    ///
         276  +
    /// To override the contents of this collection use [`set_account_ids`](Self::set_account_ids).
         277  +
    ///
         278  +
    /// <p>The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or <code>all</code>.</p>
         279  +
    pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         280  +
        let mut v = self.account_ids.unwrap_or_default();
         281  +
        v.push(input.into());
         282  +
        self.account_ids = ::std::option::Option::Some(v);
         283  +
        self
         284  +
    }
         285  +
    /// <p>The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or <code>all</code>.</p>
         286  +
    pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         287  +
        self.account_ids = input;
         288  +
        self
         289  +
    }
         290  +
    /// <p>The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or <code>all</code>.</p>
         291  +
    pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         292  +
        &self.account_ids
         293  +
    }
         294  +
    /// Appends an item to `account_sharing_info_list`.
         295  +
    ///
         296  +
    /// To override the contents of this collection use [`set_account_sharing_info_list`](Self::set_account_sharing_info_list).
         297  +
    ///
         298  +
    /// <p>A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.</p>
         299  +
    pub fn account_sharing_info_list(mut self, input: crate::types::AccountSharingInfo) -> Self {
         300  +
        let mut v = self.account_sharing_info_list.unwrap_or_default();
         301  +
        v.push(input);
         302  +
        self.account_sharing_info_list = ::std::option::Option::Some(v);
         303  +
        self
         304  +
    }
         305  +
    /// <p>A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.</p>
         306  +
    pub fn set_account_sharing_info_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccountSharingInfo>>) -> Self {
         307  +
        self.account_sharing_info_list = input;
         308  +
        self
         309  +
    }
         310  +
    /// <p>A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.</p>
         311  +
    pub fn get_account_sharing_info_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccountSharingInfo>> {
         312  +
        &self.account_sharing_info_list
         313  +
    }
         314  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         315  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         316  +
        self.next_token = ::std::option::Option::Some(input.into());
         317  +
        self
         318  +
    }
         319  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         320  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         321  +
        self.next_token = input;
         322  +
        self
         323  +
    }
         324  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         325  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         326  +
        &self.next_token
         327  +
    }
         328  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         329  +
        self._request_id = Some(request_id.into());
         330  +
        self
         331  +
    }
         332  +
         333  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         334  +
        self._request_id = request_id;
         335  +
        self
         336  +
    }
         337  +
    /// Consumes the builder and constructs a [`DescribeDocumentPermissionOutput`](crate::operation::describe_document_permission::DescribeDocumentPermissionOutput).
         338  +
    pub fn build(self) -> crate::operation::describe_document_permission::DescribeDocumentPermissionOutput {
         339  +
        crate::operation::describe_document_permission::DescribeDocumentPermissionOutput {
         340  +
            account_ids: self.account_ids,
         341  +
            account_sharing_info_list: self.account_sharing_info_list,
         342  +
            next_token: self.next_token,
         343  +
            _request_id: self._request_id,
         344  +
        }
         345  +
    }
         346  +
}

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

@@ -0,1 +0,167 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::describe_document_permission::_describe_document_permission_input::DescribeDocumentPermissionInputBuilder;
           3  +
           4  +
pub use crate::operation::describe_document_permission::_describe_document_permission_output::DescribeDocumentPermissionOutputBuilder;
           5  +
           6  +
impl crate::operation::describe_document_permission::builders::DescribeDocumentPermissionInputBuilder {
           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_document_permission::DescribeDocumentPermissionOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::describe_document_permission::DescribeDocumentPermissionError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.describe_document_permission();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `DescribeDocumentPermission`.
          24  +
///
          25  +
/// <p>Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's Amazon Web Services account ID) or publicly (<i>All</i>).</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct DescribeDocumentPermissionFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::describe_document_permission::builders::DescribeDocumentPermissionInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::describe_document_permission::DescribeDocumentPermissionOutput,
          35  +
        crate::operation::describe_document_permission::DescribeDocumentPermissionError,
          36  +
    > for DescribeDocumentPermissionFluentBuilder
          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_document_permission::DescribeDocumentPermissionOutput,
          44  +
            crate::operation::describe_document_permission::DescribeDocumentPermissionError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl DescribeDocumentPermissionFluentBuilder {
          51  +
    /// Creates a new `DescribeDocumentPermissionFluentBuilder`.
          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 DescribeDocumentPermission as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::describe_document_permission::builders::DescribeDocumentPermissionInputBuilder {
          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_document_permission::DescribeDocumentPermissionOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::describe_document_permission::DescribeDocumentPermissionError,
          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_document_permission::DescribeDocumentPermission::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::describe_document_permission::DescribeDocumentPermission::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_document_permission::DescribeDocumentPermissionOutput,
          97  +
        crate::operation::describe_document_permission::DescribeDocumentPermissionError,
          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  +
    /// <p>The name of the document for which you are the owner.</p>
         112  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         113  +
        self.inner = self.inner.name(input.into());
         114  +
        self
         115  +
    }
         116  +
    /// <p>The name of the document for which you are the owner.</p>
         117  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         118  +
        self.inner = self.inner.set_name(input);
         119  +
        self
         120  +
    }
         121  +
    /// <p>The name of the document for which you are the owner.</p>
         122  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         123  +
        self.inner.get_name()
         124  +
    }
         125  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         126  +
    pub fn permission_type(mut self, input: crate::types::DocumentPermissionType) -> Self {
         127  +
        self.inner = self.inner.permission_type(input);
         128  +
        self
         129  +
    }
         130  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         131  +
    pub fn set_permission_type(mut self, input: ::std::option::Option<crate::types::DocumentPermissionType>) -> Self {
         132  +
        self.inner = self.inner.set_permission_type(input);
         133  +
        self
         134  +
    }
         135  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         136  +
    pub fn get_permission_type(&self) -> &::std::option::Option<crate::types::DocumentPermissionType> {
         137  +
        self.inner.get_permission_type()
         138  +
    }
         139  +
    /// <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>
         140  +
    pub fn max_results(mut self, input: i32) -> Self {
         141  +
        self.inner = self.inner.max_results(input);
         142  +
        self
         143  +
    }
         144  +
    /// <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>
         145  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         146  +
        self.inner = self.inner.set_max_results(input);
         147  +
        self
         148  +
    }
         149  +
    /// <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>
         150  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         151  +
        self.inner.get_max_results()
         152  +
    }
         153  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         154  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         155  +
        self.inner = self.inner.next_token(input.into());
         156  +
        self
         157  +
    }
         158  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         159  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         160  +
        self.inner = self.inner.set_next_token(input);
         161  +
        self
         162  +
    }
         163  +
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
         164  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         165  +
        self.inner.get_next_token()
         166  +
    }
         167  +
}

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

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