AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_compliance_execution_summary.rs

@@ -0,1 +0,230 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <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>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ComplianceExecutionSummary {
           7  +
    /// <p>The time the execution ran as a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p><important>
           8  +
    /// <p>For State Manager associations, this timestamp represents when the compliance status was captured and reported by the Systems Manager service, not when the underlying association was actually executed on the managed node. To track actual association execution times, use the <code>DescribeAssociationExecutionTargets</code> command or check the association execution history in the Systems Manager console.</p>
           9  +
    /// </important>
          10  +
    pub execution_time: ::aws_smithy_types::DateTime,
          11  +
    /// <p>An ID created by the system when <code>PutComplianceItems</code> was called. For example, <code>CommandID</code> is a valid execution ID. You can use this ID in subsequent calls.</p>
          12  +
    pub execution_id: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The type of execution. For example, <code>Command</code> is a valid execution type.</p>
          14  +
    pub execution_type: ::std::option::Option<::std::string::String>,
          15  +
}
          16  +
impl ComplianceExecutionSummary {
          17  +
    /// <p>The time the execution ran as a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p><important>
          18  +
    /// <p>For State Manager associations, this timestamp represents when the compliance status was captured and reported by the Systems Manager service, not when the underlying association was actually executed on the managed node. To track actual association execution times, use the <code>DescribeAssociationExecutionTargets</code> command or check the association execution history in the Systems Manager console.</p>
          19  +
    /// </important>
          20  +
    pub fn execution_time(&self) -> &::aws_smithy_types::DateTime {
          21  +
        &self.execution_time
          22  +
    }
          23  +
    /// <p>An ID created by the system when <code>PutComplianceItems</code> was called. For example, <code>CommandID</code> is a valid execution ID. You can use this ID in subsequent calls.</p>
          24  +
    pub fn execution_id(&self) -> ::std::option::Option<&str> {
          25  +
        self.execution_id.as_deref()
          26  +
    }
          27  +
    /// <p>The type of execution. For example, <code>Command</code> is a valid execution type.</p>
          28  +
    pub fn execution_type(&self) -> ::std::option::Option<&str> {
          29  +
        self.execution_type.as_deref()
          30  +
    }
          31  +
}
          32  +
static COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm#ComplianceExecutionSummary$ExecutionTime",
          35  +
        "com.amazonaws.ssm",
          36  +
        "ComplianceExecutionSummary",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::Timestamp,
          39  +
    "ExecutionTime",
          40  +
    0,
          41  +
);
          42  +
static COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts(
          44  +
        "com.amazonaws.ssm#ComplianceExecutionSummary$ExecutionId",
          45  +
        "com.amazonaws.ssm",
          46  +
        "ComplianceExecutionSummary",
          47  +
    ),
          48  +
    ::aws_smithy_schema::ShapeType::String,
          49  +
    "ExecutionId",
          50  +
    1,
          51  +
);
          52  +
static COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts(
          54  +
        "com.amazonaws.ssm#ComplianceExecutionSummary$ExecutionType",
          55  +
        "com.amazonaws.ssm",
          56  +
        "ComplianceExecutionSummary",
          57  +
    ),
          58  +
    ::aws_smithy_schema::ShapeType::String,
          59  +
    "ExecutionType",
          60  +
    2,
          61  +
);
          62  +
static COMPLIANCEEXECUTIONSUMMARY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts(
          64  +
        "com.amazonaws.ssm#ComplianceExecutionSummary",
          65  +
        "com.amazonaws.ssm",
          66  +
        "ComplianceExecutionSummary",
          67  +
    ),
          68  +
    ::aws_smithy_schema::ShapeType::Structure,
          69  +
    &[
          70  +
        &COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TIME,
          71  +
        &COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_ID,
          72  +
        &COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TYPE,
          73  +
    ],
          74  +
);
          75  +
impl ComplianceExecutionSummary {
          76  +
    /// The schema for this shape.
          77  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMPLIANCEEXECUTIONSUMMARY_SCHEMA;
          78  +
}
          79  +
impl ::aws_smithy_schema::serde::SerializableStruct for ComplianceExecutionSummary {
          80  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          81  +
    fn serialize_members(
          82  +
        &self,
          83  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          84  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          85  +
        {
          86  +
            let val = &self.execution_time;
          87  +
            ser.write_timestamp(&COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TIME, val)?;
          88  +
        }
          89  +
        if let Some(ref val) = self.execution_id {
          90  +
            ser.write_string(&COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_ID, val)?;
          91  +
        }
          92  +
        if let Some(ref val) = self.execution_type {
          93  +
            ser.write_string(&COMPLIANCEEXECUTIONSUMMARY_MEMBER_EXECUTION_TYPE, val)?;
          94  +
        }
          95  +
        Ok(())
          96  +
    }
          97  +
}
          98  +
impl ComplianceExecutionSummary {
          99  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         100  +
    pub fn deserialize(
         101  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         102  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         103  +
        #[allow(unused_variables, unused_mut)]
         104  +
        let mut builder = Self::builder();
         105  +
        #[allow(
         106  +
            unused_variables,
         107  +
            unreachable_code,
         108  +
            clippy::single_match,
         109  +
            clippy::match_single_binding,
         110  +
            clippy::diverging_sub_expression
         111  +
        )]
         112  +
        deserializer.read_struct(&COMPLIANCEEXECUTIONSUMMARY_SCHEMA, &mut |member, deser| {
         113  +
            match member.member_index() {
         114  +
                Some(0) => {
         115  +
                    builder.execution_time = Some(deser.read_timestamp(member)?);
         116  +
                }
         117  +
                Some(1) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.execution_id = Some(deser.read_string(member)?);
         122  +
                    }
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    if deser.is_null() {
         126  +
                        deser.read_null()?;
         127  +
                    } else {
         128  +
                        builder.execution_type = Some(deser.read_string(member)?);
         129  +
                    }
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.execution_time = builder.execution_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         136  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         137  +
    }
         138  +
}
         139  +
