AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

@@ -0,1 +0,180 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about targets that resolved during the Automation execution.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResolvedTargets {
           7  +
    /// <p>A list of parameter values sent to targets that resolved during the Automation execution.</p>
           8  +
    pub parameter_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
           9  +
    /// <p>A boolean value indicating whether the resolved target list is truncated.</p>
          10  +
    pub truncated: bool,
          11  +
}
          12  +
impl ResolvedTargets {
          13  +
    /// <p>A list of parameter values sent to targets that resolved during the Automation execution.</p>
          14  +
    ///
          15  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameter_values.is_none()`.
          16  +
    pub fn parameter_values(&self) -> &[::std::string::String] {
          17  +
        self.parameter_values.as_deref().unwrap_or_default()
          18  +
    }
          19  +
    /// <p>A boolean value indicating whether the resolved target list is truncated.</p>
          20  +
    pub fn truncated(&self) -> bool {
          21  +
        self.truncated
          22  +
    }
          23  +
}
          24  +
static RESOLVEDTARGETS_MEMBER_PARAMETER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          25  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetParameterList$member", "com.amazonaws.ssm", "TargetParameterList"),
          26  +
    ::aws_smithy_schema::ShapeType::String,
          27  +
    "member",
          28  +
    0,
          29  +
);
          30  +
static RESOLVEDTARGETS_MEMBER_PARAMETER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          31  +
    ::aws_smithy_schema::ShapeId::from_parts(
          32  +
        "com.amazonaws.ssm#ResolvedTargets$ParameterValues",
          33  +
        "com.amazonaws.ssm",
          34  +
        "ResolvedTargets",
          35  +
    ),
          36  +
    ::aws_smithy_schema::ShapeType::List,
          37  +
    "ParameterValues",
          38  +
    0,
          39  +
)
          40  +
.with_list_member(&RESOLVEDTARGETS_MEMBER_PARAMETER_VALUES_MEMBER);
          41  +
static RESOLVEDTARGETS_MEMBER_TRUNCATED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          42  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResolvedTargets$Truncated", "com.amazonaws.ssm", "ResolvedTargets"),
          43  +
    ::aws_smithy_schema::ShapeType::Boolean,
          44  +
    "Truncated",
          45  +
    1,
          46  +
);
          47  +
static RESOLVEDTARGETS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResolvedTargets", "com.amazonaws.ssm", "ResolvedTargets"),
          49  +
    ::aws_smithy_schema::ShapeType::Structure,
          50  +
    &[&RESOLVEDTARGETS_MEMBER_PARAMETER_VALUES, &RESOLVEDTARGETS_MEMBER_TRUNCATED],
          51  +
);
          52  +
impl ResolvedTargets {
          53  +
    /// The schema for this shape.
          54  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOLVEDTARGETS_SCHEMA;
          55  +
}
          56  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResolvedTargets {
          57  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          58  +
    fn serialize_members(
          59  +
        &self,
          60  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          61  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          62  +
        if let Some(ref val) = self.parameter_values {
          63  +
            ser.write_list(
          64  +
                &RESOLVEDTARGETS_MEMBER_PARAMETER_VALUES,
          65  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          66  +
                    for item in val {
          67  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
          68  +
                    }
          69  +
                    Ok(())
          70  +
                },
          71  +
            )?;
          72  +
        }
          73  +
        {
          74  +
            let val = &self.truncated;
          75  +
            ser.write_boolean(&RESOLVEDTARGETS_MEMBER_TRUNCATED, *val)?;
          76  +
        }
          77  +
        Ok(())
          78  +
    }
          79  +
}
          80  +
impl ResolvedTargets {
          81  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          82  +
    pub fn deserialize(
          83  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        #[allow(unused_variables, unused_mut)]
          86  +
        let mut builder = Self::builder();
          87  +
        #[allow(
          88  +
            unused_variables,
          89  +
            unreachable_code,
          90  +
            clippy::single_match,
          91  +
            clippy::match_single_binding,
          92  +
            clippy::diverging_sub_expression
          93  +
        )]
          94  +
        deserializer.read_struct(&RESOLVEDTARGETS_SCHEMA, &mut |member, deser| {
          95  +
            match member.member_index() {
          96  +
                Some(0) => {
          97  +
                    if deser.is_null() {
          98  +
                        deser.read_null()?;
          99  +
                    } else {
         100  +
                        builder.parameter_values = Some(deser.read_string_list(member)?);
         101  +
                    }
         102  +
                }
         103  +
                Some(1) => {
         104  +
                    builder.truncated = Some(deser.read_boolean(member)?);
         105  +
                }
         106  +
                _ => {}
         107  +
            }
         108  +
            Ok(())
         109  +
        })?;
         110  +
        Ok(builder.build())
         111  +
    }
         112  +
}
         113  +
impl ResolvedTargets {
         114  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         115  +
    pub fn deserialize_with_response(
         116  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         117  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         118  +
        _status: u16,
         119  +
        _body: &[u8],
         120  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         121  +
        Self::deserialize(deserializer)
         122  +
    }
         123  +
}
         124  +
impl ResolvedTargets {
         125  +
    /// Creates a new builder-style object to manufacture [`ResolvedTargets`](crate::types::ResolvedTargets).
         126  +
    pub fn builder() -> crate::types::builders::ResolvedTargetsBuilder {
         127  +
        crate::types::builders::ResolvedTargetsBuilder::default()
         128  +
    }
         129  +
}
         130  +
         131  +
/// A builder for [`ResolvedTargets`](crate::types::ResolvedTargets).
         132  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         133  +
#[non_exhaustive]
         134  +
pub struct ResolvedTargetsBuilder {
         135  +
    pub(crate) parameter_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         136  +
    pub(crate) truncated: ::std::option::Option<bool>,
         137  +
}
         138  +
impl ResolvedTargetsBuilder {
         139  +
    /// Appends an item to `parameter_values`.
         140  +
    ///
         141  +
    /// To override the contents of this collection use [`set_parameter_values`](Self::set_parameter_values).
         142  +
    ///
         143  +
    /// <p>A list of parameter values sent to targets that resolved during the Automation execution.</p>
         144  +
    pub fn parameter_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         145  +
        let mut v = self.parameter_values.unwrap_or_default();
         146  +
        v.push(input.into());
         147  +
        self.parameter_values = ::std::option::Option::Some(v);
         148  +
        self
         149  +
    }
         150  +
    /// <p>A list of parameter values sent to targets that resolved during the Automation execution.</p>
         151  +
    pub fn set_parameter_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         152  +
        self.parameter_values = input;
         153  +
        self
         154  +
    }
         155  +
    /// <p>A list of parameter values sent to targets that resolved during the Automation execution.</p>
         156  +
    pub fn get_parameter_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         157  +
        &self.parameter_values
         158  +
    }
         159  +
    /// <p>A boolean value indicating whether the resolved target list is truncated.</p>
         160  +
    pub fn truncated(mut self, input: bool) -> Self {
         161  +
        self.truncated = ::std::option::Option::Some(input);
         162  +
        self
         163  +
    }
         164  +
    /// <p>A boolean value indicating whether the resolved target list is truncated.</p>
         165  +
    pub fn set_truncated(mut self, input: ::std::option::Option<bool>) -> Self {
         166  +
        self.truncated = input;
         167  +
        self
         168  +
    }
         169  +
    /// <p>A boolean value indicating whether the resolved target list is truncated.</p>
         170  +
    pub fn get_truncated(&self) -> &::std::option::Option<bool> {
         171  +
        &self.truncated
         172  +
    }
         173  +
    /// Consumes the builder and constructs a [`ResolvedTargets`](crate::types::ResolvedTargets).
         174  +
    pub fn build(self) -> crate::types::ResolvedTargets {
         175  +
        crate::types::ResolvedTargets {
         176  +
            parameter_values: self.parameter_values,
         177  +
            truncated: self.truncated.unwrap_or_default(),
         178  +
        }
         179  +
    }
         180  +
}

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

@@ -0,1 +0,429 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Compliance summary information for a specific resource.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourceComplianceSummaryItem {
           7  +
    /// <p>The compliance type.</p>
           8  +
    pub compliance_type: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The resource type.</p>
          10  +
    pub resource_type: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The resource ID.</p>
          12  +
    pub resource_id: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The compliance status for the resource.</p>
          14  +
    pub status: ::std::option::Option<crate::types::ComplianceStatus>,
          15  +
    /// <p>The highest severity item found for the resource. The resource is compliant for this item.</p>
          16  +
    pub overall_severity: ::std::option::Option<crate::types::ComplianceSeverity>,
          17  +
    /// <p>Information about the execution.</p>
          18  +
    pub execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
          19  +
    /// <p>A list of items that are compliant for the resource.</p>
          20  +
    pub compliant_summary: ::std::option::Option<crate::types::CompliantSummary>,
          21  +
    /// <p>A list of items that aren't compliant for the resource.</p>
          22  +
    pub non_compliant_summary: ::std::option::Option<crate::types::NonCompliantSummary>,
          23  +
}
          24  +
impl ResourceComplianceSummaryItem {
          25  +
    /// <p>The compliance type.</p>
          26  +
    pub fn compliance_type(&self) -> ::std::option::Option<&str> {
          27  +
        self.compliance_type.as_deref()
          28  +
    }
          29  +
    /// <p>The resource type.</p>
          30  +
    pub fn resource_type(&self) -> ::std::option::Option<&str> {
          31  +
        self.resource_type.as_deref()
          32  +
    }
          33  +
    /// <p>The resource ID.</p>
          34  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          35  +
        self.resource_id.as_deref()
          36  +
    }
          37  +
    /// <p>The compliance status for the resource.</p>
          38  +
    pub fn status(&self) -> ::std::option::Option<&crate::types::ComplianceStatus> {
          39  +
        self.status.as_ref()
          40  +
    }
          41  +
    /// <p>The highest severity item found for the resource. The resource is compliant for this item.</p>
          42  +
    pub fn overall_severity(&self) -> ::std::option::Option<&crate::types::ComplianceSeverity> {
          43  +
        self.overall_severity.as_ref()
          44  +
    }
          45  +
    /// <p>Information about the execution.</p>
          46  +
    pub fn execution_summary(&self) -> ::std::option::Option<&crate::types::ComplianceExecutionSummary> {
          47  +
        self.execution_summary.as_ref()
          48  +
    }
          49  +
    /// <p>A list of items that are compliant for the resource.</p>
          50  +
    pub fn compliant_summary(&self) -> ::std::option::Option<&crate::types::CompliantSummary> {
          51  +
        self.compliant_summary.as_ref()
          52  +
    }
          53  +
    /// <p>A list of items that aren't compliant for the resource.</p>
          54  +
    pub fn non_compliant_summary(&self) -> ::std::option::Option<&crate::types::NonCompliantSummary> {
          55  +
        self.non_compliant_summary.as_ref()
          56  +
    }
          57  +
}
          58  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$ComplianceType",
          61  +
        "com.amazonaws.ssm",
          62  +
        "ResourceComplianceSummaryItem",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::String,
          65  +
    "ComplianceType",
          66  +
    0,
          67  +
);
          68  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          69  +
    ::aws_smithy_schema::ShapeId::from_parts(
          70  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$ResourceType",
          71  +
        "com.amazonaws.ssm",
          72  +
        "ResourceComplianceSummaryItem",
          73  +
    ),
          74  +
    ::aws_smithy_schema::ShapeType::String,
          75  +
    "ResourceType",
          76  +
    1,
          77  +
);
          78  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts(
          80  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$ResourceId",
          81  +
        "com.amazonaws.ssm",
          82  +
        "ResourceComplianceSummaryItem",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::String,
          85  +
    "ResourceId",
          86  +
    2,
          87  +
);
          88  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          89  +
    ::aws_smithy_schema::ShapeId::from_parts(
          90  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$Status",
          91  +
        "com.amazonaws.ssm",
          92  +
        "ResourceComplianceSummaryItem",
          93  +
    ),
          94  +
    ::aws_smithy_schema::ShapeType::String,
          95  +
    "Status",
          96  +
    3,
          97  +
);
          98  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_OVERALL_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_parts(
         100  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$OverallSeverity",
         101  +
        "com.amazonaws.ssm",
         102  +
        "ResourceComplianceSummaryItem",
         103  +
    ),
         104  +
    ::aws_smithy_schema::ShapeType::String,
         105  +
    "OverallSeverity",
         106  +
    4,
         107  +
);
         108  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_EXECUTION_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         109  +
    ::aws_smithy_schema::ShapeId::from_parts(
         110  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$ExecutionSummary",
         111  +
        "com.amazonaws.ssm",
         112  +
        "ResourceComplianceSummaryItem",
         113  +
    ),
         114  +
    ::aws_smithy_schema::ShapeType::Structure,
         115  +
    "ExecutionSummary",
         116  +
    5,
         117  +
);
         118  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANT_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         119  +
    ::aws_smithy_schema::ShapeId::from_parts(
         120  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$CompliantSummary",
         121  +
        "com.amazonaws.ssm",
         122  +
        "ResourceComplianceSummaryItem",
         123  +
    ),
         124  +
    ::aws_smithy_schema::ShapeType::Structure,
         125  +
    "CompliantSummary",
         126  +
    6,
         127  +
);
         128  +
static RESOURCECOMPLIANCESUMMARYITEM_MEMBER_NON_COMPLIANT_SUMMARY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         129  +
    ::aws_smithy_schema::ShapeId::from_parts(
         130  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem$NonCompliantSummary",
         131  +
        "com.amazonaws.ssm",
         132  +
        "ResourceComplianceSummaryItem",
         133  +
    ),
         134  +
    ::aws_smithy_schema::ShapeType::Structure,
         135  +
    "NonCompliantSummary",
         136  +
    7,
         137  +
);
         138  +
static RESOURCECOMPLIANCESUMMARYITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         139  +
    ::aws_smithy_schema::ShapeId::from_parts(
         140  +
        "com.amazonaws.ssm#ResourceComplianceSummaryItem",
         141  +
        "com.amazonaws.ssm",
         142  +
        "ResourceComplianceSummaryItem",
         143  +
    ),
         144  +
    ::aws_smithy_schema::ShapeType::Structure,
         145  +
    &[
         146  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANCE_TYPE,
         147  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_TYPE,
         148  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_ID,
         149  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_STATUS,
         150  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_OVERALL_SEVERITY,
         151  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_EXECUTION_SUMMARY,
         152  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANT_SUMMARY,
         153  +
        &RESOURCECOMPLIANCESUMMARYITEM_MEMBER_NON_COMPLIANT_SUMMARY,
         154  +
    ],
         155  +
);
         156  +
impl ResourceComplianceSummaryItem {
         157  +
    /// The schema for this shape.
         158  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCECOMPLIANCESUMMARYITEM_SCHEMA;
         159  +
}
         160  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourceComplianceSummaryItem {
         161  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         162  +
    fn serialize_members(
         163  +
        &self,
         164  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         165  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         166  +
        if let Some(ref val) = self.compliance_type {
         167  +
            ser.write_string(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANCE_TYPE, val)?;
         168  +
        }
         169  +
        if let Some(ref val) = self.resource_type {
         170  +
            ser.write_string(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_TYPE, val)?;
         171  +
        }
         172  +
        if let Some(ref val) = self.resource_id {
         173  +
            ser.write_string(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_RESOURCE_ID, val)?;
         174  +
        }
         175  +
        if let Some(ref val) = self.status {
         176  +
            ser.write_string(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_STATUS, val.as_str())?;
         177  +
        }
         178  +
        if let Some(ref val) = self.overall_severity {
         179  +
            ser.write_string(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_OVERALL_SEVERITY, val.as_str())?;
         180  +
        }
         181  +
        if let Some(ref val) = self.execution_summary {
         182  +
            ser.write_struct(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_EXECUTION_SUMMARY, val)?;
         183  +
        }
         184  +
        if let Some(ref val) = self.compliant_summary {
         185  +
            ser.write_struct(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_COMPLIANT_SUMMARY, val)?;
         186  +
        }
         187  +
        if let Some(ref val) = self.non_compliant_summary {
         188  +
            ser.write_struct(&RESOURCECOMPLIANCESUMMARYITEM_MEMBER_NON_COMPLIANT_SUMMARY, val)?;
         189  +
        }
         190  +
        Ok(())
         191  +
    }
         192  +
}
         193  +
impl ResourceComplianceSummaryItem {
         194  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         195  +
    pub fn deserialize(
         196  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         197  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         198  +
        #[allow(unused_variables, unused_mut)]
         199  +
        let mut builder = Self::builder();
         200  +
        #[allow(
         201  +
            unused_variables,
         202  +
            unreachable_code,
         203  +
            clippy::single_match,
         204  +
            clippy::match_single_binding,
         205  +
            clippy::diverging_sub_expression
         206  +
        )]
         207  +
        deserializer.read_struct(&RESOURCECOMPLIANCESUMMARYITEM_SCHEMA, &mut |member, deser| {
         208  +
            match member.member_index() {
         209  +
                Some(0) => {
         210  +
                    if deser.is_null() {
         211  +
                        deser.read_null()?;
         212  +
                    } else {
         213  +
                        builder.compliance_type = Some(deser.read_string(member)?);
         214  +
                    }
         215  +
                }
         216  +
                Some(1) => {
         217  +
                    if deser.is_null() {
         218  +
                        deser.read_null()?;
         219  +
                    } else {
         220  +
                        builder.resource_type = Some(deser.read_string(member)?);
         221  +
                    }
         222  +
                }
         223  +
                Some(2) => {
         224  +
                    if deser.is_null() {
         225  +
                        deser.read_null()?;
         226  +
                    } else {
         227  +
                        builder.resource_id = Some(deser.read_string(member)?);
         228  +
                    }
         229  +
                }
         230  +
                Some(3) => {
         231  +
                    if deser.is_null() {
         232  +
                        deser.read_null()?;
         233  +
                    } else {
         234  +
                        builder.status = Some(crate::types::ComplianceStatus::from(deser.read_string(member)?.as_str()));
         235  +
                    }
         236  +
                }
         237  +
                Some(4) => {
         238  +
                    if deser.is_null() {
         239  +
                        deser.read_null()?;
         240  +
                    } else {
         241  +
                        builder.overall_severity = Some(crate::types::ComplianceSeverity::from(deser.read_string(member)?.as_str()));
         242  +
                    }
         243  +
                }
         244  +
                Some(5) => {
         245  +
                    if deser.is_null() {
         246  +
                        deser.read_null()?;
         247  +
                    } else {
         248  +
                        builder.execution_summary = Some(crate::types::ComplianceExecutionSummary::deserialize(deser)?);
         249  +
                    }
         250  +
                }
         251  +
                Some(6) => {
         252  +
                    if deser.is_null() {
         253  +
                        deser.read_null()?;
         254  +
                    } else {
         255  +
                        builder.compliant_summary = Some(crate::types::CompliantSummary::deserialize(deser)?);
         256  +
                    }
         257  +
                }
         258  +
                Some(7) => {
         259  +
                    if deser.is_null() {
         260  +
                        deser.read_null()?;
         261  +
                    } else {
         262  +
                        builder.non_compliant_summary = Some(crate::types::NonCompliantSummary::deserialize(deser)?);
         263  +
                    }
         264  +
                }
         265  +
                _ => {}
         266  +
            }
         267  +
            Ok(())
         268  +
        })?;
         269  +
        Ok(builder.build())
         270  +
    }
         271  +
}
         272  +
impl ResourceComplianceSummaryItem {
         273  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         274  +
    pub fn deserialize_with_response(
         275  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         276  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         277  +
        _status: u16,
         278  +
        _body: &[u8],
         279  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         280  +
        Self::deserialize(deserializer)
         281  +
    }
         282  +
}
         283  +
impl ResourceComplianceSummaryItem {
         284  +
    /// Creates a new builder-style object to manufacture [`ResourceComplianceSummaryItem`](crate::types::ResourceComplianceSummaryItem).
         285  +
    pub fn builder() -> crate::types::builders::ResourceComplianceSummaryItemBuilder {
         286  +
        crate::types::builders::ResourceComplianceSummaryItemBuilder::default()
         287  +
    }
         288  +
}
         289  +
         290  +
/// A builder for [`ResourceComplianceSummaryItem`](crate::types::ResourceComplianceSummaryItem).
         291  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         292  +
#[non_exhaustive]
         293  +
pub struct ResourceComplianceSummaryItemBuilder {
         294  +
    pub(crate) compliance_type: ::std::option::Option<::std::string::String>,
         295  +
    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
         296  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         297  +
    pub(crate) status: ::std::option::Option<crate::types::ComplianceStatus>,
         298  +
    pub(crate) overall_severity: ::std::option::Option<crate::types::ComplianceSeverity>,
         299  +
    pub(crate) execution_summary: ::std::option::Option<crate::types::ComplianceExecutionSummary>,
         300  +
    pub(crate) compliant_summary: ::std::option::Option<crate::types::CompliantSummary>,
         301  +
    pub(crate) non_compliant_summary: ::std::option::Option<crate::types::NonCompliantSummary>,
         302  +
}
         303  +
impl ResourceComplianceSummaryItemBuilder {
         304  +
    /// <p>The compliance type.</p>
         305  +
    pub fn compliance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         306  +
        self.compliance_type = ::std::option::Option::Some(input.into());
         307  +
        self
         308  +
    }
         309  +
    /// <p>The compliance type.</p>
         310  +
    pub fn set_compliance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         311  +
        self.compliance_type = input;
         312  +
        self
         313  +
    }
         314  +
    /// <p>The compliance type.</p>
         315  +
    pub fn get_compliance_type(&self) -> &::std::option::Option<::std::string::String> {
         316  +
        &self.compliance_type
         317  +
    }
         318  +
    /// <p>The resource type.</p>
         319  +
    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         320  +
        self.resource_type = ::std::option::Option::Some(input.into());
         321  +
        self
         322  +
    }
         323  +
    /// <p>The resource type.</p>
         324  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         325  +
        self.resource_type = input;
         326  +
        self
         327  +
    }
         328  +
    /// <p>The resource type.</p>
         329  +
    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
         330  +
        &self.resource_type
         331  +
    }
         332  +
    /// <p>The resource ID.</p>
         333  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         334  +
        self.resource_id = ::std::option::Option::Some(input.into());
         335  +
        self
         336  +
    }
         337  +
    /// <p>The resource ID.</p>
         338  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         339  +
        self.resource_id = input;
         340  +
        self
         341  +
    }
         342  +
    /// <p>The resource ID.</p>
         343  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         344  +
        &self.resource_id
         345  +
    }
         346  +
    /// <p>The compliance status for the resource.</p>
         347  +
    pub fn status(mut self, input: crate::types::ComplianceStatus) -> Self {
         348  +
        self.status = ::std::option::Option::Some(input);
         349  +
        self
         350  +
    }
         351  +
    /// <p>The compliance status for the resource.</p>
         352  +
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ComplianceStatus>) -> Self {
         353  +
        self.status = input;
         354  +
        self
         355  +
    }
         356  +
    /// <p>The compliance status for the resource.</p>
         357  +
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ComplianceStatus> {
         358  +
        &self.status
         359  +
    }
         360  +
    /// <p>The highest severity item found for the resource. The resource is compliant for this item.</p>
         361  +
    pub fn overall_severity(mut self, input: crate::types::ComplianceSeverity) -> Self {
         362  +
        self.overall_severity = ::std::option::Option::Some(input);
         363  +
        self
         364  +
    }
         365  +
    /// <p>The highest severity item found for the resource. The resource is compliant for this item.</p>
         366  +
    pub fn set_overall_severity(mut self, input: ::std::option::Option<crate::types::ComplianceSeverity>) -> Self {
         367  +
        self.overall_severity = input;
         368  +
        self
         369  +
    }
         370  +
    /// <p>The highest severity item found for the resource. The resource is compliant for this item.</p>
         371  +
    pub fn get_overall_severity(&self) -> &::std::option::Option<crate::types::ComplianceSeverity> {
         372  +
        &self.overall_severity
         373  +
    }
         374  +
    /// <p>Information about the execution.</p>
         375  +
    pub fn execution_summary(mut self, input: crate::types::ComplianceExecutionSummary) -> Self {
         376  +
        self.execution_summary = ::std::option::Option::Some(input);
         377  +
        self
         378  +
    }
         379  +
    /// <p>Information about the execution.</p>
         380  +
    pub fn set_execution_summary(mut self, input: ::std::option::Option<crate::types::ComplianceExecutionSummary>) -> Self {
         381  +
        self.execution_summary = input;
         382  +
        self
         383  +
    }
         384  +
    /// <p>Information about the execution.</p>
         385  +
    pub fn get_execution_summary(&self) -> &::std::option::Option<crate::types::ComplianceExecutionSummary> {
         386  +
        &self.execution_summary
         387  +
    }
         388  +
    /// <p>A list of items that are compliant for the resource.</p>
         389  +
    pub fn compliant_summary(mut self, input: crate::types::CompliantSummary) -> Self {
         390  +
        self.compliant_summary = ::std::option::Option::Some(input);
         391  +
        self
         392  +
    }
         393  +
    /// <p>A list of items that are compliant for the resource.</p>
         394  +
    pub fn set_compliant_summary(mut self, input: ::std::option::Option<crate::types::CompliantSummary>) -> Self {
         395  +
        self.compliant_summary = input;
         396  +
        self
         397  +
    }
         398  +
    /// <p>A list of items that are compliant for the resource.</p>
         399  +
    pub fn get_compliant_summary(&self) -> &::std::option::Option<crate::types::CompliantSummary> {
         400  +
        &self.compliant_summary
         401  +
    }
         402  +
    /// <p>A list of items that aren't compliant for the resource.</p>
         403  +
    pub fn non_compliant_summary(mut self, input: crate::types::NonCompliantSummary) -> Self {
         404  +
        self.non_compliant_summary = ::std::option::Option::Some(input);
         405  +
        self
         406  +
    }
         407  +
    /// <p>A list of items that aren't compliant for the resource.</p>
         408  +
    pub fn set_non_compliant_summary(mut self, input: ::std::option::Option<crate::types::NonCompliantSummary>) -> Self {
         409  +
        self.non_compliant_summary = input;
         410  +
        self
         411  +
    }
         412  +
    /// <p>A list of items that aren't compliant for the resource.</p>
         413  +
    pub fn get_non_compliant_summary(&self) -> &::std::option::Option<crate::types::NonCompliantSummary> {
         414  +
        &self.non_compliant_summary
         415  +
    }
         416  +
    /// Consumes the builder and constructs a [`ResourceComplianceSummaryItem`](crate::types::ResourceComplianceSummaryItem).
         417  +
    pub fn build(self) -> crate::types::ResourceComplianceSummaryItem {
         418  +
        crate::types::ResourceComplianceSummaryItem {
         419  +
            compliance_type: self.compliance_type,
         420  +
            resource_type: self.resource_type,
         421  +
            resource_id: self.resource_id,
         422  +
            status: self.status,
         423  +
            overall_severity: self.overall_severity,
         424  +
            execution_summary: self.execution_summary,
         425  +
            compliant_summary: self.compliant_summary,
         426  +
            non_compliant_summary: self.non_compliant_summary,
         427  +
        }
         428  +
    }
         429  +
}

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

@@ -0,1 +0,220 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the <code>AwsOrganizationsSource</code> resource data sync source. A sync source of this type can synchronize data from Organizations or, if an Amazon Web Services organization isn't present, from multiple Amazon Web Services Regions.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourceDataSyncAwsOrganizationsSource {
           7  +
    /// <p>If an Amazon Web Services organization is present, this is either <code>OrganizationalUnits</code> or <code>EntireOrganization</code>. For <code>OrganizationalUnits</code>, the data is aggregated from a set of organization units. For <code>EntireOrganization</code>, the data is aggregated from the entire Amazon Web Services organization.</p>
           8  +
    pub organization_source_type: ::std::string::String,
           9  +
    /// <p>The Organizations organization units included in the sync.</p>
          10  +
    pub organizational_units: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDataSyncOrganizationalUnit>>,
          11  +
}
          12  +
impl ResourceDataSyncAwsOrganizationsSource {
          13  +
    /// <p>If an Amazon Web Services organization is present, this is either <code>OrganizationalUnits</code> or <code>EntireOrganization</code>. For <code>OrganizationalUnits</code>, the data is aggregated from a set of organization units. For <code>EntireOrganization</code>, the data is aggregated from the entire Amazon Web Services organization.</p>
          14  +
    pub fn organization_source_type(&self) -> &str {
          15  +
        use std::ops::Deref;
          16  +
        self.organization_source_type.deref()
          17  +
    }
          18  +
    /// <p>The Organizations organization units included in the sync.</p>
          19  +
    ///
          20  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.organizational_units.is_none()`.
          21  +
    pub fn organizational_units(&self) -> &[crate::types::ResourceDataSyncOrganizationalUnit] {
          22  +
        self.organizational_units.as_deref().unwrap_or_default()
          23  +
    }
          24  +
}
          25  +
static RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATION_SOURCE_TYPE: ::aws_smithy_schema::Schema<'static> =
          26  +
    ::aws_smithy_schema::Schema::new_member(
          27  +
        ::aws_smithy_schema::ShapeId::from_parts(
          28  +
            "com.amazonaws.ssm#ResourceDataSyncAwsOrganizationsSource$OrganizationSourceType",
          29  +
            "com.amazonaws.ssm",
          30  +
            "ResourceDataSyncAwsOrganizationsSource",
          31  +
        ),
          32  +
        ::aws_smithy_schema::ShapeType::String,
          33  +
        "OrganizationSourceType",
          34  +
        0,
          35  +
    );
          36  +
static RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATIONAL_UNITS_MEMBER: ::aws_smithy_schema::Schema<'static> =
          37  +
    ::aws_smithy_schema::Schema::new_member(
          38  +
        ::aws_smithy_schema::ShapeId::from_parts(
          39  +
            "com.amazonaws.ssm#ResourceDataSyncOrganizationalUnitList$member",
          40  +
            "com.amazonaws.ssm",
          41  +
            "ResourceDataSyncOrganizationalUnitList",
          42  +
        ),
          43  +
        ::aws_smithy_schema::ShapeType::Structure,
          44  +
        "member",
          45  +
        0,
          46  +
    );
          47  +
static RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATIONAL_UNITS: ::aws_smithy_schema::Schema<'static> =
          48  +
    ::aws_smithy_schema::Schema::new_member(
          49  +
        ::aws_smithy_schema::ShapeId::from_parts(
          50  +
            "com.amazonaws.ssm#ResourceDataSyncAwsOrganizationsSource$OrganizationalUnits",
          51  +
            "com.amazonaws.ssm",
          52  +
            "ResourceDataSyncAwsOrganizationsSource",
          53  +
        ),
          54  +
        ::aws_smithy_schema::ShapeType::List,
          55  +
        "OrganizationalUnits",
          56  +
        1,
          57  +
    )
          58  +
    .with_list_member(&RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATIONAL_UNITS_MEMBER);
          59  +
static RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          60  +
    ::aws_smithy_schema::ShapeId::from_parts(
          61  +
        "com.amazonaws.ssm#ResourceDataSyncAwsOrganizationsSource",
          62  +
        "com.amazonaws.ssm",
          63  +
        "ResourceDataSyncAwsOrganizationsSource",
          64  +
    ),
          65  +
    ::aws_smithy_schema::ShapeType::Structure,
          66  +
    &[
          67  +
        &RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATION_SOURCE_TYPE,
          68  +
        &RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATIONAL_UNITS,
          69  +
    ],
          70  +
);
          71  +
