AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b

Files changed:

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

@@ -0,1 +0,447 @@
           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 PutComplianceItemsInput {
           6  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
           7  +
    pub resource_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
           9  +
    pub resource_type: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
          11  +
    pub compliance_type: ::std::option::Option<::std::string::String>,
          12  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
          13  +
    pub execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
          14  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
          15  +
    pub items: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>,
          16  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
          17  +
    pub item_content_hash: ::std::option::Option<::std::string::String>,
          18  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
          19  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
          20  +
    /// <p>This attribute is only valid for association compliance.</p>
          21  +
    /// </note>
          22  +
    pub upload_type: ::std::option::Option<crate::types::ComplianceUploadType>,
          23  +
}
          24  +
impl PutComplianceItemsInput {
          25  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
          26  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          27  +
        self.resource_id.as_deref()
          28  +
    }
          29  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
          30  +
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
          31  +
        self.resource_type.as_deref()
          32  +
    }
          33  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
          34  +
    pub fn compliance_type(&self) -> ::std::option::Option<&str> {
          35  +
        self.compliance_type.as_deref()
          36  +
    }
          37  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
          38  +
    pub fn execution_summary(&self) -> ::std::option::Option<&crate::types::ComplianceExecutionSummary> {
          39  +
        self.execution_summary.as_ref()
          40  +
    }
          41  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
          42  +
    ///
          43  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.items.is_none()`.
          44  +
    pub fn items(&self) -> &[crate::types::ComplianceItemEntry] {
          45  +
        self.items.as_deref().unwrap_or_default()
          46  +
    }
          47  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
          48  +
    pub fn item_content_hash(&self) -> ::std::option::Option<&str> {
          49  +
        self.item_content_hash.as_deref()
          50  +
    }
          51  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
          52  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
          53  +
    /// <p>This attribute is only valid for association compliance.</p>
          54  +
    /// </note>
          55  +
    pub fn upload_type(&self) -> ::std::option::Option<&crate::types::ComplianceUploadType> {
          56  +
        self.upload_type.as_ref()
          57  +
    }
          58  +
}
          59  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$ResourceId",
          62  +
        "com.amazonaws.ssm.synthetic",
          63  +
        "PutComplianceItemsInput",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "ResourceId",
          67  +
    0,
          68  +
);
          69  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$ResourceType",
          72  +
        "com.amazonaws.ssm.synthetic",
          73  +
        "PutComplianceItemsInput",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::String,
          76  +
    "ResourceType",
          77  +
    1,
          78  +
);
          79  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_COMPLIANCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_parts(
          81  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$ComplianceType",
          82  +
        "com.amazonaws.ssm.synthetic",
          83  +
        "PutComplianceItemsInput",
          84  +
    ),
          85  +
    ::aws_smithy_schema::ShapeType::String,
          86  +
    "ComplianceType",
          87  +
    2,
          88  +
);
          89  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_EXECUTION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          90  +
    ::aws_smithy_schema::ShapeId::from_parts(
          91  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$ExecutionSummary",
          92  +
        "com.amazonaws.ssm.synthetic",
          93  +
        "PutComplianceItemsInput",
          94  +
    ),
          95  +
    ::aws_smithy_schema::ShapeType::Structure,
          96  +
    "ExecutionSummary",
          97  +
    3,
          98  +
);
          99  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEMS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         100  +
    ::aws_smithy_schema::ShapeId::from_parts(
         101  +
        "com.amazonaws.ssm#ComplianceItemEntryList$member",
         102  +
        "com.amazonaws.ssm",
         103  +
        "ComplianceItemEntryList",
         104  +
    ),
         105  +
    ::aws_smithy_schema::ShapeType::Structure,
         106  +
    "member",
         107  +
    0,
         108  +
);
         109  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEMS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         110  +
    ::aws_smithy_schema::ShapeId::from_parts(
         111  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$Items",
         112  +
        "com.amazonaws.ssm.synthetic",
         113  +
        "PutComplianceItemsInput",
         114  +
    ),
         115  +
    ::aws_smithy_schema::ShapeType::List,
         116  +
    "Items",
         117  +
    4,
         118  +
)
         119  +
.with_list_member(&PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEMS_MEMBER);
         120  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEM_CONTENT_HASH: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts(
         122  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$ItemContentHash",
         123  +
        "com.amazonaws.ssm.synthetic",
         124  +
        "PutComplianceItemsInput",
         125  +
    ),
         126  +
    ::aws_smithy_schema::ShapeType::String,
         127  +
    "ItemContentHash",
         128  +
    5,
         129  +
);
         130  +
static PUTCOMPLIANCEITEMSINPUT_MEMBER_UPLOAD_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_parts(
         132  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput$UploadType",
         133  +
        "com.amazonaws.ssm.synthetic",
         134  +
        "PutComplianceItemsInput",
         135  +
    ),
         136  +
    ::aws_smithy_schema::ShapeType::String,
         137  +
    "UploadType",
         138  +
    6,
         139  +
);
         140  +
static PUTCOMPLIANCEITEMSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         141  +
    ::aws_smithy_schema::ShapeId::from_parts(
         142  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsInput",
         143  +
        "com.amazonaws.ssm.synthetic",
         144  +
        "PutComplianceItemsInput",
         145  +
    ),
         146  +
    ::aws_smithy_schema::ShapeType::Structure,
         147  +
    &[
         148  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_ID,
         149  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPE,
         150  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_COMPLIANCE_TYPE,
         151  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_EXECUTION_SUMMARY,
         152  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEMS,
         153  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEM_CONTENT_HASH,
         154  +
        &PUTCOMPLIANCEITEMSINPUT_MEMBER_UPLOAD_TYPE,
         155  +
    ],
         156  +
)
         157  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         158  +
.with_original_name("PutComplianceItemsRequest");
         159  +
impl PutComplianceItemsInput {
         160  +
    /// The schema for this shape.
         161  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PUTCOMPLIANCEITEMSINPUT_SCHEMA;
         162  +
}
         163  +
impl ::aws_smithy_schema::serde::SerializableStruct for PutComplianceItemsInput {
         164  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         165  +
    fn serialize_members(
         166  +
        &self,
         167  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         168  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         169  +
        if let Some(ref val) = self.resource_id {
         170  +
            ser.write_string(&PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_ID, val)?;
         171  +
        }
         172  +
        if let Some(ref val) = self.resource_type {
         173  +
            ser.write_string(&PUTCOMPLIANCEITEMSINPUT_MEMBER_RESOURCE_TYPE, val)?;
         174  +
        }
         175  +
        if let Some(ref val) = self.compliance_type {
         176  +
            ser.write_string(&PUTCOMPLIANCEITEMSINPUT_MEMBER_COMPLIANCE_TYPE, val)?;
         177  +
        }
         178  +
        if let Some(ref val) = self.execution_summary {
         179  +
            ser.write_struct(&PUTCOMPLIANCEITEMSINPUT_MEMBER_EXECUTION_SUMMARY, val)?;
         180  +
        }
         181  +
        if let Some(ref val) = self.items {
         182  +
            ser.write_list(
         183  +
                &PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEMS,
         184  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         185  +
                    for item in val {
         186  +
                        ser.write_struct(crate::types::ComplianceItemEntry::SCHEMA, item)?;
         187  +
                    }
         188  +
                    Ok(())
         189  +
                },
         190  +
            )?;
         191  +
        }
         192  +
        if let Some(ref val) = self.item_content_hash {
         193  +
            ser.write_string(&PUTCOMPLIANCEITEMSINPUT_MEMBER_ITEM_CONTENT_HASH, val)?;
         194  +
        }
         195  +
        if let Some(ref val) = self.upload_type {
         196  +
            ser.write_string(&PUTCOMPLIANCEITEMSINPUT_MEMBER_UPLOAD_TYPE, val.as_str())?;
         197  +
        }
         198  +
        Ok(())
         199  +
    }
         200  +
}
         201  +
impl PutComplianceItemsInput {
         202  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         203  +
    pub fn deserialize(
         204  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         205  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         206  +
        #[allow(unused_variables, unused_mut)]
         207  +
        let mut builder = Self::builder();
         208  +
        #[allow(
         209  +
            unused_variables,
         210  +
            unreachable_code,
         211  +
            clippy::single_match,
         212  +
            clippy::match_single_binding,
         213  +
            clippy::diverging_sub_expression
         214  +
        )]
         215  +
        deserializer.read_struct(&PUTCOMPLIANCEITEMSINPUT_SCHEMA, &mut |member, deser| {
         216  +
            match member.member_index() {
         217  +
                Some(0) => {
         218  +
                    if deser.is_null() {
         219  +
                        deser.read_null()?;
         220  +
                    } else {
         221  +
                        builder.resource_id = Some(deser.read_string(member)?);
         222  +
                    }
         223  +
                }
         224  +
                Some(1) => {
         225  +
                    if deser.is_null() {
         226  +
                        deser.read_null()?;
         227  +
                    } else {
         228  +
                        builder.resource_type = Some(deser.read_string(member)?);
         229  +
                    }
         230  +
                }
         231  +
                Some(2) => {
         232  +
                    if deser.is_null() {
         233  +
                        deser.read_null()?;
         234  +
                    } else {
         235  +
                        builder.compliance_type = Some(deser.read_string(member)?);
         236  +
                    }
         237  +
                }
         238  +
                Some(3) => {
         239  +
                    if deser.is_null() {
         240  +
                        deser.read_null()?;
         241  +
                    } else {
         242  +
                        builder.execution_summary = Some(crate::types::ComplianceExecutionSummary::deserialize(deser)?);
         243  +
                    }
         244  +
                }
         245  +
                Some(4) => {
         246  +
                    if deser.is_null() {
         247  +
                        deser.read_null()?;
         248  +
                    } else {
         249  +
                        builder.items = Some({
         250  +
                            let mut container = Vec::new();
         251  +
                            deser.read_list(member, &mut |deser| {
         252  +
                                container.push(crate::types::ComplianceItemEntry::deserialize(deser)?);
         253  +
                                Ok(())
         254  +
                            })?;
         255  +
                            container
         256  +
                        });
         257  +
                    }
         258  +
                }
         259  +
                Some(5) => {
         260  +
                    if deser.is_null() {
         261  +
                        deser.read_null()?;
         262  +
                    } else {
         263  +
                        builder.item_content_hash = Some(deser.read_string(member)?);
         264  +
                    }
         265  +
                }
         266  +
                Some(6) => {
         267  +
                    if deser.is_null() {
         268  +
                        deser.read_null()?;
         269  +
                    } else {
         270  +
                        builder.upload_type = Some(crate::types::ComplianceUploadType::from(deser.read_string(member)?.as_str()));
         271  +
                    }
         272  +
                }
         273  +
                _ => {}
         274  +
            }
         275  +
            Ok(())
         276  +
        })?;
         277  +
        builder.resource_id = builder.resource_id.or(Some(String::new()));
         278  +
        builder.resource_type = builder.resource_type.or(Some(String::new()));
         279  +
        builder.compliance_type = builder.compliance_type.or(Some(String::new()));
         280  +
        builder.items = builder.items.or(Some(Vec::new()));
         281  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         282  +
    }
         283  +
}
         284  +
impl PutComplianceItemsInput {
         285  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         286  +
    pub fn deserialize_with_response(
         287  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         288  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         289  +
        _status: u16,
         290  +
        _body: &[u8],
         291  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         292  +
        Self::deserialize(deserializer)
         293  +
    }
         294  +
}
         295  +
impl PutComplianceItemsInput {
         296  +
    /// Creates a new builder-style object to manufacture [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
         297  +
    pub fn builder() -> crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder {
         298  +
        crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder::default()
         299  +
    }
         300  +
}
         301  +
         302  +
/// A builder for [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
         303  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         304  +
#[non_exhaustive]
         305  +
pub struct PutComplianceItemsInputBuilder {
         306  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         307  +
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
         308  +
    pub(crate) compliance_type: ::std::option::Option<::std::string::String>,
         309  +
    pub(crate) execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
         310  +
    pub(crate) items: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>,
         311  +
    pub(crate) item_content_hash: ::std::option::Option<::std::string::String>,
         312  +
    pub(crate) upload_type: ::std::option::Option<crate::types::ComplianceUploadType>,
         313  +
}
         314  +
impl PutComplianceItemsInputBuilder {
         315  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         316  +
    /// This field is required.
         317  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         318  +
        self.resource_id = ::std::option::Option::Some(input.into());
         319  +
        self
         320  +
    }
         321  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         322  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         323  +
        self.resource_id = input;
         324  +
        self
         325  +
    }
         326  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         327  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         328  +
        &self.resource_id
         329  +
    }
         330  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         331  +
    /// This field is required.
         332  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         333  +
        self.resource_type = ::std::option::Option::Some(input.into());
         334  +
        self
         335  +
    }
         336  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         337  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         338  +
        self.resource_type = input;
         339  +
        self
         340  +
    }
         341  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         342  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         343  +
        &self.resource_type
         344  +
    }
         345  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         346  +
    /// This field is required.
         347  +
    pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         348  +
        self.compliance_type = ::std::option::Option::Some(input.into());
         349  +
        self
         350  +
    }
         351  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         352  +
    pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         353  +
        self.compliance_type = input;
         354  +
        self
         355  +
    }
         356  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         357  +
    pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
         358  +
        &self.compliance_type
         359  +
    }
         360  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         361  +
    /// This field is required.
         362  +
    pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
         363  +
        self.execution_summary = ::std::option::Option::Some(input);
         364  +
        self
         365  +
    }
         366  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         367  +
    pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
         368  +
        self.execution_summary = input;
         369  +
        self
         370  +
    }
         371  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         372  +
    pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
         373  +
        &self.execution_summary
         374  +
    }
         375  +
    /// Appends an item to `items`.
         376  +
    ///
         377  +
    /// To override the contents of this collection use [`set_items`](Self::set_items).
         378  +
    ///
         379  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         380  +
    pub fn items(mut self, input: crate::types::ComplianceItemEntry) -> Self {
         381  +
        let mut v = self.items.unwrap_or_default();
         382  +
        v.push(input);
         383  +
        self.items = ::std::option::Option::Some(v);
         384  +
        self
         385  +
    }
         386  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         387  +
    pub fn set_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>) -> Self {
         388  +
        self.items = input;
         389  +
        self
         390  +
    }
         391  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         392  +
    pub fn get_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>> {
         393  +
        &self.items
         394  +
    }
         395  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         396  +
    pub fn item_content_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         397  +
        self.item_content_hash = ::std::option::Option::Some(input.into());
         398  +
        self
         399  +
    }
         400  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         401  +
    pub fn set_item_content_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         402  +
        self.item_content_hash = input;
         403  +
        self
         404  +
    }
         405  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         406  +
    pub fn get_item_content_hash(&self) -> &::std::option::Option<::std::string::String> {
         407  +
        &self.item_content_hash
         408  +
    }
         409  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         410  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         411  +
    /// <p>This attribute is only valid for association compliance.</p>
         412  +
    /// </note>
         413  +
    pub fn upload_type(mut self, input: crate::types::ComplianceUploadType) -> Self {
         414  +
        self.upload_type = ::std::option::Option::Some(input);
         415  +
        self
         416  +
    }
         417  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         418  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         419  +
    /// <p>This attribute is only valid for association compliance.</p>
         420  +
    /// </note>
         421  +
    pub fn set_upload_type(mut self, input: ::std::option::Option<crate::types::ComplianceUploadType>) -> Self {
         422  +
        self.upload_type = input;
         423  +
        self
         424  +
    }
         425  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         426  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         427  +
    /// <p>This attribute is only valid for association compliance.</p>
         428  +
    /// </note>
         429  +
    pub fn get_upload_type(&self) -> &::std::option::Option<crate::types::ComplianceUploadType> {
         430  +
        &self.upload_type
         431  +
    }
         432  +
    /// Consumes the builder and constructs a [`PutComplianceItemsInput`](crate::operation::put_compliance_items::PutComplianceItemsInput).
         433  +
    pub fn build(
         434  +
        self,
         435  +
    ) -> ::std::result::Result<crate::operation::put_compliance_items::PutComplianceItemsInput, ::aws_smithy_types::error::operation::BuildError>
         436  +
    {
         437  +
        ::std::result::Result::Ok(crate::operation::put_compliance_items::PutComplianceItemsInput {
         438  +
            resource_id: self.resource_id,
         439  +
            resource_type: self.resource_type,
         440  +
            compliance_type: self.compliance_type,
         441  +
            execution_summary: self.execution_summary,
         442  +
            items: self.items,
         443  +
            item_content_hash: self.item_content_hash,
         444  +
            upload_type: self.upload_type,
         445  +
        })
         446  +
    }
         447  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/put_compliance_items/_put_compliance_items_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 PutComplianceItemsOutput {
           6  +
    _request_id: Option<String>,
           7  +
}
           8  +
static PUTCOMPLIANCEITEMSOUTPUT_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 PUTCOMPLIANCEITEMSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "com.amazonaws.ssm.synthetic#PutComplianceItemsOutput",
          18  +
        "com.amazonaws.ssm.synthetic",
          19  +
        "PutComplianceItemsOutput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    &[&PUTCOMPLIANCEITEMSOUTPUT_MEMBER__REQUEST_ID],
          23  +
)
          24  +
.with_original_name("PutComplianceItemsResult");
          25  +
impl PutComplianceItemsOutput {
          26  +
    /// The schema for this shape.
          27  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PUTCOMPLIANCEITEMSOUTPUT_SCHEMA;
          28  +
}
          29  +
impl ::aws_smithy_schema::serde::SerializableStruct for PutComplianceItemsOutput {
          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 PutComplianceItemsOutput {
          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(&PUTCOMPLIANCEITEMSOUTPUT_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 PutComplianceItemsOutput {
          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 PutComplianceItemsOutput {
          83  +
    fn request_id(&self) -> Option<&str> {
          84  +
        self._request_id.as_deref()
          85  +
    }
          86  +
}
          87  +
impl PutComplianceItemsOutput {
          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 PutComplianceItemsOutput {
          94  +
    /// Creates a new builder-style object to manufacture [`PutComplianceItemsOutput`](crate::operation::put_compliance_items::PutComplianceItemsOutput).
          95  +
    pub fn builder() -> crate::operation::put_compliance_items::builders::PutComplianceItemsOutputBuilder {
          96  +
        crate::operation::put_compliance_items::builders::PutComplianceItemsOutputBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`PutComplianceItemsOutput`](crate::operation::put_compliance_items::PutComplianceItemsOutput).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct PutComplianceItemsOutputBuilder {
         104  +
    _request_id: Option<String>,
         105  +
}
         106  +
impl PutComplianceItemsOutputBuilder {
         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 [`PutComplianceItemsOutput`](crate::operation::put_compliance_items::PutComplianceItemsOutput).
         117  +
    pub fn build(self) -> crate::operation::put_compliance_items::PutComplianceItemsOutput {
         118  +
        crate::operation::put_compliance_items::PutComplianceItemsOutput {
         119  +
            _request_id: self._request_id,
         120  +
        }
         121  +
    }
         122  +
}

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

@@ -0,1 +0,258 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::put_compliance_items::_put_compliance_items_input::PutComplianceItemsInputBuilder;
           3  +
           4  +
pub use crate::operation::put_compliance_items::_put_compliance_items_output::PutComplianceItemsOutputBuilder;
           5  +
           6  +
impl crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder {
           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::put_compliance_items::PutComplianceItemsOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::put_compliance_items::PutComplianceItemsError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.put_compliance_items();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `PutComplianceItems`.
          24  +
///
          25  +
/// <p>Registers a compliance type and other compliance details on a designated resource. This operation lets you register custom compliance details with a resource. This call overwrites existing compliance information on the resource, so you must provide a full list of compliance items each time that you send the request.</p>
          26  +
/// <p>ComplianceType can be one of the following:</p>
          27  +
/// <ul>
          28  +
/// <li>
          29  +
/// <p>ExecutionId: The execution ID when the patch, association, or custom compliance item was applied.</p></li>
          30  +
/// <li>
          31  +
/// <p>ExecutionType: Specify patch, association, or Custom:<code>string</code>.</p></li>
          32  +
/// <li>
          33  +
/// <p>ExecutionTime. The time the patch, association, or custom compliance item was applied to the managed node.</p><important>
          34  +
/// <p>For State Manager associations, this represents the time when compliance status was captured by the Systems Manager service during its internal compliance aggregation workflow, not necessarily when the association was executed on the managed node. State Manager updates compliance information for all associations on an instance whenever any association executes, which may result in multiple associations showing the same execution time.</p>
          35  +
/// </important></li>
          36  +
/// <li>
          37  +
/// <p>Id: The patch, association, or custom compliance ID.</p></li>
          38  +
/// <li>
          39  +
/// <p>Title: A title.</p></li>
          40  +
/// <li>
          41  +
/// <p>Status: The status of the compliance item. For example, <code>approved</code> for patches, or <code>Failed</code> for associations.</p></li>
          42  +
/// <li>
          43  +
/// <p>Severity: A patch severity. For example, <code>Critical</code>.</p></li>
          44  +
/// <li>
          45  +
/// <p>DocumentName: An SSM document name. For example, <code>AWS-RunPatchBaseline</code>.</p></li>
          46  +
/// <li>
          47  +
/// <p>DocumentVersion: An SSM document version number. For example, 4.</p></li>
          48  +
/// <li>
          49  +
/// <p>Classification: A patch classification. For example, <code>security updates</code>.</p></li>
          50  +
/// <li>
          51  +
/// <p>PatchBaselineId: A patch baseline ID.</p></li>
          52  +
/// <li>
          53  +
/// <p>PatchSeverity: A patch severity. For example, <code>Critical</code>.</p></li>
          54  +
/// <li>
          55  +
/// <p>PatchState: A patch state. For example, <code>InstancesWithFailedPatches</code>.</p></li>
          56  +
/// <li>
          57  +
/// <p>PatchGroup: The name of a patch group.</p></li>
          58  +
/// <li>
          59  +
/// <p>InstalledTime: The time the association, patch, or custom compliance item was applied to the resource. Specify the time by using the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p></li>
          60  +
/// </ul>
          61  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          62  +
pub struct PutComplianceItemsFluentBuilder {
          63  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          64  +
    inner: crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder,
          65  +
    config_override: ::std::option::Option<crate::config::Builder>,
          66  +
}
          67  +
impl
          68  +
    crate::client::customize::internal::CustomizableSend<
          69  +
        crate::operation::put_compliance_items::PutComplianceItemsOutput,
          70  +
        crate::operation::put_compliance_items::PutComplianceItemsError,
          71  +
    > for PutComplianceItemsFluentBuilder
          72  +
{
          73  +
    fn send(
          74  +
        self,
          75  +
        config_override: crate::config::Builder,
          76  +
    ) -> crate::client::customize::internal::BoxFuture<
          77  +
        crate::client::customize::internal::SendResult<
          78  +
            crate::operation::put_compliance_items::PutComplianceItemsOutput,
          79  +
            crate::operation::put_compliance_items::PutComplianceItemsError,
          80  +
        >,
          81  +
    > {
          82  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          83  +
    }
          84  +
}
          85  +
impl PutComplianceItemsFluentBuilder {
          86  +
    /// Creates a new `PutComplianceItemsFluentBuilder`.
          87  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          88  +
        Self {
          89  +
            handle,
          90  +
            inner: ::std::default::Default::default(),
          91  +
            config_override: ::std::option::Option::None,
          92  +
        }
          93  +
    }
          94  +
    /// Access the PutComplianceItems as a reference.
          95  +
    pub fn as_input(&self) -> &crate::operation::put_compliance_items::builders::PutComplianceItemsInputBuilder {
          96  +
        &self.inner
          97  +
    }
          98  +
    /// Sends the request and returns the response.
          99  +
    ///
         100  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
         101  +
    /// can be matched against.
         102  +
    ///
         103  +
    /// By default, any retryable failures will be retried twice. Retry behavior
         104  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
         105  +
    /// set when configuring the client.
         106  +
    pub async fn send(
         107  +
        self,
         108  +
    ) -> ::std::result::Result<
         109  +
        crate::operation::put_compliance_items::PutComplianceItemsOutput,
         110  +
        ::aws_smithy_runtime_api::client::result::SdkError<
         111  +
            crate::operation::put_compliance_items::PutComplianceItemsError,
         112  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         113  +
        >,
         114  +
    > {
         115  +
        let input = self
         116  +
            .inner
         117  +
            .build()
         118  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
         119  +
        let runtime_plugins = crate::operation::put_compliance_items::PutComplianceItems::operation_runtime_plugins(
         120  +
            self.handle.runtime_plugins.clone(),
         121  +
            &self.handle.conf,
         122  +
            self.config_override,
         123  +
        );
         124  +
        crate::operation::put_compliance_items::PutComplianceItems::orchestrate(&runtime_plugins, input).await
         125  +
    }
         126  +
         127  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
         128  +
    pub fn customize(
         129  +
        self,
         130  +
    ) -> crate::client::customize::CustomizableOperation<
         131  +
        crate::operation::put_compliance_items::PutComplianceItemsOutput,
         132  +
        crate::operation::put_compliance_items::PutComplianceItemsError,
         133  +
        Self,
         134  +
    > {
         135  +
        crate::client::customize::CustomizableOperation::new(self)
         136  +
    }
         137  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         138  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         139  +
        self
         140  +
    }
         141  +
         142  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         143  +
        self.config_override = config_override;
         144  +
        self
         145  +
    }
         146  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         147  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         148  +
        self.inner = self.inner.resource_id(input.into());
         149  +
        self
         150  +
    }
         151  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         152  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         153  +
        self.inner = self.inner.set_resource_id(input);
         154  +
        self
         155  +
    }
         156  +
    /// <p>Specify an ID for this resource. For a managed node, this is the node ID.</p>
         157  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         158  +
        self.inner.get_resource_id()
         159  +
    }
         160  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         161  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         162  +
        self.inner = self.inner.resource_type(input.into());
         163  +
        self
         164  +
    }
         165  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         166  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         167  +
        self.inner = self.inner.set_resource_type(input);
         168  +
        self
         169  +
    }
         170  +
    /// <p>Specify the type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         171  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         172  +
        self.inner.get_resource_type()
         173  +
    }
         174  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         175  +
    pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         176  +
        self.inner = self.inner.compliance_type(input.into());
         177  +
        self
         178  +
    }
         179  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         180  +
    pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         181  +
        self.inner = self.inner.set_compliance_type(input);
         182  +
        self
         183  +
    }
         184  +
    /// <p>Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:<code>string</code>.</p>
         185  +
    pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
         186  +
        self.inner.get_compliance_type()
         187  +
    }
         188  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         189  +
    pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
         190  +
        self.inner = self.inner.execution_summary(input);
         191  +
        self
         192  +
    }
         193  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         194  +
    pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
         195  +
        self.inner = self.inner.set_execution_summary(input);
         196  +
        self
         197  +
    }
         198  +
    /// <p>A summary of the call execution that includes an execution ID, the type of execution (for example, <code>Command</code>), and the date/time of the execution using a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p>
         199  +
    pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
         200  +
        self.inner.get_execution_summary()
         201  +
    }
         202  +
    ///
         203  +
    /// Appends an item to `Items`.
         204  +
    ///
         205  +
    /// To override the contents of this collection use [`set_items`](Self::set_items).
         206  +
    ///
         207  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         208  +
    pub fn items(mut self, input: crate::types::ComplianceItemEntry) -> Self {
         209  +
        self.inner = self.inner.items(input);
         210  +
        self
         211  +
    }
         212  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         213  +
    pub fn set_items(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>>) -> Self {
         214  +
        self.inner = self.inner.set_items(input);
         215  +
        self
         216  +
    }
         217  +
    /// <p>Information about the compliance as defined by the resource type. For example, for a patch compliance type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
         218  +
    pub fn get_items(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComplianceItemEntry>> {
         219  +
        self.inner.get_items()
         220  +
    }
         221  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         222  +
    pub fn item_content_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         223  +
        self.inner = self.inner.item_content_hash(input.into());
         224  +
        self
         225  +
    }
         226  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         227  +
    pub fn set_item_content_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         228  +
        self.inner = self.inner.set_item_content_hash(input);
         229  +
        self
         230  +
    }
         231  +
    /// <p>MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.</p>
         232  +
    pub fn get_item_content_hash(&self) -> &::std::option::Option<::std::string::String> {
         233  +
        self.inner.get_item_content_hash()
         234  +
    }
         235  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         236  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         237  +
    /// <p>This attribute is only valid for association compliance.</p>
         238  +
    /// </note>
         239  +
    pub fn upload_type(mut self, input: crate::types::ComplianceUploadType) -> Self {
         240  +
        self.inner = self.inner.upload_type(input);
         241  +
        self
         242  +
    }
         243  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         244  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         245  +
    /// <p>This attribute is only valid for association compliance.</p>
         246  +
    /// </note>
         247  +
    pub fn set_upload_type(mut self, input: ::std::option::Option<crate::types::ComplianceUploadType>) -> Self {
         248  +
        self.inner = self.inner.set_upload_type(input);
         249  +
        self
         250  +
    }
         251  +
    /// <p>The mode for uploading compliance items. You can specify <code>COMPLETE</code> or <code>PARTIAL</code>. In <code>COMPLETE</code> mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.</p>
         252  +
    /// <p>In <code>PARTIAL</code> mode, the system overwrites compliance information for a specific association. The association must be configured with <code>SyncCompliance</code> set to <code>MANUAL</code>. By default, all requests use <code>COMPLETE</code> mode.</p><note>
         253  +
    /// <p>This attribute is only valid for association compliance.</p>
         254  +
    /// </note>
         255  +
    pub fn get_upload_type(&self) -> &::std::option::Option<crate::types::ComplianceUploadType> {
         256  +
        self.inner.get_upload_type()
         257  +
    }
         258  +
}

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

@@ -0,1 +0,979 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `PutInventory`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct PutInventory;
           6  +
impl PutInventory {
           7  +
    /// Creates a new `PutInventory`
           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_inventory::PutInventoryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::put_inventory::PutInventoryOutput::SCHEMA;
          15  +
    pub(crate) async fn orchestrate(
          16  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          17  +
        input: crate::operation::put_inventory::PutInventoryInput,
          18  +
    ) -> ::std::result::Result<
          19  +
        crate::operation::put_inventory::PutInventoryOutput,
          20  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          21  +
            crate::operation::put_inventory::PutInventoryError,
          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_inventory::PutInventoryError>()
          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_inventory::PutInventoryOutput>()
          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_inventory::PutInventoryInput,
          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", "PutInventory", 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.PutInventory",
          63  +
                "rpc.service" = "SSM",
          64  +
                "rpc.method" = "PutInventory",
          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::CustomSchemaCountLimitExceededException::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::CustomSchemaCountLimitExceededException::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::CustomSchemaCountLimitExceededException::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::InvalidInstanceId::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::InvalidInstanceId::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::InvalidInstanceId::deserialize(d)?))
         127  +
                        },
         128  +
                    )
         129  +
.insert_error_shape(
         130  +
                        crate::types::error::InvalidInventoryItemContextException::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::InvalidInventoryItemContextException::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::InvalidInventoryItemContextException::deserialize(d)?))
         136  +
                        },
         137  +
                    )
         138  +
.insert_error_shape(
         139  +
                        crate::types::error::InvalidItemContentException::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::InvalidItemContentException::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::InvalidItemContentException::deserialize(d)?))
         145  +
                        },
         146  +
                    )
         147  +
.insert_error_shape(
         148  +
                        crate::types::error::InvalidTypeNameException::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::InvalidTypeNameException::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::InvalidTypeNameException::deserialize(d)?))
         154  +
                        },
         155  +
                    )
         156  +
.insert_error_shape(
         157  +
                        crate::types::error::ItemContentMismatchException::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::ItemContentMismatchException::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::ItemContentMismatchException::deserialize(d)?))
         163  +
                        },
         164  +
                    )
         165  +
.insert_error_shape(
         166  +
                        crate::types::error::ItemSizeLimitExceededException::SCHEMA,
         167  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         168  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ItemSizeLimitExceededException::deserialize(d)?))
         169  +
                        },
         170  +
                        |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> {
         171  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ItemSizeLimitExceededException::deserialize(d)?))
         172  +
                        },
         173  +
                    )
         174  +
.insert_error_shape(
         175  +
                        crate::types::error::SubTypeCountLimitExceededException::SCHEMA,
         176  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         177  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::SubTypeCountLimitExceededException::deserialize(d)?))
         178  +
                        },
         179  +
                        |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> {
         180  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::SubTypeCountLimitExceededException::deserialize(d)?))
         181  +
                        },
         182  +
                    )
         183  +
.insert_error_shape(
         184  +
                        crate::types::error::TotalSizeLimitExceededException::SCHEMA,
         185  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         186  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::TotalSizeLimitExceededException::deserialize(d)?))
         187  +
                        },
         188  +
                        |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> {
         189  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::TotalSizeLimitExceededException::deserialize(d)?))
         190  +
                        },
         191  +
                    )
         192  +
.insert_error_shape(
         193  +
                        crate::types::error::UnsupportedInventoryItemContextException::SCHEMA,
         194  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         195  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::UnsupportedInventoryItemContextException::deserialize(d)?))
         196  +
                        },
         197  +
                        |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> {
         198  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::UnsupportedInventoryItemContextException::deserialize(d)?))
         199  +
                        },
         200  +
                    )
         201  +
.insert_error_shape(
         202  +
                        crate::types::error::UnsupportedInventorySchemaVersionException::SCHEMA,
         203  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         204  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::UnsupportedInventorySchemaVersionException::deserialize(d)?))
         205  +
                        },
         206  +
                        |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> {
         207  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::UnsupportedInventorySchemaVersionException::deserialize(d)?))
         208  +
                        },
         209  +
                    )
         210  +
                            .build()
         211  +
    });
         212  +
}
         213  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for PutInventory {
         214  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         215  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("PutInventory");
         216  +
         217  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         218  +
            PutInventoryRequestSerializer,
         219  +
        ));
         220  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         221  +
            PutInventoryResponseDeserializer,
         222  +
        ));
         223  +
         224  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         225  +
            crate::config::auth::Params::builder()
         226  +
                .operation_name("PutInventory")
         227  +
                .build()
         228  +
                .expect("required fields set"),
         229  +
        ));
         230  +
         231  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("PutInventory", "SSM"));
         232  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         233  +
        signing_options.double_uri_encode = true;
         234  +
        signing_options.content_sha256_header = false;
         235  +
        signing_options.normalize_uri_path = true;
         236  +
        signing_options.payload_override = None;
         237  +
         238  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         239  +
            signing_options,
         240  +
            ..::std::default::Default::default()
         241  +
        });
         242  +
         243  +
        ::std::option::Option::Some(cfg.freeze())
         244  +
    }
         245  +
         246  +
    fn runtime_components(
         247  +
        &self,
         248  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         249  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         250  +
        #[allow(unused_mut)]
         251  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PutInventory")
         252  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         253  +
                PutInventoryTelemetryInputCaptureInterceptor,
         254  +
            ))
         255  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         256  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         257  +
            ))
         258  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         259  +
                PutInventoryEndpointParamsInterceptor,
         260  +
            ))
         261  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         262  +
                crate::operation::put_inventory::PutInventoryError,
         263  +
            >::new())
         264  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         265  +
                crate::operation::put_inventory::PutInventoryError,
         266  +
            >::new())
         267  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         268  +
                crate::operation::put_inventory::PutInventoryError,
         269  +
            >::new())
         270  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         271  +
                crate::operation::put_inventory::PutInventoryError,
         272  +
            >::new());
         273  +
         274  +
        ::std::borrow::Cow::Owned(rcb)
         275  +
    }
         276  +
}
         277  +
         278  +
#[derive(Debug)]
         279  +
struct PutInventoryTelemetryInputCaptureInterceptor;
         280  +
         281  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         282  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutInventoryTelemetryInputCaptureInterceptor {
         283  +
    fn name(&self) -> &'static str {
         284  +
        "PutInventoryTelemetryInputCaptureInterceptor"
         285  +
    }
         286  +
         287  +
    fn read_before_execution(
         288  +
        &self,
         289  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         290  +
            '_,
         291  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         292  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         293  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         294  +
        >,
         295  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         296  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         297  +
        // Nothing to do unless the customer opted in by naming members to record.
         298  +
        let ::std::option::Option::Some(requested) = cfg
         299  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         300  +
            .filter(|r| !r.is_empty())
         301  +
        else {
         302  +
            return ::std::result::Result::Ok(());
         303  +
        };
         304  +
         305  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<PutInventoryInput>() else {
         306  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         307  +
            return ::std::result::Result::Ok(());
         308  +
        };
         309  +
         310  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         311  +
        if requested.should_capture("InstanceId") {
         312  +
            if let ::std::option::Option::Some(value) = input.instance_id.as_deref() {
         313  +
                captured.insert("InstanceId", value);
         314  +
            }
         315  +
        }
         316  +
         317  +
        cfg.interceptor_state().store_put(captured);
         318  +
        ::std::result::Result::Ok(())
         319  +
    }
         320  +
}
         321  +
#[derive(Debug)]
         322  +
struct PutInventoryResponseDeserializer;
         323  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutInventoryResponseDeserializer {
         324  +
    fn deserialize_nonstreaming_with_config(
         325  +
        &self,
         326  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         327  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         328  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         329  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         330  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         331  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         332  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         333  +
        // loads `body` before firing this hook.
         334  +
        let body = response.body().bytes().expect("body loaded");
         335  +
        let headers = response.headers();
         336  +
        #[allow(unused_mut)]
         337  +
        let mut force_error = false;
         338  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         339  +
        if !success && status != 200 || force_error {
         340  +
            let protocol = _cfg
         341  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         342  +
                .expect("a SharedClientProtocol is required");
         343  +
            #[allow(unused_mut)]
         344  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         345  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         346  +
            })?;
         347  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         348  +
            let generic = generic_builder.build();
         349  +
            let error_code = match generic.code() {
         350  +
                ::std::option::Option::Some(code) => code,
         351  +
                ::std::option::Option::None => {
         352  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         353  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::put_inventory::PutInventoryError::unhandled(generic)),
         354  +
                    ))
         355  +
                }
         356  +
            };
         357  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         358  +
            let err = match error_code {
         359  +
                "CustomSchemaCountLimitExceededException" => {
         360  +
                    crate::operation::put_inventory::PutInventoryError::CustomSchemaCountLimitExceededException({
         361  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         362  +
                            crate::types::error::CustomSchemaCountLimitExceededException::deserialize_with_response(
         363  +
                                &mut *deser,
         364  +
                                response.headers(),
         365  +
                                response.status().into(),
         366  +
                                body,
         367  +
                            )
         368  +
                        }) {
         369  +
                            ::std::result::Result::Ok(val) => val,
         370  +
                            ::std::result::Result::Err(e) => {
         371  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         372  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         373  +
                                ))
         374  +
                            }
         375  +
                        };
         376  +
                        tmp.meta = generic;
         377  +
                        if tmp.message.is_none() {
         378  +
                            tmp.message = _error_message;
         379  +
                        }
         380  +
                        tmp
         381  +
                    })
         382  +
                }
         383  +
                "InternalServerError" => crate::operation::put_inventory::PutInventoryError::InternalServerError({
         384  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         385  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         386  +
                            &mut *deser,
         387  +
                            response.headers(),
         388  +
                            response.status().into(),
         389  +
                            body,
         390  +
                        )
         391  +
                    }) {
         392  +
                        ::std::result::Result::Ok(val) => val,
         393  +
                        ::std::result::Result::Err(e) => {
         394  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         395  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         396  +
                            ))
         397  +
                        }
         398  +
                    };
         399  +
                    tmp.meta = generic;
         400  +
                    if tmp.message.is_none() {
         401  +
                        tmp.message = _error_message;
         402  +
                    }
         403  +
                    tmp
         404  +
                }),
         405  +
                "InvalidInstanceId" => crate::operation::put_inventory::PutInventoryError::InvalidInstanceId({
         406  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         407  +
                        crate::types::error::InvalidInstanceId::deserialize_with_response(
         408  +
                            &mut *deser,
         409  +
                            response.headers(),
         410  +
                            response.status().into(),
         411  +
                            body,
         412  +
                        )
         413  +
                    }) {
         414  +
                        ::std::result::Result::Ok(val) => val,
         415  +
                        ::std::result::Result::Err(e) => {
         416  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         417  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         418  +
                            ))
         419  +
                        }
         420  +
                    };
         421  +
                    tmp.meta = generic;
         422  +
                    if tmp.message.is_none() {
         423  +
                        tmp.message = _error_message;
         424  +
                    }
         425  +
                    tmp
         426  +
                }),
         427  +
                "InvalidInventoryItemContextException" => crate::operation::put_inventory::PutInventoryError::InvalidInventoryItemContextException({
         428  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         429  +
                        crate::types::error::InvalidInventoryItemContextException::deserialize_with_response(
         430  +
                            &mut *deser,
         431  +
                            response.headers(),
         432  +
                            response.status().into(),
         433  +
                            body,
         434  +
                        )
         435  +
                    }) {
         436  +
                        ::std::result::Result::Ok(val) => val,
         437  +
                        ::std::result::Result::Err(e) => {
         438  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         439  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         440  +
                            ))
         441  +
                        }
         442  +
                    };
         443  +
                    tmp.meta = generic;
         444  +
                    if tmp.message.is_none() {
         445  +
                        tmp.message = _error_message;
         446  +
                    }
         447  +
                    tmp
         448  +
                }),
         449  +
                "InvalidItemContentException" => crate::operation::put_inventory::PutInventoryError::InvalidItemContentException({
         450  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         451  +
                        crate::types::error::InvalidItemContentException::deserialize_with_response(
         452  +
                            &mut *deser,
         453  +
                            response.headers(),
         454  +
                            response.status().into(),
         455  +
                            body,
         456  +
                        )
         457  +
                    }) {
         458  +
                        ::std::result::Result::Ok(val) => val,
         459  +
                        ::std::result::Result::Err(e) => {
         460  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         461  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         462  +
                            ))
         463  +
                        }
         464  +
                    };
         465  +
                    tmp.meta = generic;
         466  +
                    if tmp.message.is_none() {
         467  +
                        tmp.message = _error_message;
         468  +
                    }
         469  +
                    tmp
         470  +
                }),
         471  +
                "InvalidTypeNameException" => crate::operation::put_inventory::PutInventoryError::InvalidTypeNameException({
         472  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         473  +
                        crate::types::error::InvalidTypeNameException::deserialize_with_response(
         474  +
                            &mut *deser,
         475  +
                            response.headers(),
         476  +
                            response.status().into(),
         477  +
                            body,
         478  +
                        )
         479  +
                    }) {
         480  +
                        ::std::result::Result::Ok(val) => val,
         481  +
                        ::std::result::Result::Err(e) => {
         482  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         483  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         484  +
                            ))
         485  +
                        }
         486  +
                    };
         487  +
                    tmp.meta = generic;
         488  +
                    if tmp.message.is_none() {
         489  +
                        tmp.message = _error_message;
         490  +
                    }
         491  +
                    tmp
         492  +
                }),
         493  +
                "ItemContentMismatchException" => crate::operation::put_inventory::PutInventoryError::ItemContentMismatchException({
         494  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         495  +
                        crate::types::error::ItemContentMismatchException::deserialize_with_response(
         496  +
                            &mut *deser,
         497  +
                            response.headers(),
         498  +
                            response.status().into(),
         499  +
                            body,
         500  +
                        )
         501  +
                    }) {
         502  +
                        ::std::result::Result::Ok(val) => val,
         503  +
                        ::std::result::Result::Err(e) => {
         504  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         505  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         506  +
                            ))
         507  +
                        }
         508  +
                    };
         509  +
                    tmp.meta = generic;
         510  +
                    if tmp.message.is_none() {
         511  +
                        tmp.message = _error_message;
         512  +
                    }
         513  +
                    tmp
         514  +
                }),
         515  +
                "ItemSizeLimitExceededException" => crate::operation::put_inventory::PutInventoryError::ItemSizeLimitExceededException({
         516  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         517  +
                        crate::types::error::ItemSizeLimitExceededException::deserialize_with_response(
         518  +
                            &mut *deser,
         519  +
                            response.headers(),
         520  +
                            response.status().into(),
         521  +
                            body,
         522  +
                        )
         523  +
                    }) {
         524  +
                        ::std::result::Result::Ok(val) => val,
         525  +
                        ::std::result::Result::Err(e) => {
         526  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         527  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         528  +
                            ))
         529  +
                        }
         530  +
                    };
         531  +
                    tmp.meta = generic;
         532  +
                    if tmp.message.is_none() {
         533  +
                        tmp.message = _error_message;
         534  +
                    }
         535  +
                    tmp
         536  +
                }),
         537  +
                "SubTypeCountLimitExceededException" => crate::operation::put_inventory::PutInventoryError::SubTypeCountLimitExceededException({
         538  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         539  +
                        crate::types::error::SubTypeCountLimitExceededException::deserialize_with_response(
         540  +
                            &mut *deser,
         541  +
                            response.headers(),
         542  +
                            response.status().into(),
         543  +
                            body,
         544  +
                        )
         545  +
                    }) {
         546  +
                        ::std::result::Result::Ok(val) => val,
         547  +
                        ::std::result::Result::Err(e) => {
         548  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         549  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         550  +
                            ))
         551  +
                        }
         552  +
                    };
         553  +
                    tmp.meta = generic;
         554  +
                    if tmp.message.is_none() {
         555  +
                        tmp.message = _error_message;
         556  +
                    }
         557  +
                    tmp
         558  +
                }),
         559  +
                "TotalSizeLimitExceededException" => crate::operation::put_inventory::PutInventoryError::TotalSizeLimitExceededException({
         560  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         561  +
                        crate::types::error::TotalSizeLimitExceededException::deserialize_with_response(
         562  +
                            &mut *deser,
         563  +
                            response.headers(),
         564  +
                            response.status().into(),
         565  +
                            body,
         566  +
                        )
         567  +
                    }) {
         568  +
                        ::std::result::Result::Ok(val) => val,
         569  +
                        ::std::result::Result::Err(e) => {
         570  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         571  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         572  +
                            ))
         573  +
                        }
         574  +
                    };
         575  +
                    tmp.meta = generic;
         576  +
                    if tmp.message.is_none() {
         577  +
                        tmp.message = _error_message;
         578  +
                    }
         579  +
                    tmp
         580  +
                }),
         581  +
                "UnsupportedInventoryItemContextException" => {
         582  +
                    crate::operation::put_inventory::PutInventoryError::UnsupportedInventoryItemContextException({
         583  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         584  +
                            crate::types::error::UnsupportedInventoryItemContextException::deserialize_with_response(
         585  +
                                &mut *deser,
         586  +
                                response.headers(),
         587  +
                                response.status().into(),
         588  +
                                body,
         589  +
                            )
         590  +
                        }) {
         591  +
                            ::std::result::Result::Ok(val) => val,
         592  +
                            ::std::result::Result::Err(e) => {
         593  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         594  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         595  +
                                ))
         596  +
                            }
         597  +
                        };
         598  +
                        tmp.meta = generic;
         599  +
                        if tmp.message.is_none() {
         600  +
                            tmp.message = _error_message;
         601  +
                        }
         602  +
                        tmp
         603  +
                    })
         604  +
                }
         605  +
                "UnsupportedInventorySchemaVersionException" => {
         606  +
                    crate::operation::put_inventory::PutInventoryError::UnsupportedInventorySchemaVersionException({
         607  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         608  +
                            crate::types::error::UnsupportedInventorySchemaVersionException::deserialize_with_response(
         609  +
                                &mut *deser,
         610  +
                                response.headers(),
         611  +
                                response.status().into(),
         612  +
                                body,
         613  +
                            )
         614  +
                        }) {
         615  +
                            ::std::result::Result::Ok(val) => val,
         616  +
                            ::std::result::Result::Err(e) => {
         617  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         618  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         619  +
                                ))
         620  +
                            }
         621  +
                        };
         622  +
                        tmp.meta = generic;
         623  +
                        if tmp.message.is_none() {
         624  +
                            tmp.message = _error_message;
         625  +
                        }
         626  +
                        tmp
         627  +
                    })
         628  +
                }
         629  +
                _ => {
         630  +
                    // Registry-backed, operation-scoped reification of an error whose
         631  +
                    // code this operation does not model directly: the operation's own
         632  +
                    // error registry is consulted first, then the lookup widens to the
         633  +
                    // service-wide error registry. On a hit, the reified error is attached
         634  +
                    // as the source of the returned unhandled error while its metadata
         635  +
                    // (code, message, request id) is preserved; on a miss the generic
         636  +
                    // error is returned unchanged.
         637  +
                    match protocol
         638  +
                        .deserialize_error_response(response, _cfg)
         639  +
                        .ok()
         640  +
                        .and_then(|mut deser| {
         641  +
                            ::aws_smithy_schema::registry::reify_error(
         642  +
                                crate::operation::put_inventory::error_registry::REGISTRY
         643  +
                                    .or(&crate::error_type_registry::REGISTRY),
         644  +
                                error_code,
         645  +
                                &mut *deser,
         646  +
                            )
         647  +
                        }) {
         648  +
                        ::std::option::Option::Some(source) => <crate::operation::put_inventory::PutInventoryError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         649  +
                        ::std::option::Option::None => crate::operation::put_inventory::PutInventoryError::generic(generic),
         650  +
                    }
         651  +
                }
         652  +
            };
         653  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         654  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         655  +
            ))
         656  +
        } else {
         657  +
            let protocol = _cfg
         658  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         659  +
                .expect("a SharedClientProtocol is required");
         660  +
            let mut deser = protocol.deserialize_response(response, PutInventory::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         661  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         662  +
            })?;
         663  +
            // body and headers are already in scope from the top of the function;
         664  +
            // alias `headers` as `_response_headers` so MutateOutput
         665  +
            // customizations have a stable name to read from.
         666  +
            let _response_headers = headers;
         667  +
            #[allow(unused_mut)]
         668  +
            let mut output = crate::operation::put_inventory::PutInventoryOutput::deserialize_with_response(
         669  +
                &mut *deser,
         670  +
                _response_headers,
         671  +
                response.status().into(),
         672  +
                body,
         673  +
            )
         674  +
            .map_err(|e| {
         675  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         676  +
            })?;
         677  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         678  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         679  +
        }
         680  +
    }
         681  +
}
         682  +
#[derive(Debug)]
         683  +
struct PutInventoryRequestSerializer;
         684  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutInventoryRequestSerializer {
         685  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         686  +
    fn serialize_input(
         687  +
        &self,
         688  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         689  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         690  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         691  +
        let input = input
         692  +
            .downcast::<crate::operation::put_inventory::PutInventoryInput>()
         693  +
            .expect("correct type");
         694  +
         695  +
        let protocol = _cfg
         696  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         697  +
            .expect("a SharedClientProtocol is required");
         698  +
        let mut request = protocol
         699  +
            .serialize_request(&input, PutInventory::INPUT_SCHEMA, "/", _cfg)
         700  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         701  +
         702  +
        return ::std::result::Result::Ok(request);
         703  +
    }
         704  +
}
         705  +
#[derive(Debug)]
         706  +
struct PutInventoryEndpointParamsInterceptor;
         707  +
         708  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         709  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutInventoryEndpointParamsInterceptor {
         710  +
    fn name(&self) -> &'static str {
         711  +
        "PutInventoryEndpointParamsInterceptor"
         712  +
    }
         713  +
         714  +
    fn read_before_execution(
         715  +
        &self,
         716  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         717  +
            '_,
         718  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         719  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         720  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         721  +
        >,
         722  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         723  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         724  +
        let _input = context
         725  +
            .input()
         726  +
            .downcast_ref::<PutInventoryInput>()
         727  +
            .ok_or("failed to downcast to PutInventoryInput")?;
         728  +
         729  +
        let params = crate::config::endpoint::Params::builder()
         730  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         731  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         732  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         733  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         734  +
            .build()
         735  +
            .map_err(|err| {
         736  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         737  +
            })?;
         738  +
        cfg.interceptor_state()
         739  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         740  +
        ::std::result::Result::Ok(())
         741  +
    }
         742  +
}
         743  +
         744  +
// The get_* functions below are generated from JMESPath expressions in the
         745  +
// operationContextParams trait. They target the operation's input shape.
         746  +
         747  +
/// Error type for the `PutInventoryError` operation.
         748  +
#[non_exhaustive]
         749  +
#[derive(::std::fmt::Debug)]
         750  +
pub enum PutInventoryError {
         751  +
    /// <p>You have exceeded the limit for custom schemas. Delete one or more custom schemas and try again.</p>
         752  +
    CustomSchemaCountLimitExceededException(crate::types::error::CustomSchemaCountLimitExceededException),
         753  +
    /// <p>An error occurred on the server side.</p>
         754  +
    InternalServerError(crate::types::error::InternalServerError),
         755  +
    /// <p>The following problems can cause this exception:</p>
         756  +
    /// <ul>
         757  +
    /// <li>
         758  +
    /// <p>You don't have permission to access the managed node.</p></li>
         759  +
    /// <li>
         760  +
    /// <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p></li>
         761  +
    /// <li>
         762  +
    /// <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p></li>
         763  +
    /// <li>
         764  +
    /// <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p></li>
         765  +
    /// </ul>
         766  +
    InvalidInstanceId(crate::types::error::InvalidInstanceId),
         767  +
    /// <p>You specified invalid keys or values in the <code>Context</code> attribute for <code>InventoryItem</code>. Verify the keys and values, and try again.</p>
         768  +
    InvalidInventoryItemContextException(crate::types::error::InvalidInventoryItemContextException),
         769  +
    /// <p>One or more content items isn't valid.</p>
         770  +
    InvalidItemContentException(crate::types::error::InvalidItemContentException),
         771  +
    /// <p>The parameter type name isn't valid.</p>
         772  +
    InvalidTypeNameException(crate::types::error::InvalidTypeNameException),
         773  +
    /// <p>The inventory item has invalid content.</p>
         774  +
    ItemContentMismatchException(crate::types::error::ItemContentMismatchException),
         775  +
    /// <p>The inventory item size has exceeded the size limit.</p>
         776  +
    ItemSizeLimitExceededException(crate::types::error::ItemSizeLimitExceededException),
         777  +
    /// <p>The sub-type count exceeded the limit for the inventory type.</p>
         778  +
    SubTypeCountLimitExceededException(crate::types::error::SubTypeCountLimitExceededException),
         779  +
    /// <p>The size of inventory data has exceeded the total size limit for the resource.</p>
         780  +
    TotalSizeLimitExceededException(crate::types::error::TotalSizeLimitExceededException),
         781  +
    /// <p>The <code>Context</code> attribute that you specified for the <code>InventoryItem</code> isn't allowed for this inventory type. You can only use the <code>Context</code> attribute with inventory types like <code>AWS:ComplianceItem</code>.</p>
         782  +
    UnsupportedInventoryItemContextException(crate::types::error::UnsupportedInventoryItemContextException),
         783  +
    /// <p>Inventory item type schema version has to match supported versions in the service. Check output of GetInventorySchema to see the available schema version for each type.</p>
         784  +
    UnsupportedInventorySchemaVersionException(crate::types::error::UnsupportedInventorySchemaVersionException),
         785  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         786  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         787  +
    variable wildcard pattern and check `.code()`:
         788  +
     \
         789  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         790  +
     \
         791  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PutInventoryError) for what information is available for the error.")]
         792  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         793  +
}
         794  +
impl PutInventoryError {
         795  +
    /// Creates the `PutInventoryError::Unhandled` variant from any error type.
         796  +
    pub fn unhandled(
         797  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         798  +
    ) -> Self {
         799  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         800  +
            source: err.into(),
         801  +
            meta: ::std::default::Default::default(),
         802  +
        })
         803  +
    }
         804  +
         805  +
    /// Creates the `PutInventoryError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         806  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         807  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         808  +
            source: err.clone().into(),
         809  +
            meta: err,
         810  +
        })
         811  +
    }
         812  +
    ///
         813  +
    /// Returns error metadata, which includes the error code, message,
         814  +
    /// request ID, and potentially additional information.
         815  +
    ///
         816  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         817  +
        match self {
         818  +
            Self::CustomSchemaCountLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         819  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         820  +
            Self::InvalidInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         821  +
            Self::InvalidInventoryItemContextException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         822  +
            Self::InvalidItemContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         823  +
            Self::InvalidTypeNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         824  +
            Self::ItemContentMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         825  +
            Self::ItemSizeLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         826  +
            Self::SubTypeCountLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         827  +
            Self::TotalSizeLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         828  +
            Self::UnsupportedInventoryItemContextException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         829  +
            Self::UnsupportedInventorySchemaVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         830  +
            Self::Unhandled(e) => &e.meta,
         831  +
        }
         832  +
    }
         833  +
    /// Returns `true` if the error kind is `PutInventoryError::CustomSchemaCountLimitExceededException`.
         834  +
    pub fn is_custom_schema_count_limit_exceeded_exception(&self) -> bool {
         835  +
        matches!(self, Self::CustomSchemaCountLimitExceededException(_))
         836  +
    }
         837  +
    /// Returns `true` if the error kind is `PutInventoryError::InternalServerError`.
         838  +
    pub fn is_internal_server_error(&self) -> bool {
         839  +
        matches!(self, Self::InternalServerError(_))
         840  +
    }
         841  +
    /// Returns `true` if the error kind is `PutInventoryError::InvalidInstanceId`.
         842  +
    pub fn is_invalid_instance_id(&self) -> bool {
         843  +
        matches!(self, Self::InvalidInstanceId(_))
         844  +
    }
         845  +
    /// Returns `true` if the error kind is `PutInventoryError::InvalidInventoryItemContextException`.
         846  +
    pub fn is_invalid_inventory_item_context_exception(&self) -> bool {
         847  +
        matches!(self, Self::InvalidInventoryItemContextException(_))
         848  +
    }
         849  +
    /// Returns `true` if the error kind is `PutInventoryError::InvalidItemContentException`.
         850  +
    pub fn is_invalid_item_content_exception(&self) -> bool {
         851  +
        matches!(self, Self::InvalidItemContentException(_))
         852  +
    }
         853  +
    /// Returns `true` if the error kind is `PutInventoryError::InvalidTypeNameException`.
         854  +
    pub fn is_invalid_type_name_exception(&self) -> bool {
         855  +
        matches!(self, Self::InvalidTypeNameException(_))
         856  +
    }
         857  +
    /// Returns `true` if the error kind is `PutInventoryError::ItemContentMismatchException`.
         858  +
    pub fn is_item_content_mismatch_exception(&self) -> bool {
         859  +
        matches!(self, Self::ItemContentMismatchException(_))
         860  +
    }
         861  +
    /// Returns `true` if the error kind is `PutInventoryError::ItemSizeLimitExceededException`.
         862  +
    pub fn is_item_size_limit_exceeded_exception(&self) -> bool {
         863  +
        matches!(self, Self::ItemSizeLimitExceededException(_))
         864  +
    }
         865  +
    /// Returns `true` if the error kind is `PutInventoryError::SubTypeCountLimitExceededException`.
         866  +
    pub fn is_sub_type_count_limit_exceeded_exception(&self) -> bool {
         867  +
        matches!(self, Self::SubTypeCountLimitExceededException(_))
         868  +
    }
         869  +
    /// Returns `true` if the error kind is `PutInventoryError::TotalSizeLimitExceededException`.
         870  +
    pub fn is_total_size_limit_exceeded_exception(&self) -> bool {
         871  +
        matches!(self, Self::TotalSizeLimitExceededException(_))
         872  +
    }
         873  +
    /// Returns `true` if the error kind is `PutInventoryError::UnsupportedInventoryItemContextException`.
         874  +
    pub fn is_unsupported_inventory_item_context_exception(&self) -> bool {
         875  +
        matches!(self, Self::UnsupportedInventoryItemContextException(_))
         876  +
    }
         877  +
    /// Returns `true` if the error kind is `PutInventoryError::UnsupportedInventorySchemaVersionException`.
         878  +
    pub fn is_unsupported_inventory_schema_version_exception(&self) -> bool {
         879  +
        matches!(self, Self::UnsupportedInventorySchemaVersionException(_))
         880  +
    }
         881  +
}
         882  +