impl ComplianceExecutionSummary {
         140  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        Self::deserialize(deserializer)
         148  +
    }
         149  +
}
         150  +
impl ComplianceExecutionSummary {
         151  +
    /// Creates a new builder-style object to manufacture [`ComplianceExecutionSummary`](crate::types::ComplianceExecutionSummary).
         152  +
    pub fn builder() -> crate::types::builders::ComplianceExecutionSummaryBuilder {
         153  +
        crate::types::builders::ComplianceExecutionSummaryBuilder::default()
         154  +
    }
         155  +
}
         156  +
         157  +
/// A builder for [`ComplianceExecutionSummary`](crate::types::ComplianceExecutionSummary).
         158  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         159  +
#[non_exhaustive]
         160  +
pub struct ComplianceExecutionSummaryBuilder {
         161  +
    pub(crate) execution_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         162  +
    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
         163  +
    pub(crate) execution_type: ::std::option::Option<::std::string::String>,
         164  +
}
         165  +
impl ComplianceExecutionSummaryBuilder {
         166  +
    /// <p>The time the execution ran as a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p><important>
         167  +
    /// <p>For State Manager associations, this timestamp represents when the compliance status was captured and reported by the Systems Manager service, not when the underlying association was actually executed on the managed node. To track actual association execution times, use the <code>DescribeAssociationExecutionTargets</code> command or check the association execution history in the Systems Manager console.</p>
         168  +
    /// </important>
         169  +
    /// This field is required.
         170  +
    pub fn execution_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         171  +
        self.execution_time = ::std::option::Option::Some(input);
         172  +
        self
         173  +
    }
         174  +
    /// <p>The time the execution ran as a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p><important>
         175  +
    /// <p>For State Manager associations, this timestamp represents when the compliance status was captured and reported by the Systems Manager service, not when the underlying association was actually executed on the managed node. To track actual association execution times, use the <code>DescribeAssociationExecutionTargets</code> command or check the association execution history in the Systems Manager console.</p>
         176  +
    /// </important>
         177  +
    pub fn set_execution_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         178  +
        self.execution_time = input;
         179  +
        self
         180  +
    }
         181  +
    /// <p>The time the execution ran as a datetime object that is saved in the following format: <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code></p><important>
         182  +
    /// <p>For State Manager associations, this timestamp represents when the compliance status was captured and reported by the Systems Manager service, not when the underlying association was actually executed on the managed node. To track actual association execution times, use the <code>DescribeAssociationExecutionTargets</code> command or check the association execution history in the Systems Manager console.</p>
         183  +
    /// </important>
         184  +
    pub fn get_execution_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         185  +
        &self.execution_time
         186  +
    }
         187  +
    /// <p>An ID created by the system when <code>PutComplianceItems</code> was called. For example, <code>CommandID</code> is a valid execution ID. You can use this ID in subsequent calls.</p>
         188  +
    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         189  +
        self.execution_id = ::std::option::Option::Some(input.into());
         190  +
        self
         191  +
    }
         192  +
    /// <p>An ID created by the system when <code>PutComplianceItems</code> was called. For example, <code>CommandID</code> is a valid execution ID. You can use this ID in subsequent calls.</p>
         193  +
    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         194  +
        self.execution_id = input;
         195  +
        self
         196  +
    }
         197  +
    /// <p>An ID created by the system when <code>PutComplianceItems</code> was called. For example, <code>CommandID</code> is a valid execution ID. You can use this ID in subsequent calls.</p>
         198  +
    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
         199  +
        &self.execution_id
         200  +
    }
         201  +
    /// <p>The type of execution. For example, <code>Command</code> is a valid execution type.</p>
         202  +
    pub fn execution_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         203  +
        self.execution_type = ::std::option::Option::Some(input.into());
         204  +
        self
         205  +
    }
         206  +
    /// <p>The type of execution. For example, <code>Command</code> is a valid execution type.</p>
         207  +
    pub fn set_execution_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         208  +
        self.execution_type = input;
         209  +
        self
         210  +
    }
         211  +
    /// <p>The type of execution. For example, <code>Command</code> is a valid execution type.</p>
         212  +
    pub fn get_execution_type(&self) -> &::std::option::Option<::std::string::String> {
         213  +
        &self.execution_type
         214  +
    }
         215  +
    /// Consumes the builder and constructs a [`ComplianceExecutionSummary`](crate::types::ComplianceExecutionSummary).
         216  +
    /// This method will fail if any of the following fields are not set:
         217  +
    /// - [`execution_time`](crate::types::builders::ComplianceExecutionSummaryBuilder::execution_time)
         218  +
    pub fn build(self) -> ::std::result::Result<crate::types::ComplianceExecutionSummary, ::aws_smithy_types::error::operation::BuildError> {
         219  +
        ::std::result::Result::Ok(crate::types::ComplianceExecutionSummary {
         220  +
            execution_time: self.execution_time.ok_or_else(|| {
         221  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         222  +
                    "execution_time",
         223  +
                    "execution_time was not specified but it is required when building ComplianceExecutionSummary",
         224  +
                )
         225  +
            })?,
         226  +
            execution_id: self.execution_id,
         227  +
            execution_type: self.execution_type,
         228  +
        })
         229  +
    }
         230  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_compliance_item.rs