impl ResourceDataSyncAwsOrganizationsSource {
          72  +
    /// The schema for this shape.
          73  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_SCHEMA;
          74  +
}
          75  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourceDataSyncAwsOrganizationsSource {
          76  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          77  +
    fn serialize_members(
          78  +
        &self,
          79  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          80  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          81  +
        {
          82  +
            let val = &self.organization_source_type;
          83  +
            ser.write_string(&RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATION_SOURCE_TYPE, val)?;
          84  +
        }
          85  +
        if let Some(ref val) = self.organizational_units {
          86  +
            ser.write_list(
          87  +
                &RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_MEMBER_ORGANIZATIONAL_UNITS,
          88  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          89  +
                    for item in val {
          90  +
                        ser.write_struct(crate::types::ResourceDataSyncOrganizationalUnit::SCHEMA, item)?;
          91  +
                    }
          92  +
                    Ok(())
          93  +
                },
          94  +
            )?;
          95  +
        }
          96  +
        Ok(())
          97  +
    }
          98  +
}
          99  +
impl ResourceDataSyncAwsOrganizationsSource {
         100  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         101  +
    pub fn deserialize(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         103  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         104  +
        #[allow(unused_variables, unused_mut)]
         105  +
        let mut builder = Self::builder();
         106  +
        #[allow(
         107  +
            unused_variables,
         108  +
            unreachable_code,
         109  +
            clippy::single_match,
         110  +
            clippy::match_single_binding,
         111  +
            clippy::diverging_sub_expression
         112  +
        )]
         113  +
        deserializer.read_struct(&RESOURCEDATASYNCAWSORGANIZATIONSSOURCE_SCHEMA, &mut |member, deser| {
         114  +
            match member.member_index() {
         115  +
                Some(0) => {
         116  +
                    builder.organization_source_type = Some(deser.read_string(member)?);
         117  +
                }
         118  +
                Some(1) => {
         119  +
                    if deser.is_null() {
         120  +
                        deser.read_null()?;
         121  +
                    } else {
         122  +
                        builder.organizational_units = Some({
         123  +
                            let mut container = Vec::new();
         124  +
                            deser.read_list(member, &mut |deser| {
         125  +
                                container.push(crate::types::ResourceDataSyncOrganizationalUnit::deserialize(deser)?);
         126  +
                                Ok(())
         127  +
                            })?;
         128  +
                            container
         129  +
                        });
         130  +
                    }
         131  +
                }
         132  +
                _ => {}
         133  +
            }
         134  +
            Ok(())
         135  +
        })?;
         136  +
        builder.organization_source_type = builder.organization_source_type.or(Some(String::new()));
         137  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         138  +
    }
         139  +
}
         140  +
impl ResourceDataSyncAwsOrganizationsSource {
         141  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         142  +
    pub fn deserialize_with_response(
         143  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         144  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         145  +
        _status: u16,
         146  +
        _body: &[u8],
         147  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         148  +
        Self::deserialize(deserializer)
         149  +
    }
         150  +
}
         151  +
impl ResourceDataSyncAwsOrganizationsSource {
         152  +
    /// Creates a new builder-style object to manufacture [`ResourceDataSyncAwsOrganizationsSource`](crate::types::ResourceDataSyncAwsOrganizationsSource).
         153  +
    pub fn builder() -> crate::types::builders::ResourceDataSyncAwsOrganizationsSourceBuilder {
         154  +
        crate::types::builders::ResourceDataSyncAwsOrganizationsSourceBuilder::default()
         155  +
    }
         156  +
}
         157  +
         158  +
/// A builder for [`ResourceDataSyncAwsOrganizationsSource`](crate::types::ResourceDataSyncAwsOrganizationsSource).
         159  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         160  +
#[non_exhaustive]
         161  +
pub struct ResourceDataSyncAwsOrganizationsSourceBuilder {
         162  +
    pub(crate) organization_source_type: ::std::option::Option<::std::string::String>,
         163  +
    pub(crate) organizational_units: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDataSyncOrganizationalUnit>>,
         164  +
}
         165  +
