AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,359 @@
           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 ModifyDocumentPermissionInput {
           6  +
    /// <p>The name of the document that you want to share.</p>
           7  +
    pub name: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
           9  +
    pub permission_type: ::std::option::Option<crate::types::DocumentPermissionType>,
          10  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
          11  +
    pub account_ids_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          12  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
          13  +
    pub account_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          14  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
          15  +
    pub shared_document_version: ::std::option::Option<::std::string::String>,
          16  +
}
          17  +
impl ModifyDocumentPermissionInput {
          18  +
    /// <p>The name of the document that you want to share.</p>
          19  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          20  +
        self.name.as_deref()
          21  +
    }
          22  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
          23  +
    pub fn permission_type(&self) -> ::std::option::Option<&crate::types::DocumentPermissionType> {
          24  +
        self.permission_type.as_ref()
          25  +
    }
          26  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
          27  +
    ///
          28  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.account_ids_to_add.is_none()`.
          29  +
    pub fn account_ids_to_add(&self) -> &[::std::string::String] {
          30  +
        self.account_ids_to_add.as_deref().unwrap_or_default()
          31  +
    }
          32  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
          33  +
    ///
          34  +
    /// 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_to_remove.is_none()`.
          35  +
    pub fn account_ids_to_remove(&self) -> &[::std::string::String] {
          36  +
        self.account_ids_to_remove.as_deref().unwrap_or_default()
          37  +
    }
          38  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
          39  +
    pub fn shared_document_version(&self) -> ::std::option::Option<&str> {
          40  +
        self.shared_document_version.as_deref()
          41  +
    }
          42  +
}
          43  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput$Name",
          46  +
        "com.amazonaws.ssm.synthetic",
          47  +
        "ModifyDocumentPermissionInput",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "Name",
          51  +
    0,
          52  +
);
          53  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_PERMISSION_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          54  +
    ::aws_smithy_schema::ShapeId::from_parts(
          55  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput$PermissionType",
          56  +
        "com.amazonaws.ssm.synthetic",
          57  +
        "ModifyDocumentPermissionInput",
          58  +
    ),
          59  +
    ::aws_smithy_schema::ShapeType::String,
          60  +
    "PermissionType",
          61  +
    1,
          62  +
);
          63  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_ADD_MEMBER: ::aws_smithy_schema::Schema<'static> =
          64  +
    ::aws_smithy_schema::Schema::new_member(
          65  +
        ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AccountIdList$member", "com.amazonaws.ssm", "AccountIdList"),
          66  +
        ::aws_smithy_schema::ShapeType::String,
          67  +
        "member",
          68  +
        0,
          69  +
    )
          70  +
    .with_xml_name("AccountId");
          71  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_ADD: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          72  +
    ::aws_smithy_schema::ShapeId::from_parts(
          73  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput$AccountIdsToAdd",
          74  +
        "com.amazonaws.ssm.synthetic",
          75  +
        "ModifyDocumentPermissionInput",
          76  +
    ),
          77  +
    ::aws_smithy_schema::ShapeType::List,
          78  +
    "AccountIdsToAdd",
          79  +
    2,
          80  +
)
          81  +
.with_list_member(&MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_ADD_MEMBER);
          82  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_REMOVE_MEMBER: ::aws_smithy_schema::Schema<'static> =
          83  +
    ::aws_smithy_schema::Schema::new_member(
          84  +
        ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AccountIdList$member", "com.amazonaws.ssm", "AccountIdList"),
          85  +
        ::aws_smithy_schema::ShapeType::String,
          86  +
        "member",
          87  +
        0,
          88  +
    )
          89  +
    .with_xml_name("AccountId");
          90  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_REMOVE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts(
          92  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput$AccountIdsToRemove",
          93  +
        "com.amazonaws.ssm.synthetic",
          94  +
        "ModifyDocumentPermissionInput",
          95  +
    ),
          96  +
    ::aws_smithy_schema::ShapeType::List,
          97  +
    "AccountIdsToRemove",
          98  +
    3,
          99  +
)
         100  +
.with_list_member(&MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_REMOVE_MEMBER);
         101  +
static MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_SHARED_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         102  +
    ::aws_smithy_schema::ShapeId::from_parts(
         103  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput$SharedDocumentVersion",
         104  +
        "com.amazonaws.ssm.synthetic",
         105  +
        "ModifyDocumentPermissionInput",
         106  +
    ),
         107  +
    ::aws_smithy_schema::ShapeType::String,
         108  +
    "SharedDocumentVersion",
         109  +
    4,
         110  +
);
         111  +
static MODIFYDOCUMENTPERMISSIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         112  +
    ::aws_smithy_schema::ShapeId::from_parts(
         113  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionInput",
         114  +
        "com.amazonaws.ssm.synthetic",
         115  +
        "ModifyDocumentPermissionInput",
         116  +
    ),
         117  +
    ::aws_smithy_schema::ShapeType::Structure,
         118  +
    &[
         119  +
        &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_NAME,
         120  +
        &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_PERMISSION_TYPE,
         121  +
        &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_ADD,
         122  +
        &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_REMOVE,
         123  +
        &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_SHARED_DOCUMENT_VERSION,
         124  +
    ],
         125  +
)
         126  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         127  +
.with_original_name("ModifyDocumentPermissionRequest");
         128  +
impl ModifyDocumentPermissionInput {
         129  +
    /// The schema for this shape.
         130  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MODIFYDOCUMENTPERMISSIONINPUT_SCHEMA;
         131  +
}
         132  +
impl ::aws_smithy_schema::serde::SerializableStruct for ModifyDocumentPermissionInput {
         133  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         134  +
    fn serialize_members(
         135  +
        &self,
         136  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         137  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         138  +
        if let Some(ref val) = self.name {
         139  +
            ser.write_string(&MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_NAME, val)?;
         140  +
        }
         141  +
        if let Some(ref val) = self.permission_type {
         142  +
            ser.write_string(&MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_PERMISSION_TYPE, val.as_str())?;
         143  +
        }
         144  +
        if let Some(ref val) = self.account_ids_to_add {
         145  +
            ser.write_list(
         146  +
                &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_ADD,
         147  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         148  +
                    for item in val {
         149  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         150  +
                    }
         151  +
                    Ok(())
         152  +
                },
         153  +
            )?;
         154  +
        }
         155  +
        if let Some(ref val) = self.account_ids_to_remove {
         156  +
            ser.write_list(
         157  +
                &MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_ACCOUNT_IDS_TO_REMOVE,
         158  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         159  +
                    for item in val {
         160  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         161  +
                    }
         162  +
                    Ok(())
         163  +
                },
         164  +
            )?;
         165  +
        }
         166  +
        if let Some(ref val) = self.shared_document_version {
         167  +
            ser.write_string(&MODIFYDOCUMENTPERMISSIONINPUT_MEMBER_SHARED_DOCUMENT_VERSION, val)?;
         168  +
        }
         169  +
        Ok(())
         170  +
    }
         171  +
}
         172  +
impl ModifyDocumentPermissionInput {
         173  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         174  +
    pub fn deserialize(
         175  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         176  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         177  +
        #[allow(unused_variables, unused_mut)]
         178  +
        let mut builder = Self::builder();
         179  +
        #[allow(
         180  +
            unused_variables,
         181  +
            unreachable_code,
         182  +
            clippy::single_match,
         183  +
            clippy::match_single_binding,
         184  +
            clippy::diverging_sub_expression
         185  +
        )]
         186  +
        deserializer.read_struct(&MODIFYDOCUMENTPERMISSIONINPUT_SCHEMA, &mut |member, deser| {
         187  +
            match member.member_index() {
         188  +
                Some(0) => {
         189  +
                    if deser.is_null() {
         190  +
                        deser.read_null()?;
         191  +
                    } else {
         192  +
                        builder.name = Some(deser.read_string(member)?);
         193  +
                    }
         194  +
                }
         195  +
                Some(1) => {
         196  +
                    if deser.is_null() {
         197  +
                        deser.read_null()?;
         198  +
                    } else {
         199  +
                        builder.permission_type = Some(crate::types::DocumentPermissionType::from(deser.read_string(member)?.as_str()));
         200  +
                    }
         201  +
                }
         202  +
                Some(2) => {
         203  +
                    if deser.is_null() {
         204  +
                        deser.read_null()?;
         205  +
                    } else {
         206  +
                        builder.account_ids_to_add = Some(deser.read_string_list(member)?);
         207  +
                    }
         208  +
                }
         209  +
                Some(3) => {
         210  +
                    if deser.is_null() {
         211  +
                        deser.read_null()?;
         212  +
                    } else {
         213  +
                        builder.account_ids_to_remove = Some(deser.read_string_list(member)?);
         214  +
                    }
         215  +
                }
         216  +
                Some(4) => {
         217  +
                    if deser.is_null() {
         218  +
                        deser.read_null()?;
         219  +
                    } else {
         220  +
                        builder.shared_document_version = Some(deser.read_string(member)?);
         221  +
                    }
         222  +
                }
         223  +
                _ => {}
         224  +
            }
         225  +
            Ok(())
         226  +
        })?;
         227  +
        builder.name = builder.name.or(Some(String::new()));
         228  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         229  +
    }
         230  +
}
         231  +