@@ -0,1 +0,478 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the compliance as defined by the resource type. For example, for a patch resource type, <code>Items</code> includes information about the PatchSeverity, Classification, and so on.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ComplianceItem {
           7  +
    /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
           8  +
    pub compliance_type: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
          10  +
    pub resource_type: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
          12  +
    pub resource_id: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
          14  +
    pub id: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
          16  +
    pub title: ::std::option::Option<::std::string::String>,
          17  +
    /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
          18  +
    pub status: ::std::option::Option<crate::types::ComplianceStatus>,
          19  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
          20  +
    pub severity: ::std::option::Option<crate::types::ComplianceSeverity>,
          21  +
    /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
          22  +
    /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
          23  +
    /// </important>
          24  +
    pub execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
          25  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
          26  +
    pub details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          27  +
}
          28  +
impl ComplianceItem {
          29  +
    /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
          30  +
    pub fn compliance_type(&self) -> ::std::option::Option<&str> {
          31  +
        self.compliance_type.as_deref()
          32  +
    }
          33  +
    /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
          34  +
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
          35  +
        self.resource_type.as_deref()
          36  +
    }
          37  +
    /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
          38  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          39  +
        self.resource_id.as_deref()
          40  +
    }
          41  +
    /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
          42  +
    pub fn id(&self) -> ::std::option::Option<&str> {
          43  +
        self.id.as_deref()
          44  +
    }
          45  +
    /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
          46  +
    pub fn title(&self) -> ::std::option::Option<&str> {
          47  +
        self.title.as_deref()
          48  +
    }
          49  +
    /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
          50  +
    pub fn status(&self) -> ::std::option::Option<&crate::types::ComplianceStatus> {
          51  +
        self.status.as_ref()
          52  +
    }
          53  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
          54  +
    pub fn severity(&self) -> ::std::option::Option<&crate::types::ComplianceSeverity> {
          55  +
        self.severity.as_ref()
          56  +
    }
          57  +
    /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
          58  +
    /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
          59  +
    /// </important>
          60  +
    pub fn execution_summary(&self) -> ::std::option::Option<&crate::types::ComplianceExecutionSummary> {
          61  +
        self.execution_summary.as_ref()
          62  +
    }
          63  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
          64  +
    pub fn details(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          65  +
        self.details.as_ref()
          66  +
    }
          67  +
}
          68  +
static COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ComplianceType", "com.amazonaws.ssm", "ComplianceItem"),
          70  +
    ::aws_smithy_schema::ShapeType::String,
          71  +
    "ComplianceType",
          72  +
    0,
          73  +
);
          74  +
static COMPLIANCEITEM_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ResourceType", "com.amazonaws.ssm", "ComplianceItem"),
          76  +
    ::aws_smithy_schema::ShapeType::String,
          77  +
    "ResourceType",
          78  +
    1,
          79  +
);
          80  +
static COMPLIANCEITEM_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ResourceId", "com.amazonaws.ssm", "ComplianceItem"),
          82  +
    ::aws_smithy_schema::ShapeType::String,
          83  +
    "ResourceId",
          84  +
    2,
          85  +
);
          86  +
static COMPLIANCEITEM_MEMBER_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          87  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Id", "com.amazonaws.ssm", "ComplianceItem"),
          88  +
    ::aws_smithy_schema::ShapeType::String,
          89  +
    "Id",
          90  +
    3,
          91  +
);
          92  +
static COMPLIANCEITEM_MEMBER_TITLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          93  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Title", "com.amazonaws.ssm", "ComplianceItem"),
          94  +
    ::aws_smithy_schema::ShapeType::String,
          95  +
    "Title",
          96  +
    4,
          97  +
);
          98  +
static COMPLIANCEITEM_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Status", "com.amazonaws.ssm", "ComplianceItem"),
         100  +
    ::aws_smithy_schema::ShapeType::String,
         101  +
    "Status",
         102  +
    5,
         103  +
);
         104  +
static COMPLIANCEITEM_MEMBER_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         105  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Severity", "com.amazonaws.ssm", "ComplianceItem"),
         106  +
    ::aws_smithy_schema::ShapeType::String,
         107  +
    "Severity",
         108  +
    6,
         109  +
);
         110  +
static COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         111  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$ExecutionSummary", "com.amazonaws.ssm", "ComplianceItem"),
         112  +
    ::aws_smithy_schema::ShapeType::Structure,
         113  +
    "ExecutionSummary",
         114  +
    7,
         115  +
);
         116  +
static COMPLIANCEITEM_MEMBER_DETAILS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         117  +
    ::aws_smithy_schema::ShapeId::from_parts(
         118  +
        "com.amazonaws.ssm#ComplianceItemDetails$key",
         119  +
        "com.amazonaws.ssm",
         120  +
        "ComplianceItemDetails",
         121  +
    ),
         122  +
    ::aws_smithy_schema::ShapeType::String,
         123  +
    "key",
         124  +
    0,
         125  +
);
         126  +
static COMPLIANCEITEM_MEMBER_DETAILS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         127  +
    ::aws_smithy_schema::ShapeId::from_parts(
         128  +
        "com.amazonaws.ssm#ComplianceItemDetails$value",
         129  +
        "com.amazonaws.ssm",
         130  +
        "ComplianceItemDetails",
         131  +
    ),
         132  +
    ::aws_smithy_schema::ShapeType::String,
         133  +
    "value",
         134  +
    1,
         135  +
);
         136  +