impl ResourceDataSyncAwsOrganizationsSourceBuilder {
         166  +
    /// <p>If an Amazon Web Services organization is present, this is either <code>OrganizationalUnits</code> or <code>EntireOrganization</code>. For <code>OrganizationalUnits</code>, the data is aggregated from a set of organization units. For <code>EntireOrganization</code>, the data is aggregated from the entire Amazon Web Services organization.</p>
         167  +
    /// This field is required.
         168  +
    pub fn organization_source_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         169  +
        self.organization_source_type = ::std::option::Option::Some(input.into());
         170  +
        self
         171  +
    }
         172  +
    /// <p>If an Amazon Web Services organization is present, this is either <code>OrganizationalUnits</code> or <code>EntireOrganization</code>. For <code>OrganizationalUnits</code>, the data is aggregated from a set of organization units. For <code>EntireOrganization</code>, the data is aggregated from the entire Amazon Web Services organization.</p>
         173  +
    pub fn set_organization_source_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         174  +
        self.organization_source_type = input;
         175  +
        self
         176  +
    }
         177  +
    /// <p>If an Amazon Web Services organization is present, this is either <code>OrganizationalUnits</code> or <code>EntireOrganization</code>. For <code>OrganizationalUnits</code>, the data is aggregated from a set of organization units. For <code>EntireOrganization</code>, the data is aggregated from the entire Amazon Web Services organization.</p>
         178  +
    pub fn get_organization_source_type(&self) -> &::std::option::Option<::std::string::String> {
         179  +
        &self.organization_source_type
         180  +
    }
         181  +
    /// Appends an item to `organizational_units`.
         182  +
    ///
         183  +
    /// To override the contents of this collection use [`set_organizational_units`](Self::set_organizational_units).
         184  +
    ///
         185  +
    /// <p>The Organizations organization units included in the sync.</p>
         186  +
    pub fn organizational_units(mut self, input: crate::types::ResourceDataSyncOrganizationalUnit) -> Self {
         187  +
        let mut v = self.organizational_units.unwrap_or_default();
         188  +
        v.push(input);
         189  +
        self.organizational_units = ::std::option::Option::Some(v);
         190  +
        self
         191  +
    }
         192  +
    /// <p>The Organizations organization units included in the sync.</p>
         193  +
    pub fn set_organizational_units(
         194  +
        mut self,
         195  +
        input: ::std::option::Option<::std::vec::Vec<crate::types::ResourceDataSyncOrganizationalUnit>>,
         196  +
    ) -> Self {
         197  +
        self.organizational_units = input;
         198  +
        self
         199  +
    }
         200  +
    /// <p>The Organizations organization units included in the sync.</p>
         201  +
    pub fn get_organizational_units(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourceDataSyncOrganizationalUnit>> {
         202  +
        &self.organizational_units
         203  +
    }
         204  +
    /// Consumes the builder and constructs a [`ResourceDataSyncAwsOrganizationsSource`](crate::types::ResourceDataSyncAwsOrganizationsSource).
         205  +
    /// This method will fail if any of the following fields are not set:
         206  +
    /// - [`organization_source_type`](crate::types::builders::ResourceDataSyncAwsOrganizationsSourceBuilder::organization_source_type)
         207  +
    pub fn build(
         208  +
        self,
         209  +
    ) -> ::std::result::Result<crate::types::ResourceDataSyncAwsOrganizationsSource, ::aws_smithy_types::error::operation::BuildError> {
         210  +
        ::std::result::Result::Ok(crate::types::ResourceDataSyncAwsOrganizationsSource {
         211  +
            organization_source_type: self.organization_source_type.ok_or_else(|| {
         212  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         213  +
                    "organization_source_type",
         214  +
                    "organization_source_type was not specified but it is required when building ResourceDataSyncAwsOrganizationsSource",
         215  +
                )
         216  +
            })?,
         217  +
            organizational_units: self.organizational_units,
         218  +
        })
         219  +
    }
         220  +
}

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

@@ -0,1 +0,127 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Synchronize Amazon Web Services Systems Manager Inventory data from multiple Amazon Web Services accounts defined in Organizations to a centralized Amazon S3 bucket. Data is synchronized to individual key prefixes in the central bucket. Each key prefix represents a different Amazon Web Services account ID.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourceDataSyncDestinationDataSharing {
           7  +
    /// <p>The sharing data type. Only <code>Organization</code> is supported.</p>
           8  +
    pub destination_data_sharing_type: ::std::option::Option<::std::string::String>,
           9  +
}
          10  +
impl ResourceDataSyncDestinationDataSharing {
          11  +
    /// <p>The sharing data type. Only <code>Organization</code> is supported.</p>
          12  +
    pub fn destination_data_sharing_type(&self) -> ::std::option::Option<&str> {
          13  +
        self.destination_data_sharing_type.as_deref()
          14  +
    }
          15  +
}
          16  +
static RESOURCEDATASYNCDESTINATIONDATASHARING_MEMBER_DESTINATION_DATA_SHARING_TYPE: ::aws_smithy_schema::Schema<'static> =
          17  +
    ::aws_smithy_schema::Schema::new_member(
          18  +
        ::aws_smithy_schema::ShapeId::from_parts(
          19  +
            "com.amazonaws.ssm#ResourceDataSyncDestinationDataSharing$DestinationDataSharingType",
          20  +
            "com.amazonaws.ssm",
          21  +
            "ResourceDataSyncDestinationDataSharing",
          22  +
        ),
          23  +
        ::aws_smithy_schema::ShapeType::String,
          24  +
        "DestinationDataSharingType",
          25  +
        0,
          26  +
    );
          27  +
static RESOURCEDATASYNCDESTINATIONDATASHARING_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts(
          29  +
        "com.amazonaws.ssm#ResourceDataSyncDestinationDataSharing",
          30  +
        "com.amazonaws.ssm",
          31  +
        "ResourceDataSyncDestinationDataSharing",
          32  +
    ),
          33  +
    ::aws_smithy_schema::ShapeType::Structure,
          34  +
    &[&RESOURCEDATASYNCDESTINATIONDATASHARING_MEMBER_DESTINATION_DATA_SHARING_TYPE],
          35  +
);
          36  +
impl ResourceDataSyncDestinationDataSharing {
          37  +
    /// The schema for this shape.
          38  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEDATASYNCDESTINATIONDATASHARING_SCHEMA;
          39  +
}
          40  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourceDataSyncDestinationDataSharing {
          41  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          42  +
    fn serialize_members(
          43  +
        &self,
          44  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          45  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          46  +
        if let Some(ref val) = self.destination_data_sharing_type {
          47  +
            ser.write_string(&RESOURCEDATASYNCDESTINATIONDATASHARING_MEMBER_DESTINATION_DATA_SHARING_TYPE, val)?;
          48  +
        }
          49  +
        Ok(())
          50  +
    }
          51  +
}
          52  +
impl ResourceDataSyncDestinationDataSharing {
          53  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          56  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          57  +
        #[allow(unused_variables, unused_mut)]
          58  +
        let mut builder = Self::builder();
          59  +
        #[allow(
          60  +
            unused_variables,
          61  +
            unreachable_code,
          62  +
            clippy::single_match,
          63  +
            clippy::match_single_binding,
          64  +
            clippy::diverging_sub_expression
          65  +
        )]
          66  +
        deserializer.read_struct(&RESOURCEDATASYNCDESTINATIONDATASHARING_SCHEMA, &mut |member, deser| {
          67  +
            match member.member_index() {
          68  +
                Some(0) => {
          69  +
                    if deser.is_null() {
          70  +
                        deser.read_null()?;
          71  +
                    } else {
          72  +
                        builder.destination_data_sharing_type = Some(deser.read_string(member)?);
          73  +
                    }
          74  +
                }
          75  +
                _ => {}
          76  +
            }
          77  +
            Ok(())
          78  +
        })?;
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
          82  +
impl ResourceDataSyncDestinationDataSharing {
          83  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          84  +
    pub fn deserialize_with_response(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          87  +
        _status: u16,
          88  +
        _body: &[u8],
          89  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          90  +
        Self::deserialize(deserializer)
          91  +
    }
          92  +
}
          93  +
impl ResourceDataSyncDestinationDataSharing {
          94  +
    /// Creates a new builder-style object to manufacture [`ResourceDataSyncDestinationDataSharing`](crate::types::ResourceDataSyncDestinationDataSharing).
          95  +
    pub fn builder() -> crate::types::builders::ResourceDataSyncDestinationDataSharingBuilder {
          96  +
        crate::types::builders::ResourceDataSyncDestinationDataSharingBuilder::default()
          97  +
    }
          98  +
}
          99  +
         100  +
/// A builder for [`ResourceDataSyncDestinationDataSharing`](crate::types::ResourceDataSyncDestinationDataSharing).
         101  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         102  +
#[non_exhaustive]
         103  +
pub struct ResourceDataSyncDestinationDataSharingBuilder {
         104  +
    pub(crate) destination_data_sharing_type: ::std::option::Option<::std::string::String>,
         105  +
}
         106  +