impl ::std::error::Error for PutInventoryError {
         883  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         884  +
        match self {
         885  +
            Self::CustomSchemaCountLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         886  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         887  +
            Self::InvalidInstanceId(_inner) => ::std::option::Option::Some(_inner),
         888  +
            Self::InvalidInventoryItemContextException(_inner) => ::std::option::Option::Some(_inner),
         889  +
            Self::InvalidItemContentException(_inner) => ::std::option::Option::Some(_inner),
         890  +
            Self::InvalidTypeNameException(_inner) => ::std::option::Option::Some(_inner),
         891  +
            Self::ItemContentMismatchException(_inner) => ::std::option::Option::Some(_inner),
         892  +
            Self::ItemSizeLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         893  +
            Self::SubTypeCountLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         894  +
            Self::TotalSizeLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         895  +
            Self::UnsupportedInventoryItemContextException(_inner) => ::std::option::Option::Some(_inner),
         896  +
            Self::UnsupportedInventorySchemaVersionException(_inner) => ::std::option::Option::Some(_inner),
         897  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         898  +
        }
         899  +
    }
         900  +
}
         901  +
impl ::std::fmt::Display for PutInventoryError {
         902  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         903  +
        match self {
         904  +
            Self::CustomSchemaCountLimitExceededException(_inner) => _inner.fmt(f),
         905  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         906  +
            Self::InvalidInstanceId(_inner) => _inner.fmt(f),
         907  +
            Self::InvalidInventoryItemContextException(_inner) => _inner.fmt(f),
         908  +
            Self::InvalidItemContentException(_inner) => _inner.fmt(f),
         909  +
            Self::InvalidTypeNameException(_inner) => _inner.fmt(f),
         910  +
            Self::ItemContentMismatchException(_inner) => _inner.fmt(f),
         911  +
            Self::ItemSizeLimitExceededException(_inner) => _inner.fmt(f),
         912  +
            Self::SubTypeCountLimitExceededException(_inner) => _inner.fmt(f),
         913  +
            Self::TotalSizeLimitExceededException(_inner) => _inner.fmt(f),
         914  +
            Self::UnsupportedInventoryItemContextException(_inner) => _inner.fmt(f),
         915  +
            Self::UnsupportedInventorySchemaVersionException(_inner) => _inner.fmt(f),
         916  +
            Self::Unhandled(_inner) => {
         917  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         918  +
                    write!(f, "unhandled error ({code})")
         919  +
                } else {
         920  +
                    f.write_str("unhandled error")
         921  +
                }
         922  +
            }
         923  +
        }
         924  +
    }
         925  +
}
         926  +