static COMPLIANCEITEM_MEMBER_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         137  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem$Details", "com.amazonaws.ssm", "ComplianceItem"),
         138  +
    ::aws_smithy_schema::ShapeType::Map,
         139  +
    "Details",
         140  +
    8,
         141  +
)
         142  +
.with_map_members(&COMPLIANCEITEM_MEMBER_DETAILS_KEY, &COMPLIANCEITEM_MEMBER_DETAILS_VALUE);
         143  +
static COMPLIANCEITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         144  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItem", "com.amazonaws.ssm", "ComplianceItem"),
         145  +
    ::aws_smithy_schema::ShapeType::Structure,
         146  +
    &[
         147  +
        &COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE,
         148  +
        &COMPLIANCEITEM_MEMBER_RESOURCE_TYPE,
         149  +
        &COMPLIANCEITEM_MEMBER_RESOURCE_ID,
         150  +
        &COMPLIANCEITEM_MEMBER_ID,
         151  +
        &COMPLIANCEITEM_MEMBER_TITLE,
         152  +
        &COMPLIANCEITEM_MEMBER_STATUS,
         153  +
        &COMPLIANCEITEM_MEMBER_SEVERITY,
         154  +
        &COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY,
         155  +
        &COMPLIANCEITEM_MEMBER_DETAILS,
         156  +
    ],
         157  +
);
         158  +
impl ComplianceItem {
         159  +
    /// The schema for this shape.
         160  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMPLIANCEITEM_SCHEMA;
         161  +
}
         162  +
impl ::aws_smithy_schema::serde::SerializableStruct for ComplianceItem {
         163  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         164  +
    fn serialize_members(
         165  +
        &self,
         166  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         167  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         168  +
        if let Some(ref val) = self.compliance_type {
         169  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_COMPLIANCE_TYPE, val)?;
         170  +
        }
         171  +
        if let Some(ref val) = self.resource_type {
         172  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_RESOURCE_TYPE, val)?;
         173  +
        }
         174  +
        if let Some(ref val) = self.resource_id {
         175  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_RESOURCE_ID, val)?;
         176  +
        }
         177  +
        if let Some(ref val) = self.id {
         178  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_ID, val)?;
         179  +
        }
         180  +
        if let Some(ref val) = self.title {
         181  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_TITLE, val)?;
         182  +
        }
         183  +
        if let Some(ref val) = self.status {
         184  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_STATUS, val.as_str())?;
         185  +
        }
         186  +
        if let Some(ref val) = self.severity {
         187  +
            ser.write_string(&COMPLIANCEITEM_MEMBER_SEVERITY, val.as_str())?;
         188  +
        }
         189  +
        if let Some(ref val) = self.execution_summary {
         190  +
            ser.write_struct(&COMPLIANCEITEM_MEMBER_EXECUTION_SUMMARY, val)?;
         191  +
        }
         192  +
        if let Some(ref val) = self.details {
         193  +
            ser.write_map(
         194  +
                &COMPLIANCEITEM_MEMBER_DETAILS,
         195  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         196  +
                    for (key, value) in val {
         197  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         198  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         199  +
                    }
         200  +
                    Ok(())
         201  +
                },
         202  +
            )?;
         203  +
        }
         204  +
        Ok(())
         205  +
    }
         206  +
}
         207  +
impl ComplianceItem {
         208  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         209  +
    pub fn deserialize(
         210  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         211  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         212  +
        #[allow(unused_variables, unused_mut)]
         213  +
        let mut builder = Self::builder();
         214  +
        #[allow(
         215  +
            unused_variables,
         216  +
            unreachable_code,
         217  +
            clippy::single_match,
         218  +
            clippy::match_single_binding,
         219  +
            clippy::diverging_sub_expression
         220  +
        )]
         221  +
        deserializer.read_struct(&COMPLIANCEITEM_SCHEMA, &mut |member, deser| {
         222  +
            match member.member_index() {
         223  +
                Some(0) => {
         224  +
                    if deser.is_null() {
         225  +
                        deser.read_null()?;
         226  +
                    } else {
         227  +
                        builder.compliance_type = Some(deser.read_string(member)?);
         228  +
                    }
         229  +
                }
         230  +
                Some(1) => {
         231  +
                    if deser.is_null() {
         232  +
                        deser.read_null()?;
         233  +
                    } else {
         234  +
                        builder.resource_type = Some(deser.read_string(member)?);
         235  +
                    }
         236  +
                }
         237  +
                Some(2) => {
         238  +
                    if deser.is_null() {
         239  +
                        deser.read_null()?;
         240  +
                    } else {
         241  +
                        builder.resource_id = Some(deser.read_string(member)?);
         242  +
                    }
         243  +
                }
         244  +
                Some(3) => {
         245  +
                    if deser.is_null() {
         246  +
                        deser.read_null()?;
         247  +
                    } else {
         248  +
                        builder.id = Some(deser.read_string(member)?);
         249  +
                    }
         250  +
                }
         251  +
                Some(4) => {
         252  +
                    if deser.is_null() {
         253  +
                        deser.read_null()?;
         254  +
                    } else {
         255  +
                        builder.title = Some(deser.read_string(member)?);
         256  +
                    }
         257  +
                }
         258  +
                Some(5) => {
         259  +
                    if deser.is_null() {
         260  +
                        deser.read_null()?;
         261  +
                    } else {
         262  +
                        builder.status = Some(crate::types::ComplianceStatus::from(deser.read_string(member)?.as_str()));
         263  +
                    }
         264  +
                }
         265  +
                Some(6) => {
         266  +
                    if deser.is_null() {
         267  +
                        deser.read_null()?;
         268  +
                    } else {
         269  +
                        builder.severity = Some(crate::types::ComplianceSeverity::from(deser.read_string(member)?.as_str()));
         270  +
                    }
         271  +
                }
         272  +
                Some(7) => {
         273  +
                    if deser.is_null() {
         274  +
                        deser.read_null()?;
         275  +
                    } else {
         276  +
                        builder.execution_summary = Some(crate::types::ComplianceExecutionSummary::deserialize(deser)?);
         277  +
                    }
         278  +
                }
         279  +
                Some(8) => {
         280  +
                    if deser.is_null() {
         281  +
                        deser.read_null()?;
         282  +
                    } else {
         283  +
                        builder.details = Some(deser.read_string_string_map(member)?);
         284  +
                    }
         285  +
                }
         286  +
                _ => {}
         287  +
            }
         288  +
            Ok(())
         289  +
        })?;
         290  +
        Ok(builder.build())
         291  +
    }
         292  +
}
         293  +