impl ResourceDataSyncDestinationDataSharingBuilder {
         107  +
    /// <p>The sharing data type. Only <code>Organization</code> is supported.</p>
         108  +
    pub fn destination_data_sharing_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         109  +
        self.destination_data_sharing_type = ::std::option::Option::Some(input.into());
         110  +
        self
         111  +
    }
         112  +
    /// <p>The sharing data type. Only <code>Organization</code> is supported.</p>
         113  +
    pub fn set_destination_data_sharing_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         114  +
        self.destination_data_sharing_type = input;
         115  +
        self
         116  +
    }
         117  +
    /// <p>The sharing data type. Only <code>Organization</code> is supported.</p>
         118  +
    pub fn get_destination_data_sharing_type(&self) -> &::std::option::Option<::std::string::String> {
         119  +
        &self.destination_data_sharing_type
         120  +
    }
         121  +
    /// Consumes the builder and constructs a [`ResourceDataSyncDestinationDataSharing`](crate::types::ResourceDataSyncDestinationDataSharing).
         122  +
    pub fn build(self) -> crate::types::ResourceDataSyncDestinationDataSharing {
         123  +
        crate::types::ResourceDataSyncDestinationDataSharing {
         124  +
            destination_data_sharing_type: self.destination_data_sharing_type,
         125  +
        }
         126  +
    }
         127  +
}

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

@@ -0,1 +0,511 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about a resource data sync configuration, including its current status and last successful sync.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct ResourceDataSyncItem {
           7  +
    /// <p>The name of the resource data sync.</p>
           8  +
    pub sync_name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The type of resource data sync. If <code>SyncType</code> is <code>SyncToDestination</code>, then the resource data sync synchronizes data to an S3 bucket. If the <code>SyncType</code> is <code>SyncFromSource</code> then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions.</p>
          10  +
    pub sync_type: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>Information about the source where the data was synchronized.</p>
          12  +
    pub sync_source: ::std::option::Option<crate::types::ResourceDataSyncSourceWithState>,
          13  +
    /// <p>Configuration information for the target S3 bucket.</p>
          14  +
    pub s3_destination: ::std::option::Option<crate::types::ResourceDataSyncS3Destination>,
          15  +
    /// <p>The last time the configuration attempted to sync (UTC).</p>
          16  +
    pub last_sync_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          17  +
    /// <p>The last time the sync operations returned a status of <code>SUCCESSFUL</code> (UTC).</p>
          18  +
    pub last_successful_sync_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          19  +
    /// <p>The date and time the resource data sync was changed.</p>
          20  +
    pub sync_last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /// <p>The status reported by the last sync.</p>
          22  +
    pub last_status: ::std::option::Option<crate::types::LastResourceDataSyncStatus>,
          23  +
    /// <p>The date and time the configuration was created (UTC).</p>
          24  +
    pub sync_created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          25  +
    /// <p>The status message details reported by the last sync.</p>
          26  +
    pub last_sync_status_message: ::std::option::Option<::std::string::String>,
          27  +
}
          28  +
impl ResourceDataSyncItem {
          29  +
    /// <p>The name of the resource data sync.</p>
          30  +
    pub fn sync_name(&self) -> ::std::option::Option<&str> {
          31  +
        self.sync_name.as_deref()
          32  +
    }
          33  +
    /// <p>The type of resource data sync. If <code>SyncType</code> is <code>SyncToDestination</code>, then the resource data sync synchronizes data to an S3 bucket. If the <code>SyncType</code> is <code>SyncFromSource</code> then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions.</p>
          34  +
    pub fn sync_type(&self) -> ::std::option::Option<&str> {
          35  +
        self.sync_type.as_deref()
          36  +
    }
          37  +
    /// <p>Information about the source where the data was synchronized.</p>
          38  +
    pub fn sync_source(&self) -> ::std::option::Option<&crate::types::ResourceDataSyncSourceWithState> {
          39  +
        self.sync_source.as_ref()
          40  +
    }
          41  +
    /// <p>Configuration information for the target S3 bucket.</p>
          42  +
    pub fn s3_destination(&self) -> ::std::option::Option<&crate::types::ResourceDataSyncS3Destination> {
          43  +
        self.s3_destination.as_ref()
          44  +
    }
          45  +
    /// <p>The last time the configuration attempted to sync (UTC).</p>
          46  +
    pub fn last_sync_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          47  +
        self.last_sync_time.as_ref()
          48  +
    }
          49  +
    /// <p>The last time the sync operations returned a status of <code>SUCCESSFUL</code> (UTC).</p>
          50  +
    pub fn last_successful_sync_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          51  +
        self.last_successful_sync_time.as_ref()
          52  +
    }
          53  +
    /// <p>The date and time the resource data sync was changed.</p>
          54  +
    pub fn sync_last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          55  +
        self.sync_last_modified_time.as_ref()
          56  +
    }
          57  +
    /// <p>The status reported by the last sync.</p>
          58  +
    pub fn last_status(&self) -> ::std::option::Option<&crate::types::LastResourceDataSyncStatus> {
          59  +
        self.last_status.as_ref()
          60  +
    }
          61  +
    /// <p>The date and time the configuration was created (UTC).</p>
          62  +
    pub fn sync_created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          63  +
        self.sync_created_time.as_ref()
          64  +
    }
          65  +
    /// <p>The status message details reported by the last sync.</p>
          66  +
    pub fn last_sync_status_message(&self) -> ::std::option::Option<&str> {
          67  +
        self.last_sync_status_message.as_deref()
          68  +
    }
          69  +
}
          70  +
static RESOURCEDATASYNCITEM_MEMBER_SYNC_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          71  +
    ::aws_smithy_schema::ShapeId::from_parts(
          72  +
        "com.amazonaws.ssm#ResourceDataSyncItem$SyncName",
          73  +
        "com.amazonaws.ssm",
          74  +
        "ResourceDataSyncItem",
          75  +
    ),
          76  +
    ::aws_smithy_schema::ShapeType::String,
          77  +
    "SyncName",
          78  +
    0,
          79  +
);
          80  +
static RESOURCEDATASYNCITEM_MEMBER_SYNC_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_parts(
          82  +
        "com.amazonaws.ssm#ResourceDataSyncItem$SyncType",
          83  +
        "com.amazonaws.ssm",
          84  +
        "ResourceDataSyncItem",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::String,
          87  +
    "SyncType",
          88  +
    1,
          89  +
);
          90  +
static RESOURCEDATASYNCITEM_MEMBER_SYNC_SOURCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          91  +
    ::aws_smithy_schema::ShapeId::from_parts(
          92  +
        "com.amazonaws.ssm#ResourceDataSyncItem$SyncSource",
          93  +
        "com.amazonaws.ssm",
          94  +
        "ResourceDataSyncItem",
          95  +
    ),
          96  +
    ::aws_smithy_schema::ShapeType::Structure,
          97  +
    "SyncSource",
          98  +
    2,
          99  +
);
         100  +
static RESOURCEDATASYNCITEM_MEMBER_S3_DESTINATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         101  +
    ::aws_smithy_schema::ShapeId::from_parts(
         102  +
        "com.amazonaws.ssm#ResourceDataSyncItem$S3Destination",
         103  +
        "com.amazonaws.ssm",
         104  +
        "ResourceDataSyncItem",
         105  +
    ),
         106  +
    ::aws_smithy_schema::ShapeType::Structure,
         107  +
    "S3Destination",
         108  +
    3,
         109  +
);
         110  +
static RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         111  +
    ::aws_smithy_schema::ShapeId::from_parts(
         112  +
        "com.amazonaws.ssm#ResourceDataSyncItem$LastSyncTime",
         113  +
        "com.amazonaws.ssm",
         114  +
        "ResourceDataSyncItem",
         115  +
    ),
         116  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         117  +
    "LastSyncTime",
         118  +
    4,
         119  +
);
         120  +
static RESOURCEDATASYNCITEM_MEMBER_LAST_SUCCESSFUL_SYNC_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts(
         122  +
        "com.amazonaws.ssm#ResourceDataSyncItem$LastSuccessfulSyncTime",
         123  +
        "com.amazonaws.ssm",
         124  +
        "ResourceDataSyncItem",
         125  +
    ),
         126  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         127  +
    "LastSuccessfulSyncTime",
         128  +
    5,
         129  +
);
         130  +
static RESOURCEDATASYNCITEM_MEMBER_SYNC_LAST_MODIFIED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_parts(
         132  +
        "com.amazonaws.ssm#ResourceDataSyncItem$SyncLastModifiedTime",
         133  +
        "com.amazonaws.ssm",
         134  +
        "ResourceDataSyncItem",
         135  +
    ),
         136  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         137  +
    "SyncLastModifiedTime",
         138  +
    6,
         139  +
);
         140  +
static RESOURCEDATASYNCITEM_MEMBER_LAST_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         141  +
    ::aws_smithy_schema::ShapeId::from_parts(
         142  +
        "com.amazonaws.ssm#ResourceDataSyncItem$LastStatus",
         143  +
        "com.amazonaws.ssm",
         144  +
        "ResourceDataSyncItem",
         145  +
    ),
         146  +
    ::aws_smithy_schema::ShapeType::String,
         147  +
    "LastStatus",
         148  +
    7,
         149  +
);
         150  +
static RESOURCEDATASYNCITEM_MEMBER_SYNC_CREATED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         151  +
    ::aws_smithy_schema::ShapeId::from_parts(
         152  +
        "com.amazonaws.ssm#ResourceDataSyncItem$SyncCreatedTime",
         153  +
        "com.amazonaws.ssm",
         154  +
        "ResourceDataSyncItem",
         155  +
    ),
         156  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         157  +
    "SyncCreatedTime",
         158  +
    8,
         159  +
);
         160  +
static RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_STATUS_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         161  +
    ::aws_smithy_schema::ShapeId::from_parts(
         162  +
        "com.amazonaws.ssm#ResourceDataSyncItem$LastSyncStatusMessage",
         163  +
        "com.amazonaws.ssm",
         164  +
        "ResourceDataSyncItem",
         165  +
    ),
         166  +
    ::aws_smithy_schema::ShapeType::String,
         167  +
    "LastSyncStatusMessage",
         168  +
    9,
         169  +
);
         170  +
static RESOURCEDATASYNCITEM_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         171  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ResourceDataSyncItem", "com.amazonaws.ssm", "ResourceDataSyncItem"),
         172  +
    ::aws_smithy_schema::ShapeType::Structure,
         173  +
    &[
         174  +
        &RESOURCEDATASYNCITEM_MEMBER_SYNC_NAME,
         175  +
        &RESOURCEDATASYNCITEM_MEMBER_SYNC_TYPE,
         176  +
        &RESOURCEDATASYNCITEM_MEMBER_SYNC_SOURCE,
         177  +
        &RESOURCEDATASYNCITEM_MEMBER_S3_DESTINATION,
         178  +
        &RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_TIME,
         179  +
        &RESOURCEDATASYNCITEM_MEMBER_LAST_SUCCESSFUL_SYNC_TIME,
         180  +
        &RESOURCEDATASYNCITEM_MEMBER_SYNC_LAST_MODIFIED_TIME,
         181  +
        &RESOURCEDATASYNCITEM_MEMBER_LAST_STATUS,
         182  +
        &RESOURCEDATASYNCITEM_MEMBER_SYNC_CREATED_TIME,
         183  +
        &RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_STATUS_MESSAGE,
         184  +
    ],
         185  +
);
         186  +
impl ResourceDataSyncItem {
         187  +
    /// The schema for this shape.
         188  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEDATASYNCITEM_SCHEMA;
         189  +
}
         190  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResourceDataSyncItem {
         191  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         192  +
    fn serialize_members(
         193  +
        &self,
         194  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         195  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         196  +
        if let Some(ref val) = self.sync_name {
         197  +
            ser.write_string(&RESOURCEDATASYNCITEM_MEMBER_SYNC_NAME, val)?;
         198  +
        }
         199  +
        if let Some(ref val) = self.sync_type {
         200  +
            ser.write_string(&RESOURCEDATASYNCITEM_MEMBER_SYNC_TYPE, val)?;
         201  +
        }
         202  +
        if let Some(ref val) = self.sync_source {
         203  +
            ser.write_struct(&RESOURCEDATASYNCITEM_MEMBER_SYNC_SOURCE, val)?;
         204  +
        }
         205  +
        if let Some(ref val) = self.s3_destination {
         206  +
            ser.write_struct(&RESOURCEDATASYNCITEM_MEMBER_S3_DESTINATION, val)?;
         207  +
        }
         208  +
        if let Some(ref val) = self.last_sync_time {
         209  +
            ser.write_timestamp(&RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_TIME, val)?;
         210  +
        }
         211  +
        if let Some(ref val) = self.last_successful_sync_time {
         212  +
            ser.write_timestamp(&RESOURCEDATASYNCITEM_MEMBER_LAST_SUCCESSFUL_SYNC_TIME, val)?;
         213  +
        }
         214  +
        if let Some(ref val) = self.sync_last_modified_time {
         215  +
            ser.write_timestamp(&RESOURCEDATASYNCITEM_MEMBER_SYNC_LAST_MODIFIED_TIME, val)?;
         216  +
        }
         217  +
        if let Some(ref val) = self.last_status {
         218  +
            ser.write_string(&RESOURCEDATASYNCITEM_MEMBER_LAST_STATUS, val.as_str())?;
         219  +
        }
         220  +
        if let Some(ref val) = self.sync_created_time {
         221  +
            ser.write_timestamp(&RESOURCEDATASYNCITEM_MEMBER_SYNC_CREATED_TIME, val)?;
         222  +
        }
         223  +
        if let Some(ref val) = self.last_sync_status_message {
         224  +
            ser.write_string(&RESOURCEDATASYNCITEM_MEMBER_LAST_SYNC_STATUS_MESSAGE, val)?;
         225  +
        }
         226  +
        Ok(())
         227  +
    }
         228  +
}
         229  +
impl ResourceDataSyncItem {
         230  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         231  +
    pub fn deserialize(
         232  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         233  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         234  +
        #[allow(unused_variables, unused_mut)]
         235  +
        let mut builder = Self::builder();
         236  +
        #[allow(
         237  +
            unused_variables,
         238  +
            unreachable_code,
         239  +
            clippy::single_match,
         240  +
            clippy::match_single_binding,
         241  +
            clippy::diverging_sub_expression
         242  +
        )]
         243  +
        deserializer.read_struct(&RESOURCEDATASYNCITEM_SCHEMA, &mut |member, deser| {
         244  +
            match member.member_index() {
         245  +
                Some(0) => {
         246  +
                    if deser.is_null() {
         247  +
                        deser.read_null()?;
         248  +
                    } else {
         249  +
                        builder.sync_name = Some(deser.read_string(member)?);
         250  +
                    }
         251  +
                }
         252  +
                Some(1) => {
         253  +
                    if deser.is_null() {
         254  +
                        deser.read_null()?;
         255  +
                    } else {
         256  +
                        builder.sync_type = Some(deser.read_string(member)?);
         257  +
                    }
         258  +
                }
         259  +
                Some(2) => {
         260  +
                    if deser.is_null() {
         261  +
                        deser.read_null()?;
         262  +
                    } else {
         263  +
                        builder.sync_source = Some(crate::types::ResourceDataSyncSourceWithState::deserialize(deser)?);
         264  +
                    }
         265  +
                }
         266  +
                Some(3) => {
         267  +
                    if deser.is_null() {
         268  +
                        deser.read_null()?;
         269  +
                    } else {
         270  +
                        builder.s3_destination = Some(crate::types::ResourceDataSyncS3Destination::deserialize(deser)?);
         271  +
                    }
         272  +
                }
         273  +
                Some(4) => {
         274  +
                    if deser.is_null() {
         275  +
                        deser.read_null()?;
         276  +
                    } else {
         277  +
                        builder.last_sync_time = Some(deser.read_timestamp(member)?);
         278  +
                    }
         279  +
                }
         280  +
                Some(5) => {
         281  +
                    if deser.is_null() {
         282  +
                        deser.read_null()?;
         283  +
                    } else {
         284  +
                        builder.last_successful_sync_time = Some(deser.read_timestamp(member)?);
         285  +
                    }
         286  +
                }
         287  +
                Some(6) => {
         288  +
                    if deser.is_null() {
         289  +
                        deser.read_null()?;
         290  +
                    } else {
         291  +
                        builder.sync_last_modified_time = Some(deser.read_timestamp(member)?);
         292  +
                    }
         293  +
                }
         294  +
                Some(7) => {
         295  +
                    if deser.is_null() {
         296  +
                        deser.read_null()?;
         297  +
                    } else {
         298  +
                        builder.last_status = Some(crate::types::LastResourceDataSyncStatus::from(deser.read_string(member)?.as_str()));
         299  +
                    }
         300  +
                }
         301  +
                Some(8) => {
         302  +
                    if deser.is_null() {
         303  +
                        deser.read_null()?;
         304  +
                    } else {
         305  +
                        builder.sync_created_time = Some(deser.read_timestamp(member)?);
         306  +
                    }
         307  +
                }
         308  +
                Some(9) => {
         309  +
                    if deser.is_null() {
         310  +
                        deser.read_null()?;
         311  +
                    } else {
         312  +
                        builder.last_sync_status_message = Some(deser.read_string(member)?);
         313  +
                    }
         314  +
                }
         315  +
                _ => {}
         316  +
            }
         317  +
            Ok(())
         318  +
        })?;
         319  +
        Ok(builder.build())
         320  +
    }
         321  +
}
         322  +
impl ResourceDataSyncItem {
         323  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         324  +
    pub fn deserialize_with_response(
         325  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         326  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         327  +
        _status: u16,
         328  +
        _body: &[u8],
         329  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         330  +
        Self::deserialize(deserializer)
         331  +
    }
         332  +
}
         333  +
impl ResourceDataSyncItem {
         334  +
    /// Creates a new builder-style object to manufacture [`ResourceDataSyncItem`](crate::types::ResourceDataSyncItem).
         335  +
    pub fn builder() -> crate::types::builders::ResourceDataSyncItemBuilder {
         336  +
        crate::types::builders::ResourceDataSyncItemBuilder::default()
         337  +
    }
         338  +
}
         339  +
         340  +
/// A builder for [`ResourceDataSyncItem`](crate::types::ResourceDataSyncItem).
         341  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         342  +
#[non_exhaustive]
         343  +