impl ModifyDocumentPermissionInput {
         232  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         233  +
    pub fn deserialize_with_response(
         234  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         235  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         236  +
        _status: u16,
         237  +
        _body: &[u8],
         238  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         239  +
        Self::deserialize(deserializer)
         240  +
    }
         241  +
}
         242  +
impl ModifyDocumentPermissionInput {
         243  +
    /// Creates a new builder-style object to manufacture [`ModifyDocumentPermissionInput`](crate::operation::modify_document_permission::ModifyDocumentPermissionInput).
         244  +
    pub fn builder() -> crate::operation::modify_document_permission::builders::ModifyDocumentPermissionInputBuilder {
         245  +
        crate::operation::modify_document_permission::builders::ModifyDocumentPermissionInputBuilder::default()
         246  +
    }
         247  +
}
         248  +
         249  +
/// A builder for [`ModifyDocumentPermissionInput`](crate::operation::modify_document_permission::ModifyDocumentPermissionInput).
         250  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         251  +
#[non_exhaustive]
         252  +
pub struct ModifyDocumentPermissionInputBuilder {
         253  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         254  +
    pub(crate) permission_type: ::std::option::Option<crate::types::DocumentPermissionType>,
         255  +
    pub(crate) account_ids_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         256  +
    pub(crate) account_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         257  +
    pub(crate) shared_document_version: ::std::option::Option<::std::string::String>,
         258  +
}
         259  +
impl ModifyDocumentPermissionInputBuilder {
         260  +
    /// <p>The name of the document that you want to share.</p>
         261  +
    /// This field is required.
         262  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         263  +
        self.name = ::std::option::Option::Some(input.into());
         264  +
        self
         265  +
    }
         266  +
    /// <p>The name of the document that you want to share.</p>
         267  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         268  +
        self.name = input;
         269  +
        self
         270  +
    }
         271  +
    /// <p>The name of the document that you want to share.</p>
         272  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         273  +
        &self.name
         274  +
    }
         275  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         276  +
    /// This field is required.
         277  +
    pub fn permission_type(mut self, input: crate::types::DocumentPermissionType) -> Self {
         278  +
        self.permission_type = ::std::option::Option::Some(input);
         279  +
        self
         280  +
    }
         281  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         282  +
    pub fn set_permission_type(mut self, input: ::std::option::Option<crate::types::DocumentPermissionType>) -> Self {
         283  +
        self.permission_type = input;
         284  +
        self
         285  +
    }
         286  +
    /// <p>The permission type for the document. The permission type can be <i>Share</i>.</p>
         287  +
    pub fn get_permission_type(&self) -> &::std::option::Option<crate::types::DocumentPermissionType> {
         288  +
        &self.permission_type
         289  +
    }
         290  +
    /// Appends an item to `account_ids_to_add`.
         291  +
    ///
         292  +
    /// To override the contents of this collection use [`set_account_ids_to_add`](Self::set_account_ids_to_add).
         293  +
    ///
         294  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         295  +
    pub fn account_ids_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         296  +
        let mut v = self.account_ids_to_add.unwrap_or_default();
         297  +
        v.push(input.into());
         298  +
        self.account_ids_to_add = ::std::option::Option::Some(v);
         299  +
        self
         300  +
    }
         301  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         302  +
    pub fn set_account_ids_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         303  +
        self.account_ids_to_add = input;
         304  +
        self
         305  +
    }
         306  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         307  +
    pub fn get_account_ids_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         308  +
        &self.account_ids_to_add
         309  +
    }
         310  +
    /// Appends an item to `account_ids_to_remove`.
         311  +
    ///
         312  +
    /// To override the contents of this collection use [`set_account_ids_to_remove`](Self::set_account_ids_to_remove).
         313  +
    ///
         314  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         315  +
    pub fn account_ids_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         316  +
        let mut v = self.account_ids_to_remove.unwrap_or_default();
         317  +
        v.push(input.into());
         318  +
        self.account_ids_to_remove = ::std::option::Option::Some(v);
         319  +
        self
         320  +
    }
         321  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         322  +
    pub fn set_account_ids_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         323  +
        self.account_ids_to_remove = input;
         324  +
        self
         325  +
    }
         326  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         327  +
    pub fn get_account_ids_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         328  +
        &self.account_ids_to_remove
         329  +
    }
         330  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         331  +
    pub fn shared_document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         332  +
        self.shared_document_version = ::std::option::Option::Some(input.into());
         333  +
        self
         334  +
    }
         335  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         336  +
    pub fn set_shared_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         337  +
        self.shared_document_version = input;
         338  +
        self
         339  +
    }
         340  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         341  +
    pub fn get_shared_document_version(&self) -> &::std::option::Option<::std::string::String> {
         342  +
        &self.shared_document_version
         343  +
    }
         344  +
    /// Consumes the builder and constructs a [`ModifyDocumentPermissionInput`](crate::operation::modify_document_permission::ModifyDocumentPermissionInput).
         345  +
    pub fn build(
         346  +
        self,
         347  +
    ) -> ::std::result::Result<
         348  +
        crate::operation::modify_document_permission::ModifyDocumentPermissionInput,
         349  +
        ::aws_smithy_types::error::operation::BuildError,
         350  +
    > {
         351  +
        ::std::result::Result::Ok(crate::operation::modify_document_permission::ModifyDocumentPermissionInput {
         352  +
            name: self.name,
         353  +
            permission_type: self.permission_type,
         354  +
            account_ids_to_add: self.account_ids_to_add,
         355  +
            account_ids_to_remove: self.account_ids_to_remove,
         356  +
            shared_document_version: self.shared_document_version,
         357  +
        })
         358  +
    }
         359  +
}

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