impl ComplianceItem {
         294  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         295  +
    pub fn deserialize_with_response(
         296  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         297  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         298  +
        _status: u16,
         299  +
        _body: &[u8],
         300  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         301  +
        Self::deserialize(deserializer)
         302  +
    }
         303  +
}
         304  +
impl ComplianceItem {
         305  +
    /// Creates a new builder-style object to manufacture [`ComplianceItem`](crate::types::ComplianceItem).
         306  +
    pub fn builder() -> crate::types::builders::ComplianceItemBuilder {
         307  +
        crate::types::builders::ComplianceItemBuilder::default()
         308  +
    }
         309  +
}
         310  +
         311  +
/// A builder for [`ComplianceItem`](crate::types::ComplianceItem).
         312  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         313  +
#[non_exhaustive]
         314  +
pub struct ComplianceItemBuilder {
         315  +
    pub(crate) compliance_type: ::std::option::Option<::std::string::String>,
         316  +
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
         317  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         318  +
    pub(crate) id: ::std::option::Option<::std::string::String>,
         319  +
    pub(crate) title: ::std::option::Option<::std::string::String>,
         320  +
    pub(crate) status: ::std::option::Option<crate::types::ComplianceStatus>,
         321  +
    pub(crate) severity: ::std::option::Option<crate::types::ComplianceSeverity>,
         322  +
    pub(crate) execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
         323  +
    pub(crate) details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         324  +
}
         325  +
impl ComplianceItemBuilder {
         326  +
    /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
         327  +
    pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         328  +
        self.compliance_type = ::std::option::Option::Some(input.into());
         329  +
        self
         330  +
    }
         331  +
    /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
         332  +
    pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         333  +
        self.compliance_type = input;
         334  +
        self
         335  +
    }
         336  +
    /// <p>The compliance type. For example, Association (for a State Manager association), Patch, or Custom:<code>string</code> are all valid compliance types.</p>
         337  +
    pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
         338  +
        &self.compliance_type
         339  +
    }
         340  +
    /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         341  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         342  +
        self.resource_type = ::std::option::Option::Some(input.into());
         343  +
        self
         344  +
    }
         345  +
    /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         346  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         347  +
        self.resource_type = input;
         348  +
        self
         349  +
    }
         350  +
    /// <p>The type of resource. <code>ManagedInstance</code> is currently the only supported resource type.</p>
         351  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         352  +
        &self.resource_type
         353  +
    }
         354  +
    /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
         355  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         356  +
        self.resource_id = ::std::option::Option::Some(input.into());
         357  +
        self
         358  +
    }
         359  +
    /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
         360  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         361  +
        self.resource_id = input;
         362  +
        self
         363  +
    }
         364  +
    /// <p>An ID for the resource. For a managed node, this is the node ID.</p>
         365  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         366  +
        &self.resource_id
         367  +
    }
         368  +
    /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
         369  +
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         370  +
        self.id = ::std::option::Option::Some(input.into());
         371  +
        self
         372  +
    }
         373  +
    /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
         374  +
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         375  +
        self.id = input;
         376  +
        self
         377  +
    }
         378  +
    /// <p>An ID for the compliance item. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article; for example: KB4010320.</p>
         379  +
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
         380  +
        &self.id
         381  +
    }
         382  +
    /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         383  +
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         384  +
        self.title = ::std::option::Option::Some(input.into());
         385  +
        self
         386  +
    }
         387  +
    /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         388  +
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         389  +
        self.title = input;
         390  +
        self
         391  +
    }
         392  +
    /// <p>A title for the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         393  +
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
         394  +
        &self.title
         395  +
    }
         396  +
    /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
         397  +
    pub fn status(mut self, input: crate::types::ComplianceStatus) -> Self {
         398  +
        self.status = ::std::option::Option::Some(input);
         399  +
        self
         400  +
    }
         401  +
    /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
         402  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ComplianceStatus>) -> Self {
         403  +
        self.status = input;
         404  +
        self
         405  +
    }
         406  +
    /// <p>The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).</p>
         407  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ComplianceStatus> {
         408  +
        &self.status
         409  +
    }
         410  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         411  +
    pub fn severity(mut self, input: crate::types::ComplianceSeverity) -> Self {
         412  +
        self.severity = ::std::option::Option::Some(input);
         413  +
        self
         414  +
    }
         415  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         416  +
    pub fn set_severity(mut self, input: ::std::option::Option<crate::types::ComplianceSeverity>) -> Self {
         417  +
        self.severity = input;
         418  +
        self
         419  +
    }
         420  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         421  +
    pub fn get_severity(&self) -> &::std::option::Option<crate::types::ComplianceSeverity> {
         422  +
        &self.severity
         423  +
    }
         424  +
    /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
         425  +
    /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
         426  +
    /// </important>
         427  +
    pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
         428  +
        self.execution_summary = ::std::option::Option::Some(input);
         429  +
        self
         430  +
    }
         431  +
    /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
         432  +
    /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
         433  +
    /// </important>
         434  +
    pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
         435  +
        self.execution_summary = input;
         436  +
        self
         437  +
    }
         438  +
    /// <p>A summary for the compliance item. The summary includes an execution ID, the execution type (for example, command), and the execution time.</p><important>
         439  +
    /// <p>For State Manager associations, the <code>ExecutionTime</code> value represents when the compliance status was captured and aggregated by the Systems Manager service, not necessarily when the underlying association was executed on the managed node. State Manager updates compliance status for all associations on an instance whenever any association executes, which means multiple associations may show the same execution time even if they were executed at different times.</p>
         440  +
    /// </important>
         441  +
    pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
         442  +
        &self.execution_summary
         443  +
    }
         444  +
    /// Adds a key-value pair to `details`.
         445  +
    ///
         446  +
    /// To override the contents of this collection use [`set_details`](Self::set_details).
         447  +
    ///
         448  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         449  +
    pub fn details(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
         450  +
        let mut hash_map = self.details.unwrap_or_default();
         451  +
        hash_map.insert(k.into(), v.into());
         452  +
        self.details = ::std::option::Option::Some(hash_map);
         453  +
        self
         454  +
    }
         455  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         456  +
    pub fn set_details(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
         457  +
        self.details = input;
         458  +
        self
         459  +
    }
         460  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         461  +
    pub fn get_details(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         462  +
        &self.details
         463  +
    }
         464  +
    /// Consumes the builder and constructs a [`ComplianceItem`](crate::types::ComplianceItem).
         465  +
    pub fn build(self) -> crate::types::ComplianceItem {
         466  +
        crate::types::ComplianceItem {
         467  +
            compliance_type: self.compliance_type,
         468  +
            resource_type: self.resource_type,
         469  +
            resource_id: self.resource_id,
         470  +
            id: self.id,
         471  +
            title: self.title,
         472  +
            status: self.status,
         473  +
            severity: self.severity,
         474  +
            execution_summary: self.execution_summary,
         475  +
            details: self.details,
         476  +
        }
         477  +
    }
         478  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/types/_compliance_item_entry.rs