impl ::aws_smithy_types::retry::ProvideErrorKind for PutInventoryError {
         927  +
    fn code(&self) -> ::std::option::Option<&str> {
         928  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         929  +
    }
         930  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         931  +
        ::std::option::Option::None
         932  +
    }
         933  +
}
         934  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PutInventoryError {
         935  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         936  +
        match self {
         937  +
            Self::CustomSchemaCountLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         938  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         939  +
            Self::InvalidInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         940  +
            Self::InvalidInventoryItemContextException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         941  +
            Self::InvalidItemContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         942  +
            Self::InvalidTypeNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         943  +
            Self::ItemContentMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         944  +
            Self::ItemSizeLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         945  +
            Self::SubTypeCountLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         946  +
            Self::TotalSizeLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         947  +
            Self::UnsupportedInventoryItemContextException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         948  +
            Self::UnsupportedInventorySchemaVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         949  +
            Self::Unhandled(_inner) => &_inner.meta,
         950  +
        }
         951  +
    }
         952  +
}
         953  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PutInventoryError {
         954  +
    fn create_unhandled_error(
         955  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         956  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         957  +
    ) -> Self {
         958  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         959  +
            source,
         960  +
            meta: meta.unwrap_or_default(),
         961  +
        })
         962  +
    }
         963  +
}
         964  +
impl ::aws_types::request_id::RequestId for crate::operation::put_inventory::PutInventoryError {
         965  +
    fn request_id(&self) -> Option<&str> {
         966  +
        self.meta().request_id()
         967  +
    }
         968  +
}
         969  +
         970  +
pub use crate::operation::put_inventory::_put_inventory_input::PutInventoryInput;
         971  +
         972  +
pub use crate::operation::put_inventory::_put_inventory_output::PutInventoryOutput;
         973  +
         974  +
mod _put_inventory_input;
         975  +
         976  +
mod _put_inventory_output;
         977  +
         978  +
/// Builders
         979  +
pub mod builders;