@@ -0,1 +0,122 @@
           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 ModifyDocumentPermissionOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static MODIFYDOCUMENTPERMISSIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
           9  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          10  +
    ::aws_smithy_schema::ShapeType::String,
          11  +
    "request_id",
          12  +
    0,
          13  +
)
          14  +
.with_http_header("x-amzn-requestid");
          15  +
static MODIFYDOCUMENTPERMISSIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#ModifyDocumentPermissionOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "ModifyDocumentPermissionOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&MODIFYDOCUMENTPERMISSIONOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("ModifyDocumentPermissionResponse");
          25  +
impl ModifyDocumentPermissionOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MODIFYDOCUMENTPERMISSIONOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for ModifyDocumentPermissionOutput {
          30  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          31  +
    fn serialize_members(
          32  +
        &self,
          33  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          34  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          35  +
        Ok(())
          36  +
    }
          37  +
}
          38  +
impl ModifyDocumentPermissionOutput {
          39  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          42  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          43  +
        #[allow(unused_variables, unused_mut)]
          44  +
        let mut builder = Self::builder();
          45  +
        #[allow(
          46  +
            unused_variables,
          47  +
            unreachable_code,
          48  +
            clippy::single_match,
          49  +
            clippy::match_single_binding,
          50  +
            clippy::diverging_sub_expression
          51  +
        )]
          52  +
        deserializer.read_struct(&MODIFYDOCUMENTPERMISSIONOUTPUT_SCHEMA, &mut |member, deser| {
          53  +
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
          57  +
                _ => {}
          58  +
            }
          59  +
            Ok(())
          60  +
        })?;
          61  +
        Ok(builder.build())
          62  +
    }
          63  +
}
          64  +
impl ModifyDocumentPermissionOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
          82  +
impl ::aws_types::request_id::RequestId for ModifyDocumentPermissionOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl ModifyDocumentPermissionOutput {
          88  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
          89  +
        self._request_id = request_id;
          90  +
        self
          91  +
    }
          92  +
}
          93  +
impl ModifyDocumentPermissionOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`ModifyDocumentPermissionOutput`](crate::operation::modify_document_permission::ModifyDocumentPermissionOutput).
          95  +
    pub fn builder() -> crate::operation::modify_document_permission::builders::ModifyDocumentPermissionOutputBuilder {
          96  +
        crate::operation::modify_document_permission::builders::ModifyDocumentPermissionOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`ModifyDocumentPermissionOutput`](crate::operation::modify_document_permission::ModifyDocumentPermissionOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct ModifyDocumentPermissionOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl ModifyDocumentPermissionOutputBuilder {
         107  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         108  +
        self._request_id = Some(request_id.into());
         109  +
        self
         110  +
    }
         111  +
         112  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         113  +
        self._request_id = request_id;
         114  +
        self
         115  +
    }
         116  +
    /// Consumes the builder and constructs a [`ModifyDocumentPermissionOutput`](crate::operation::modify_document_permission::ModifyDocumentPermissionOutput).
         117  +
    pub fn build(self) -> crate::operation::modify_document_permission::ModifyDocumentPermissionOutput {
         118  +
        crate::operation::modify_document_permission::ModifyDocumentPermissionOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,191 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::modify_document_permission::_modify_document_permission_input::ModifyDocumentPermissionInputBuilder;
           3  +
           4  +
pub use crate::operation::modify_document_permission::_modify_document_permission_output::ModifyDocumentPermissionOutputBuilder;
           5  +
           6  +
impl crate::operation::modify_document_permission::builders::ModifyDocumentPermissionInputBuilder {
           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::modify_document_permission::ModifyDocumentPermissionOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::modify_document_permission::ModifyDocumentPermissionError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.modify_document_permission();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `ModifyDocumentPermission`.
          24  +
///
          25  +
/// <p>Shares a Amazon Web Services Systems Manager document (SSM document)publicly or privately. If you share a document privately, you must specify the Amazon Web Services user IDs for those people who can use the document. If you share a document publicly, you must specify <i>All</i> as the account ID.</p>
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct ModifyDocumentPermissionFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::modify_document_permission::builders::ModifyDocumentPermissionInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::modify_document_permission::ModifyDocumentPermissionOutput,
          35  +
        crate::operation::modify_document_permission::ModifyDocumentPermissionError,
          36  +
    > for ModifyDocumentPermissionFluentBuilder
          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::modify_document_permission::ModifyDocumentPermissionOutput,
          44  +
            crate::operation::modify_document_permission::ModifyDocumentPermissionError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl ModifyDocumentPermissionFluentBuilder {
          51  +
    /// Creates a new `ModifyDocumentPermissionFluentBuilder`.
          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 ModifyDocumentPermission as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::modify_document_permission::builders::ModifyDocumentPermissionInputBuilder {
          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::modify_document_permission::ModifyDocumentPermissionOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::modify_document_permission::ModifyDocumentPermissionError,
          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::modify_document_permission::ModifyDocumentPermission::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::modify_document_permission::ModifyDocumentPermission::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::modify_document_permission::ModifyDocumentPermissionOutput,
          97  +
        crate::operation::modify_document_permission::ModifyDocumentPermissionError,
          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 that you want to share.</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 that you want to share.</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 that you want to share.</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  +
    ///
         140  +
    /// Appends an item to `AccountIdsToAdd`.
         141  +
    ///
         142  +
    /// To override the contents of this collection use [`set_account_ids_to_add`](Self::set_account_ids_to_add).
         143  +
    ///
         144  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         145  +
    pub fn account_ids_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         146  +
        self.inner = self.inner.account_ids_to_add(input.into());
         147  +
        self
         148  +
    }
         149  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         150  +
    pub fn set_account_ids_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         151  +
        self.inner = self.inner.set_account_ids_to_add(input);
         152  +
        self
         153  +
    }
         154  +
    /// <p>The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or <i>All</i>. You must specify a value for this parameter or the <code>AccountIdsToRemove</code> parameter.</p>
         155  +
    pub fn get_account_ids_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         156  +
        self.inner.get_account_ids_to_add()
         157  +
    }
         158  +
    ///
         159  +
    /// Appends an item to `AccountIdsToRemove`.
         160  +
    ///
         161  +
    /// To override the contents of this collection use [`set_account_ids_to_remove`](Self::set_account_ids_to_remove).
         162  +
    ///
         163  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         164  +
    pub fn account_ids_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         165  +
        self.inner = self.inner.account_ids_to_remove(input.into());
         166  +
        self
         167  +
    }
         168  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         169  +
    pub fn set_account_ids_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         170  +
        self.inner = self.inner.set_account_ids_to_remove(input);
         171  +
        self
         172  +
    }
         173  +
    /// <p>The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or <i>All</i>. This action has a higher priority than <code>AccountIdsToAdd</code>. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the <code>AccountIdsToAdd</code> parameter.</p>
         174  +
    pub fn get_account_ids_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         175  +
        self.inner.get_account_ids_to_remove()
         176  +
    }
         177  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         178  +
    pub fn shared_document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         179  +
        self.inner = self.inner.shared_document_version(input.into());
         180  +
        self
         181  +
    }
         182  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         183  +
    pub fn set_shared_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         184  +
        self.inner = self.inner.set_shared_document_version(input);
         185  +
        self
         186  +
    }
         187  +
    /// <p>(Optional) The version of the document to share. If it isn't specified, the system choose the <code>Default</code> version to share.</p>
         188  +
    pub fn get_shared_document_version(&self) -> &::std::option::Option<::std::string::String> {
         189  +
        self.inner.get_shared_document_version()
         190  +
    }
         191  +
}

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

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