@@ -0,1 +0,329 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about a compliance item.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ComplianceItemEntry {
           7  +
    /// <p>The compliance item ID. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article.</p>
           8  +
    pub id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The title of the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
          10  +
    pub title: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
          12  +
    pub severity: crate::types::ComplianceSeverity,
          13  +
    /// <p>The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.</p>
          14  +
    pub status: crate::types::ComplianceStatus,
          15  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
          16  +
    pub details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          17  +
}
          18  +
impl ComplianceItemEntry {
          19  +
    /// <p>The compliance item ID. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article.</p>
          20  +
    pub fn id(&self) -> ::std::option::Option<&str> {
          21  +
        self.id.as_deref()
          22  +
    }
          23  +
    /// <p>The title of the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
          24  +
    pub fn title(&self) -> ::std::option::Option<&str> {
          25  +
        self.title.as_deref()
          26  +
    }
          27  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
          28  +
    pub fn severity(&self) -> &crate::types::ComplianceSeverity {
          29  +
        &self.severity
          30  +
    }
          31  +
    /// <p>The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.</p>
          32  +
    pub fn status(&self) -> &crate::types::ComplianceStatus {
          33  +
        &self.status
          34  +
    }
          35  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
          36  +
    pub fn details(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          37  +
        self.details.as_ref()
          38  +
    }
          39  +
}
          40  +
static COMPLIANCEITEMENTRY_MEMBER_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItemEntry$Id", "com.amazonaws.ssm", "ComplianceItemEntry"),
          42  +
    ::aws_smithy_schema::ShapeType::String,
          43  +
    "Id",
          44  +
    0,
          45  +
);
          46  +
static COMPLIANCEITEMENTRY_MEMBER_TITLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItemEntry$Title", "com.amazonaws.ssm", "ComplianceItemEntry"),
          48  +
    ::aws_smithy_schema::ShapeType::String,
          49  +
    "Title",
          50  +
    1,
          51  +
);
          52  +
static COMPLIANCEITEMENTRY_MEMBER_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_parts(
          54  +
        "com.amazonaws.ssm#ComplianceItemEntry$Severity",
          55  +
        "com.amazonaws.ssm",
          56  +
        "ComplianceItemEntry",
          57  +
    ),
          58  +
    ::aws_smithy_schema::ShapeType::String,
          59  +
    "Severity",
          60  +
    2,
          61  +
);
          62  +
static COMPLIANCEITEMENTRY_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          63  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItemEntry$Status", "com.amazonaws.ssm", "ComplianceItemEntry"),
          64  +
    ::aws_smithy_schema::ShapeType::String,
          65  +
    "Status",
          66  +
    3,
          67  +
);
          68  +
static COMPLIANCEITEMENTRY_MEMBER_DETAILS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm#ComplianceItemDetails$key",
          71  +
        "com.amazonaws.ssm",
          72  +
        "ComplianceItemDetails",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "key",
          76  +
    0,
          77  +
);
          78  +