pub struct ResourceDataSyncItemBuilder {
         344  +
    pub(crate) sync_name: ::std::option::Option<::std::string::String>,
         345  +
    pub(crate) sync_type: ::std::option::Option<::std::string::String>,
         346  +
    pub(crate) sync_source: ::std::option::Option<crate::types::ResourceDataSyncSourceWithState>,
         347  +
    pub(crate) s3_destination: ::std::option::Option<crate::types::ResourceDataSyncS3Destination>,
         348  +
    pub(crate) last_sync_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         349  +
    pub(crate) last_successful_sync_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         350  +
    pub(crate) sync_last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         351  +
    pub(crate) last_status: ::std::option::Option<crate::types::LastResourceDataSyncStatus>,
         352  +
    pub(crate) sync_created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         353  +
    pub(crate) last_sync_status_message: ::std::option::Option<::std::string::String>,
         354  +
}
         355  +
impl ResourceDataSyncItemBuilder {
         356  +
    /// <p>The name of the resource data sync.</p>
         357  +
    pub fn sync_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         358  +
        self.sync_name = ::std::option::Option::Some(input.into());
         359  +
        self
         360  +
    }
         361  +
    /// <p>The name of the resource data sync.</p>
         362  +
    pub fn set_sync_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         363  +
        self.sync_name = input;
         364  +
        self
         365  +
    }
         366  +
    /// <p>The name of the resource data sync.</p>
         367  +
    pub fn get_sync_name(&self) -> &::std::option::Option<::std::string::String> {
         368  +
        &self.sync_name
         369  +
    }
         370  +
    /// <p>The type of resource data sync. If <code>SyncType</code> is <code>SyncToDestination</code>, then the resource data sync synchronizes data to an S3 bucket. If the <code>SyncType</code> is <code>SyncFromSource</code> then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions.</p>
         371  +
    pub fn sync_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         372  +
        self.sync_type = ::std::option::Option::Some(input.into());
         373  +
        self
         374  +
    }
         375  +
    /// <p>The type of resource data sync. If <code>SyncType</code> is <code>SyncToDestination</code>, then the resource data sync synchronizes data to an S3 bucket. If the <code>SyncType</code> is <code>SyncFromSource</code> then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions.</p>
         376  +
    pub fn set_sync_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         377  +
        self.sync_type = input;
         378  +
        self
         379  +
    }
         380  +
    /// <p>The type of resource data sync. If <code>SyncType</code> is <code>SyncToDestination</code>, then the resource data sync synchronizes data to an S3 bucket. If the <code>SyncType</code> is <code>SyncFromSource</code> then the resource data sync synchronizes data from Organizations or from multiple Amazon Web Services Regions.</p>
         381  +
    pub fn get_sync_type(&self) -> &::std::option::Option<::std::string::String> {
         382  +
        &self.sync_type
         383  +
    }
         384  +
    /// <p>Information about the source where the data was synchronized.</p>
         385  +
    pub fn sync_source(mut self, input: crate::types::ResourceDataSyncSourceWithState) -> Self {
         386  +
        self.sync_source = ::std::option::Option::Some(input);
         387  +
        self
         388  +
    }
         389  +
    /// <p>Information about the source where the data was synchronized.</p>
         390  +
    pub fn set_sync_source(mut self, input: ::std::option::Option<crate::types::ResourceDataSyncSourceWithState>) -> Self {
         391  +
        self.sync_source = input;
         392  +
        self
         393  +
    }
         394  +
    /// <p>Information about the source where the data was synchronized.</p>
         395  +
    pub fn get_sync_source(&self) -> &::std::option::Option<crate::types::ResourceDataSyncSourceWithState> {
         396  +
        &self.sync_source
         397  +
    }
         398  +
    /// <p>Configuration information for the target S3 bucket.</p>
         399  +
    pub fn s3_destination(mut self, input: crate::types::ResourceDataSyncS3Destination) -> Self {
         400  +
        self.s3_destination = ::std::option::Option::Some(input);
         401  +
        self
         402  +
    }
         403  +
    /// <p>Configuration information for the target S3 bucket.</p>
         404  +
    pub fn set_s3_destination(mut self, input: ::std::option::Option<crate::types::ResourceDataSyncS3Destination>) -> Self {
         405  +
        self.s3_destination = input;
         406  +
        self
         407  +
    }
         408  +
    /// <p>Configuration information for the target S3 bucket.</p>
         409  +
    pub fn get_s3_destination(&self) -> &::std::option::Option<crate::types::ResourceDataSyncS3Destination> {
         410  +
        &self.s3_destination
         411  +
    }
         412  +
    /// <p>The last time the configuration attempted to sync (UTC).</p>
         413  +
    pub fn last_sync_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         414  +
        self.last_sync_time = ::std::option::Option::Some(input);
         415  +
        self
         416  +
    }
         417  +
    /// <p>The last time the configuration attempted to sync (UTC).</p>
         418  +
    pub fn set_last_sync_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         419  +
        self.last_sync_time = input;
         420  +
        self
         421  +
    }
         422  +
    /// <p>The last time the configuration attempted to sync (UTC).</p>
         423  +
    pub fn get_last_sync_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         424  +
        &self.last_sync_time
         425  +
    }
         426  +
    /// <p>The last time the sync operations returned a status of <code>SUCCESSFUL</code> (UTC).</p>
         427  +
    pub fn last_successful_sync_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         428  +
        self.last_successful_sync_time = ::std::option::Option::Some(input);
         429  +
        self
         430  +
    }
         431  +
    /// <p>The last time the sync operations returned a status of <code>SUCCESSFUL</code> (UTC).</p>
         432  +
    pub fn set_last_successful_sync_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         433  +
        self.last_successful_sync_time = input;
         434  +
        self
         435  +
    }
         436  +
    /// <p>The last time the sync operations returned a status of <code>SUCCESSFUL</code> (UTC).</p>
         437  +
    pub fn get_last_successful_sync_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         438  +
        &self.last_successful_sync_time
         439  +
    }
         440  +
    /// <p>The date and time the resource data sync was changed.</p>
         441  +
    pub fn sync_last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         442  +
        self.sync_last_modified_time = ::std::option::Option::Some(input);
         443  +
        self
         444  +
    }
         445  +
    /// <p>The date and time the resource data sync was changed.</p>
         446  +
    pub fn set_sync_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         447  +
        self.sync_last_modified_time = input;
         448  +
        self
         449  +
    }
         450  +
    /// <p>The date and time the resource data sync was changed.</p>
         451  +
    pub fn get_sync_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         452  +
        &self.sync_last_modified_time
         453  +
    }
         454  +
    /// <p>The status reported by the last sync.</p>
         455  +
    pub fn last_status(mut self, input: crate::types::LastResourceDataSyncStatus) -> Self {
         456  +
        self.last_status = ::std::option::Option::Some(input);
         457  +
        self
         458  +
    }
         459  +
    /// <p>The status reported by the last sync.</p>
         460  +
    pub fn set_last_status(mut self, input: ::std::option::Option<crate::types::LastResourceDataSyncStatus>) -> Self {
         461  +
        self.last_status = input;
         462  +
        self
         463  +
    }
         464  +
    /// <p>The status reported by the last sync.</p>
         465  +
    pub fn get_last_status(&self) -> &::std::option::Option<crate::types::LastResourceDataSyncStatus> {
         466  +
        &self.last_status
         467  +
    }
         468  +
    /// <p>The date and time the configuration was created (UTC).</p>
         469  +
    pub fn sync_created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         470  +
        self.sync_created_time = ::std::option::Option::Some(input);
         471  +
        self
         472  +
    }
         473  +
    /// <p>The date and time the configuration was created (UTC).</p>
         474  +
    pub fn set_sync_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         475  +
        self.sync_created_time = input;
         476  +
        self
         477  +
    }
         478  +
    /// <p>The date and time the configuration was created (UTC).</p>
         479  +
    pub fn get_sync_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         480  +
        &self.sync_created_time
         481  +
    }
         482  +
    /// <p>The status message details reported by the last sync.</p>
         483  +
    pub fn last_sync_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         484  +
        self.last_sync_status_message = ::std::option::Option::Some(input.into());
         485  +
        self
         486  +
    }
         487  +
    /// <p>The status message details reported by the last sync.</p>
         488  +
    pub fn set_last_sync_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         489  +
        self.last_sync_status_message = input;
         490  +
        self
         491  +
    }
         492  +
    /// <p>The status message details reported by the last sync.</p>
         493  +
    pub fn get_last_sync_status_message(&self) -> &::std::option::Option<::std::string::String> {
         494  +
        &self.last_sync_status_message
         495  +
    }
         496  +
    /// Consumes the builder and constructs a [`ResourceDataSyncItem`](crate::types::ResourceDataSyncItem).
         497  +
    pub fn build(self) -> crate::types::ResourceDataSyncItem {
         498  +
        crate::types::ResourceDataSyncItem {
         499  +
            sync_name: self.sync_name,
         500  +
            sync_type: self.sync_type,
         501  +
            sync_source: self.sync_source,
         502  +
            s3_destination: self.s3_destination,
         503  +
            last_sync_time: self.last_sync_time,
         504  +
            last_successful_sync_time: self.last_successful_sync_time,
         505  +
            sync_last_modified_time: self.sync_last_modified_time,
         506  +
            last_status: self.last_status,
         507  +
            sync_created_time: self.sync_created_time,
         508  +
            last_sync_status_message: self.last_sync_status_message,
         509  +
        }
         510  +
    }
         511  +
}