static COMPLIANCEITEMENTRY_MEMBER_DETAILS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts(
          80  +
        "com.amazonaws.ssm#ComplianceItemDetails$value",
          81  +
        "com.amazonaws.ssm",
          82  +
        "ComplianceItemDetails",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::String,
          85  +
    "value",
          86  +
    1,
          87  +
);
          88  +
static COMPLIANCEITEMENTRY_MEMBER_DETAILS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          89  +
    ::aws_smithy_schema::ShapeId::from_parts(
          90  +
        "com.amazonaws.ssm#ComplianceItemEntry$Details",
          91  +
        "com.amazonaws.ssm",
          92  +
        "ComplianceItemEntry",
          93  +
    ),
          94  +
    ::aws_smithy_schema::ShapeType::Map,
          95  +
    "Details",
          96  +
    4,
          97  +
)
          98  +
.with_map_members(&COMPLIANCEITEMENTRY_MEMBER_DETAILS_KEY, &COMPLIANCEITEMENTRY_MEMBER_DETAILS_VALUE);
          99  +
static COMPLIANCEITEMENTRY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         100  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ComplianceItemEntry", "com.amazonaws.ssm", "ComplianceItemEntry"),
         101  +
    ::aws_smithy_schema::ShapeType::Structure,
         102  +
    &[
         103  +
        &COMPLIANCEITEMENTRY_MEMBER_ID,
         104  +
        &COMPLIANCEITEMENTRY_MEMBER_TITLE,
         105  +
        &COMPLIANCEITEMENTRY_MEMBER_SEVERITY,
         106  +
        &COMPLIANCEITEMENTRY_MEMBER_STATUS,
         107  +
        &COMPLIANCEITEMENTRY_MEMBER_DETAILS,
         108  +
    ],
         109  +
);
         110  +
impl ComplianceItemEntry {
         111  +
    /// The schema for this shape.
         112  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &COMPLIANCEITEMENTRY_SCHEMA;
         113  +
}
         114  +
impl ::aws_smithy_schema::serde::SerializableStruct for ComplianceItemEntry {
         115  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         116  +
    fn serialize_members(
         117  +
        &self,
         118  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         119  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         120  +
        if let Some(ref val) = self.id {
         121  +
            ser.write_string(&COMPLIANCEITEMENTRY_MEMBER_ID, val)?;
         122  +
        }
         123  +
        if let Some(ref val) = self.title {
         124  +
            ser.write_string(&COMPLIANCEITEMENTRY_MEMBER_TITLE, val)?;
         125  +
        }
         126  +
        {
         127  +
            let val = &self.severity;
         128  +
            ser.write_string(&COMPLIANCEITEMENTRY_MEMBER_SEVERITY, val.as_str())?;
         129  +
        }
         130  +
        {
         131  +
            let val = &self.status;
         132  +
            ser.write_string(&COMPLIANCEITEMENTRY_MEMBER_STATUS, val.as_str())?;
         133  +
        }
         134  +
        if let Some(ref val) = self.details {
         135  +
            ser.write_map(
         136  +
                &COMPLIANCEITEMENTRY_MEMBER_DETAILS,
         137  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         138  +
                    for (key, value) in val {
         139  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         140  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         141  +
                    }
         142  +
                    Ok(())
         143  +
                },
         144  +
            )?;
         145  +
        }
         146  +
        Ok(())
         147  +
    }
         148  +
}
         149  +
impl ComplianceItemEntry {
         150  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         151  +
    pub fn deserialize(
         152  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         153  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         154  +
        #[allow(unused_variables, unused_mut)]
         155  +
        let mut builder = Self::builder();
         156  +
        #[allow(
         157  +
            unused_variables,
         158  +
            unreachable_code,
         159  +
            clippy::single_match,
         160  +
            clippy::match_single_binding,
         161  +
            clippy::diverging_sub_expression
         162  +
        )]
         163  +
        deserializer.read_struct(&COMPLIANCEITEMENTRY_SCHEMA, &mut |member, deser| {
         164  +
            match member.member_index() {
         165  +
                Some(0) => {
         166  +
                    if deser.is_null() {
         167  +
                        deser.read_null()?;
         168  +
                    } else {
         169  +
                        builder.id = Some(deser.read_string(member)?);
         170  +
                    }
         171  +
                }
         172  +
                Some(1) => {
         173  +
                    if deser.is_null() {
         174  +
                        deser.read_null()?;
         175  +
                    } else {
         176  +
                        builder.title = Some(deser.read_string(member)?);
         177  +
                    }
         178  +
                }
         179  +
                Some(2) => {
         180  +
                    builder.severity = Some(crate::types::ComplianceSeverity::from(deser.read_string(member)?.as_str()));
         181  +
                }
         182  +
                Some(3) => {
         183  +
                    builder.status = Some(crate::types::ComplianceStatus::from(deser.read_string(member)?.as_str()));
         184  +
                }
         185  +
                Some(4) => {
         186  +
                    if deser.is_null() {
         187  +
                        deser.read_null()?;
         188  +
                    } else {
         189  +
                        builder.details = Some(deser.read_string_string_map(member)?);
         190  +
                    }
         191  +
                }
         192  +
                _ => {}
         193  +
            }
         194  +
            Ok(())
         195  +
        })?;
         196  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         197  +
    }
         198  +
}
         199  +
impl ComplianceItemEntry {
         200  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         201  +
    pub fn deserialize_with_response(
         202  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         203  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         204  +
        _status: u16,
         205  +
        _body: &[u8],
         206  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         207  +
        Self::deserialize(deserializer)
         208  +
    }
         209  +
}
         210  +
impl ComplianceItemEntry {
         211  +
    /// Creates a new builder-style object to manufacture [`ComplianceItemEntry`](crate::types::ComplianceItemEntry).
         212  +
    pub fn builder() -> crate::types::builders::ComplianceItemEntryBuilder {
         213  +
        crate::types::builders::ComplianceItemEntryBuilder::default()
         214  +
    }
         215  +
}
         216  +
         217  +
/// A builder for [`ComplianceItemEntry`](crate::types::ComplianceItemEntry).
         218  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         219  +
#[non_exhaustive]
         220  +
pub struct ComplianceItemEntryBuilder {
         221  +
    pub(crate) id: ::std::option::Option<::std::string::String>,
         222  +
    pub(crate) title: ::std::option::Option<::std::string::String>,
         223  +
    pub(crate) severity: ::std::option::Option<crate::types::ComplianceSeverity>,
         224  +
    pub(crate) status: ::std::option::Option<crate::types::ComplianceStatus>,
         225  +
    pub(crate) details: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         226  +
}
         227  +
impl ComplianceItemEntryBuilder {
         228  +
    /// <p>The compliance item ID. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article.</p>
         229  +
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         230  +
        self.id = ::std::option::Option::Some(input.into());
         231  +
        self
         232  +
    }
         233  +
    /// <p>The compliance item ID. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article.</p>
         234  +
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         235  +
        self.id = input;
         236  +
        self
         237  +
    }
         238  +
    /// <p>The compliance item ID. For example, if the compliance item is a Windows patch, the ID could be the number of the KB article.</p>
         239  +
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
         240  +
        &self.id
         241  +
    }
         242  +
    /// <p>The title of the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         243  +
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         244  +
        self.title = ::std::option::Option::Some(input.into());
         245  +
        self
         246  +
    }
         247  +
    /// <p>The title of the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         248  +
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         249  +
        self.title = input;
         250  +
        self
         251  +
    }
         252  +
    /// <p>The title of the compliance item. For example, if the compliance item is a Windows patch, the title could be the title of the KB article for the patch; for example: Security Update for Active Directory Federation Services.</p>
         253  +
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
         254  +
        &self.title
         255  +
    }
         256  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         257  +
    /// This field is required.
         258  +
    pub fn severity(mut self, input: crate::types::ComplianceSeverity) -> Self {
         259  +
        self.severity = ::std::option::Option::Some(input);
         260  +
        self
         261  +
    }
         262  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         263  +
    pub fn set_severity(mut self, input: ::std::option::Option<crate::types::ComplianceSeverity>) -> Self {
         264  +
        self.severity = input;
         265  +
        self
         266  +
    }
         267  +
    /// <p>The severity of the compliance status. Severity can be one of the following: Critical, High, Medium, Low, Informational, Unspecified.</p>
         268  +
    pub fn get_severity(&self) -> &::std::option::Option<crate::types::ComplianceSeverity> {
         269  +
        &self.severity
         270  +
    }
         271  +
    /// <p>The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.</p>
         272  +
    /// This field is required.
         273  +
    pub fn status(mut self, input: crate::types::ComplianceStatus) -> Self {
         274  +
        self.status = ::std::option::Option::Some(input);
         275  +
        self
         276  +
    }
         277  +
    /// <p>The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.</p>
         278  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ComplianceStatus>) -> Self {
         279  +
        self.status = input;
         280  +
        self
         281  +
    }
         282  +
    /// <p>The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.</p>
         283  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ComplianceStatus> {
         284  +
        &self.status
         285  +
    }
         286  +
    /// Adds a key-value pair to `details`.
         287  +
    ///
         288  +
    /// To override the contents of this collection use [`set_details`](Self::set_details).
         289  +
    ///
         290  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         291  +
    pub fn details(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
         292  +
        let mut hash_map = self.details.unwrap_or_default();
         293  +
        hash_map.insert(k.into(), v.into());
         294  +
        self.details = ::std::option::Option::Some(hash_map);
         295  +
        self
         296  +
    }
         297  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         298  +
    pub fn set_details(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
         299  +
        self.details = input;
         300  +
        self
         301  +
    }
         302  +
    /// <p>A "Key": "Value" tag combination for the compliance item.</p>
         303  +
    pub fn get_details(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         304  +
        &self.details
         305  +
    }
         306  +
    /// Consumes the builder and constructs a [`ComplianceItemEntry`](crate::types::ComplianceItemEntry).
         307  +
    /// This method will fail if any of the following fields are not set:
         308  +
    /// - [`severity`](crate::types::builders::ComplianceItemEntryBuilder::severity)
         309  +
    /// - [`status`](crate::types::builders::ComplianceItemEntryBuilder::status)
         310  +
    pub fn build(self) -> ::std::result::Result<crate::types::ComplianceItemEntry, ::aws_smithy_types::error::operation::BuildError> {
         311  +
        ::std::result::Result::Ok(crate::types::ComplianceItemEntry {
         312  +
            id: self.id,
         313  +
            title: self.title,
         314  +
            severity: self.severity.ok_or_else(|| {
         315  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         316  +
                    "severity",
         317  +
                    "severity was not specified but it is required when building ComplianceItemEntry",
         318  +
                )
         319  +
            })?,
         320  +
            status: self.status.ok_or_else(|| {
         321  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         322  +
                    "status",
         323  +
                    "status was not specified but it is required when building ComplianceItemEntry",
         324  +
                )
         325  +
            })?,
         326  +
            details: self.details,
         327  +
        })
         328  +
    }
         329  +
}