AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,192 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct AlarmConfiguration {
           7  +
    /// <p>When this value is <i>true</i>, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is <i>false</i>.</p>
           8  +
    pub ignore_poll_alarm_failure: bool,
           9  +
    /// <p>The name of the CloudWatch alarm specified in the configuration.</p>
          10  +
    pub alarms: ::std::vec::Vec<crate::types::Alarm>,
          11  +
}
          12  +
impl AlarmConfiguration {
          13  +
    /// <p>When this value is <i>true</i>, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is <i>false</i>.</p>
          14  +
    pub fn ignore_poll_alarm_failure(&self) -> bool {
          15  +
        self.ignore_poll_alarm_failure
          16  +
    }
          17  +
    /// <p>The name of the CloudWatch alarm specified in the configuration.</p>
          18  +
    pub fn alarms(&self) -> &[crate::types::Alarm] {
          19  +
        use std::ops::Deref;
          20  +
        self.alarms.deref()
          21  +
    }
          22  +
}
          23  +
static ALARMCONFIGURATION_MEMBER_IGNORE_POLL_ALARM_FAILURE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts(
          25  +
        "com.amazonaws.ssm#AlarmConfiguration$IgnorePollAlarmFailure",
          26  +
        "com.amazonaws.ssm",
          27  +
        "AlarmConfiguration",
          28  +
    ),
          29  +
    ::aws_smithy_schema::ShapeType::Boolean,
          30  +
    "IgnorePollAlarmFailure",
          31  +
    0,
          32  +
);
          33  +
static ALARMCONFIGURATION_MEMBER_ALARMS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AlarmList$member", "com.amazonaws.ssm", "AlarmList"),
          35  +
    ::aws_smithy_schema::ShapeType::Structure,
          36  +
    "member",
          37  +
    0,
          38  +
);
          39  +
static ALARMCONFIGURATION_MEMBER_ALARMS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          40  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AlarmConfiguration$Alarms", "com.amazonaws.ssm", "AlarmConfiguration"),
          41  +
    ::aws_smithy_schema::ShapeType::List,
          42  +
    "Alarms",
          43  +
    1,
          44  +
)
          45  +
.with_list_member(&ALARMCONFIGURATION_MEMBER_ALARMS_MEMBER);
          46  +
static ALARMCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          47  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AlarmConfiguration", "com.amazonaws.ssm", "AlarmConfiguration"),
          48  +
    ::aws_smithy_schema::ShapeType::Structure,
          49  +
    &[&ALARMCONFIGURATION_MEMBER_IGNORE_POLL_ALARM_FAILURE, &ALARMCONFIGURATION_MEMBER_ALARMS],
          50  +
);
          51  +
impl AlarmConfiguration {
          52  +
    /// The schema for this shape.
          53  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ALARMCONFIGURATION_SCHEMA;
          54  +
}
          55  +
impl ::aws_smithy_schema::serde::SerializableStruct for AlarmConfiguration {
          56  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          57  +
    fn serialize_members(
          58  +
        &self,
          59  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          60  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          61  +
        {
          62  +
            let val = &self.ignore_poll_alarm_failure;
          63  +
            ser.write_boolean(&ALARMCONFIGURATION_MEMBER_IGNORE_POLL_ALARM_FAILURE, *val)?;
          64  +
        }
          65  +
        {
          66  +
            let val = &self.alarms;
          67  +
          68  +
            ser.write_list(
          69  +
                &ALARMCONFIGURATION_MEMBER_ALARMS,
          70  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          71  +
                    for item in val {
          72  +
                        ser.write_struct(crate::types::Alarm::SCHEMA, item)?;
          73  +
                    }
          74  +
                    Ok(())
          75  +
                },
          76  +
            )?;
          77  +
        }
          78  +
        Ok(())
          79  +
    }
          80  +
}
          81  +
impl AlarmConfiguration {
          82  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          83  +
    pub fn deserialize(
          84  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          85  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          86  +
        #[allow(unused_variables, unused_mut)]
          87  +
        let mut builder = Self::builder();
          88  +
        #[allow(
          89  +
            unused_variables,
          90  +
            unreachable_code,
          91  +
            clippy::single_match,
          92  +
            clippy::match_single_binding,
          93  +
            clippy::diverging_sub_expression
          94  +
        )]
          95  +
        deserializer.read_struct(&ALARMCONFIGURATION_SCHEMA, &mut |member, deser| {
          96  +
            match member.member_index() {
          97  +
                Some(0) => {
          98  +
                    builder.ignore_poll_alarm_failure = Some(deser.read_boolean(member)?);
          99  +
                }
         100  +
                Some(1) => {
         101  +
                    builder.alarms = Some({
         102  +
                        let mut container = Vec::new();
         103  +
                        deser.read_list(member, &mut |deser| {
         104  +
                            container.push(crate::types::Alarm::deserialize(deser)?);
         105  +
                            Ok(())
         106  +
                        })?;
         107  +
                        container
         108  +
                    });
         109  +
                }
         110  +
                _ => {}
         111  +
            }
         112  +
            Ok(())
         113  +
        })?;
         114  +
        builder.alarms = builder.alarms.or(Some(Vec::new()));
         115  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         116  +
    }
         117  +
}
         118  +
impl AlarmConfiguration {
         119  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         120  +
    pub fn deserialize_with_response(
         121  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         122  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         123  +
        _status: u16,
         124  +
        _body: &[u8],
         125  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         126  +
        Self::deserialize(deserializer)
         127  +
    }
         128  +
}
         129  +
impl AlarmConfiguration {
         130  +
    /// Creates a new builder-style object to manufacture [`AlarmConfiguration`](crate::types::AlarmConfiguration).
         131  +
    pub fn builder() -> crate::types::builders::AlarmConfigurationBuilder {
         132  +
        crate::types::builders::AlarmConfigurationBuilder::default()
         133  +
    }
         134  +
}
         135  +
         136  +
/// A builder for [`AlarmConfiguration`](crate::types::AlarmConfiguration).
         137  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         138  +
#[non_exhaustive]
         139  +
pub struct AlarmConfigurationBuilder {
         140  +
    pub(crate) ignore_poll_alarm_failure: ::std::option::Option<bool>,
         141  +
    pub(crate) alarms: ::std::option::Option<::std::vec::Vec<crate::types::Alarm>>,
         142  +
}
         143  +
impl AlarmConfigurationBuilder {
         144  +
    /// <p>When this value is <i>true</i>, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is <i>false</i>.</p>
         145  +
    pub fn ignore_poll_alarm_failure(mut self, input: bool) -> Self {
         146  +
        self.ignore_poll_alarm_failure = ::std::option::Option::Some(input);
         147  +
        self
         148  +
    }
         149  +
    /// <p>When this value is <i>true</i>, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is <i>false</i>.</p>
         150  +
    pub fn set_ignore_poll_alarm_failure(mut self, input: ::std::option::Option<bool>) -> Self {
         151  +
        self.ignore_poll_alarm_failure = input;
         152  +
        self
         153  +
    }
         154  +
    /// <p>When this value is <i>true</i>, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is <i>false</i>.</p>
         155  +
    pub fn get_ignore_poll_alarm_failure(&self) -> &::std::option::Option<bool> {
         156  +
        &self.ignore_poll_alarm_failure
         157  +
    }
         158  +
    /// Appends an item to `alarms`.
         159  +
    ///
         160  +
    /// To override the contents of this collection use [`set_alarms`](Self::set_alarms).
         161  +
    ///
         162  +
    /// <p>The name of the CloudWatch alarm specified in the configuration.</p>
         163  +
    pub fn alarms(mut self, input: crate::types::Alarm) -> Self {
         164  +
        let mut v = self.alarms.unwrap_or_default();
         165  +
        v.push(input);
         166  +
        self.alarms = ::std::option::Option::Some(v);
         167  +
        self
         168  +
    }
         169  +
    /// <p>The name of the CloudWatch alarm specified in the configuration.</p>
         170  +
    pub fn set_alarms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Alarm>>) -> Self {
         171  +
        self.alarms = input;
         172  +
        self
         173  +
    }
         174  +
    /// <p>The name of the CloudWatch alarm specified in the configuration.</p>
         175  +
    pub fn get_alarms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Alarm>> {
         176  +
        &self.alarms
         177  +
    }
         178  +
    /// Consumes the builder and constructs a [`AlarmConfiguration`](crate::types::AlarmConfiguration).
         179  +
    /// This method will fail if any of the following fields are not set:
         180  +
    /// - [`alarms`](crate::types::builders::AlarmConfigurationBuilder::alarms)
         181  +
    pub fn build(self) -> ::std::result::Result<crate::types::AlarmConfiguration, ::aws_smithy_types::error::operation::BuildError> {
         182  +
        ::std::result::Result::Ok(crate::types::AlarmConfiguration {
         183  +
            ignore_poll_alarm_failure: self.ignore_poll_alarm_failure.unwrap_or_default(),
         184  +
            alarms: self.alarms.ok_or_else(|| {
         185  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         186  +
                    "alarms",
         187  +
                    "alarms was not specified but it is required when building AlarmConfiguration",
         188  +
                )
         189  +
            })?,
         190  +
        })
         191  +
    }
         192  +
}

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

@@ -0,1 +0,175 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The details about the state of your CloudWatch alarm.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct AlarmStateInformation {
           7  +
    /// <p>The name of your CloudWatch alarm.</p>
           8  +
    pub name: ::std::string::String,
           9  +
    /// <p>The state of your CloudWatch alarm.</p>
          10  +
    pub state: crate::types::ExternalAlarmState,
          11  +
}
          12  +
impl AlarmStateInformation {
          13  +
    /// <p>The name of your CloudWatch alarm.</p>
          14  +
    pub fn name(&self) -> &str {
          15  +
        use std::ops::Deref;
          16  +
        self.name.deref()
          17  +
    }
          18  +
    /// <p>The state of your CloudWatch alarm.</p>
          19  +
    pub fn state(&self) -> &crate::types::ExternalAlarmState {
          20  +
        &self.state
          21  +
    }
          22  +
}
          23  +
static ALARMSTATEINFORMATION_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          24  +
    ::aws_smithy_schema::ShapeId::from_parts(
          25  +
        "com.amazonaws.ssm#AlarmStateInformation$Name",
          26  +
        "com.amazonaws.ssm",
          27  +
        "AlarmStateInformation",
          28  +
    ),
          29  +
    ::aws_smithy_schema::ShapeType::String,
          30  +
    "Name",
          31  +
    0,
          32  +
);
          33  +
static ALARMSTATEINFORMATION_MEMBER_STATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm#AlarmStateInformation$State",
          36  +
        "com.amazonaws.ssm",
          37  +
        "AlarmStateInformation",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "State",
          41  +
    1,
          42  +
);
          43  +
static ALARMSTATEINFORMATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AlarmStateInformation", "com.amazonaws.ssm", "AlarmStateInformation"),
          45  +
    ::aws_smithy_schema::ShapeType::Structure,
          46  +
    &[&ALARMSTATEINFORMATION_MEMBER_NAME, &ALARMSTATEINFORMATION_MEMBER_STATE],
          47  +
);
          48  +
impl AlarmStateInformation {
          49  +
    /// The schema for this shape.
          50  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ALARMSTATEINFORMATION_SCHEMA;
          51  +
}
          52  +
impl ::aws_smithy_schema::serde::SerializableStruct for AlarmStateInformation {
          53  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          54  +
    fn serialize_members(
          55  +
        &self,
          56  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          57  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          58  +
        {
          59  +
            let val = &self.name;
          60  +
            ser.write_string(&ALARMSTATEINFORMATION_MEMBER_NAME, val)?;
          61  +
        }
          62  +
        {
          63  +
            let val = &self.state;
          64  +
            ser.write_string(&ALARMSTATEINFORMATION_MEMBER_STATE, val.as_str())?;
          65  +
        }
          66  +
        Ok(())
          67  +
    }
          68  +
}
          69  +
impl AlarmStateInformation {
          70  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        #[allow(
          77  +
            unused_variables,
          78  +
            unreachable_code,
          79  +
            clippy::single_match,
          80  +
            clippy::match_single_binding,
          81  +
            clippy::diverging_sub_expression
          82  +
        )]
          83  +
        deserializer.read_struct(&ALARMSTATEINFORMATION_SCHEMA, &mut |member, deser| {
          84  +
            match member.member_index() {
          85  +
                Some(0) => {
          86  +
                    builder.name = Some(deser.read_string(member)?);
          87  +
                }
          88  +
                Some(1) => {
          89  +
                    builder.state = Some(crate::types::ExternalAlarmState::from(deser.read_string(member)?.as_str()));
          90  +
                }
          91  +
                _ => {}
          92  +
            }
          93  +
            Ok(())
          94  +
        })?;
          95  +
        builder.name = builder.name.or(Some(String::new()));
          96  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          97  +
    }
          98  +
}
          99  +
impl AlarmStateInformation {
         100  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         101  +
    pub fn deserialize_with_response(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         103  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         104  +
        _status: u16,
         105  +
        _body: &[u8],
         106  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         107  +
        Self::deserialize(deserializer)
         108  +
    }
         109  +
}
         110  +
impl AlarmStateInformation {
         111  +
    /// Creates a new builder-style object to manufacture [`AlarmStateInformation`](crate::types::AlarmStateInformation).
         112  +
    pub fn builder() -> crate::types::builders::AlarmStateInformationBuilder {
         113  +
        crate::types::builders::AlarmStateInformationBuilder::default()
         114  +
    }
         115  +
}
         116  +
         117  +
/// A builder for [`AlarmStateInformation`](crate::types::AlarmStateInformation).
         118  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         119  +
#[non_exhaustive]
         120  +
pub struct AlarmStateInformationBuilder {
         121  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         122  +
    pub(crate) state: ::std::option::Option<crate::types::ExternalAlarmState>,
         123  +
}
         124  +
impl AlarmStateInformationBuilder {
         125  +
    /// <p>The name of your CloudWatch alarm.</p>
         126  +
    /// This field is required.
         127  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         128  +
        self.name = ::std::option::Option::Some(input.into());
         129  +
        self
         130  +
    }
         131  +
    /// <p>The name of your CloudWatch alarm.</p>
         132  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        self.name = input;
         134  +
        self
         135  +
    }
         136  +
    /// <p>The name of your CloudWatch alarm.</p>
         137  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         138  +
        &self.name
         139  +
    }
         140  +
    /// <p>The state of your CloudWatch alarm.</p>
         141  +
    /// This field is required.
         142  +
    pub fn state(mut self, input: crate::types::ExternalAlarmState) -> Self {
         143  +
        self.state = ::std::option::Option::Some(input);
         144  +
        self
         145  +
    }
         146  +
    /// <p>The state of your CloudWatch alarm.</p>
         147  +
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ExternalAlarmState>) -> Self {
         148  +
        self.state = input;
         149  +
        self
         150  +
    }
         151  +
    /// <p>The state of your CloudWatch alarm.</p>
         152  +
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ExternalAlarmState> {
         153  +
        &self.state
         154  +
    }
         155  +
    /// Consumes the builder and constructs a [`AlarmStateInformation`](crate::types::AlarmStateInformation).
         156  +
    /// This method will fail if any of the following fields are not set:
         157  +
    /// - [`name`](crate::types::builders::AlarmStateInformationBuilder::name)
         158  +
    /// - [`state`](crate::types::builders::AlarmStateInformationBuilder::state)
         159  +
    pub fn build(self) -> ::std::result::Result<crate::types::AlarmStateInformation, ::aws_smithy_types::error::operation::BuildError> {
         160  +
        ::std::result::Result::Ok(crate::types::AlarmStateInformation {
         161  +
            name: self.name.ok_or_else(|| {
         162  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         163  +
                    "name",
         164  +
                    "name was not specified but it is required when building AlarmStateInformation",
         165  +
                )
         166  +
            })?,
         167  +
            state: self.state.ok_or_else(|| {
         168  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         169  +
                    "state",
         170  +
                    "state was not specified but it is required when building AlarmStateInformation",
         171  +
                )
         172  +
            })?,
         173  +
        })
         174  +
    }
         175  +
}

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

@@ -0,1 +0,718 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Describes an association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           6  +
pub struct Association {
           7  +
    /// <p>The name of the SSM document.</p>
           8  +
    pub name: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The managed node ID.</p>
          10  +
    pub instance_id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.</p>
          12  +
    pub association_id: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>The association version.</p>
          14  +
    pub association_version: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the <code>apply-only-at-cron-interval</code> parameter.</p><important>
          16  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
          17  +
    /// </important>
          18  +
    pub document_version: ::std::option::Option<::std::string::String>,
          19  +
    /// <p>The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.</p>
          20  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          21  +
    /// <p>The date on which the association was last run.</p>
          22  +
    pub last_execution_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          23  +
    /// <p>Information about the association.</p>
          24  +
    pub overview: ::std::option::Option<crate::types::AssociationOverview>,
          25  +
    /// <p>A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).</p>
          26  +
    pub schedule_expression: ::std::option::Option<::std::string::String>,
          27  +
    /// <p>The association name.</p>
          28  +
    pub association_name: ::std::option::Option<::std::string::String>,
          29  +
    /// <p>Number of days to wait after the scheduled day to run an association.</p>
          30  +
    pub schedule_offset: ::std::option::Option<i32>,
          31  +
    /// <p>The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.</p>
          32  +
    pub duration: ::std::option::Option<i32>,
          33  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
          34  +
    pub target_maps:
          35  +
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
          36  +
}
          37  +
impl Association {
          38  +
    /// <p>The name of the SSM document.</p>
          39  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          40  +
        self.name.as_deref()
          41  +
    }
          42  +
    /// <p>The managed node ID.</p>
          43  +
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
          44  +
        self.instance_id.as_deref()
          45  +
    }
          46  +
    /// <p>The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.</p>
          47  +
    pub fn association_id(&self) -> ::std::option::Option<&str> {
          48  +
        self.association_id.as_deref()
          49  +
    }
          50  +
    /// <p>The association version.</p>
          51  +
    pub fn association_version(&self) -> ::std::option::Option<&str> {
          52  +
        self.association_version.as_deref()
          53  +
    }
          54  +
    /// <p>The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the <code>apply-only-at-cron-interval</code> parameter.</p><important>
          55  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
          56  +
    /// </important>
          57  +
    pub fn document_version(&self) -> ::std::option::Option<&str> {
          58  +
        self.document_version.as_deref()
          59  +
    }
          60  +
    /// <p>The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.</p>
          61  +
    ///
          62  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
          63  +
    pub fn targets(&self) -> &[crate::types::Target] {
          64  +
        self.targets.as_deref().unwrap_or_default()
          65  +
    }
          66  +
    /// <p>The date on which the association was last run.</p>
          67  +
    pub fn last_execution_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          68  +
        self.last_execution_date.as_ref()
          69  +
    }
          70  +
    /// <p>Information about the association.</p>
          71  +
    pub fn overview(&self) -> ::std::option::Option<&crate::types::AssociationOverview> {
          72  +
        self.overview.as_ref()
          73  +
    }
          74  +
    /// <p>A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).</p>
          75  +
    pub fn schedule_expression(&self) -> ::std::option::Option<&str> {
          76  +
        self.schedule_expression.as_deref()
          77  +
    }
          78  +
    /// <p>The association name.</p>
          79  +
    pub fn association_name(&self) -> ::std::option::Option<&str> {
          80  +
        self.association_name.as_deref()
          81  +
    }
          82  +
    /// <p>Number of days to wait after the scheduled day to run an association.</p>
          83  +
    pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
          84  +
        self.schedule_offset
          85  +
    }
          86  +
    /// <p>The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.</p>
          87  +
    pub fn duration(&self) -> ::std::option::Option<i32> {
          88  +
        self.duration
          89  +
    }
          90  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
          91  +
    ///
          92  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_maps.is_none()`.
          93  +
    pub fn target_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>] {
          94  +
        self.target_maps.as_deref().unwrap_or_default()
          95  +
    }
          96  +
}
          97  +
static ASSOCIATION_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          98  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$Name", "com.amazonaws.ssm", "Association"),
          99  +
    ::aws_smithy_schema::ShapeType::String,
         100  +
    "Name",
         101  +
    0,
         102  +
);
         103  +
static ASSOCIATION_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         104  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$InstanceId", "com.amazonaws.ssm", "Association"),
         105  +
    ::aws_smithy_schema::ShapeType::String,
         106  +
    "InstanceId",
         107  +
    1,
         108  +
);
         109  +
static ASSOCIATION_MEMBER_ASSOCIATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         110  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$AssociationId", "com.amazonaws.ssm", "Association"),
         111  +
    ::aws_smithy_schema::ShapeType::String,
         112  +
    "AssociationId",
         113  +
    2,
         114  +
);
         115  +
static ASSOCIATION_MEMBER_ASSOCIATION_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         116  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$AssociationVersion", "com.amazonaws.ssm", "Association"),
         117  +
    ::aws_smithy_schema::ShapeType::String,
         118  +
    "AssociationVersion",
         119  +
    3,
         120  +
);
         121  +
static ASSOCIATION_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         122  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$DocumentVersion", "com.amazonaws.ssm", "Association"),
         123  +
    ::aws_smithy_schema::ShapeType::String,
         124  +
    "DocumentVersion",
         125  +
    4,
         126  +
);
         127  +
static ASSOCIATION_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         128  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
         129  +
    ::aws_smithy_schema::ShapeType::Structure,
         130  +
    "member",
         131  +
    0,
         132  +
);
         133  +
static ASSOCIATION_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         134  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$Targets", "com.amazonaws.ssm", "Association"),
         135  +
    ::aws_smithy_schema::ShapeType::List,
         136  +
    "Targets",
         137  +
    5,
         138  +
)
         139  +
.with_list_member(&ASSOCIATION_MEMBER_TARGETS_MEMBER);
         140  +
static ASSOCIATION_MEMBER_LAST_EXECUTION_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         141  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$LastExecutionDate", "com.amazonaws.ssm", "Association"),
         142  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         143  +
    "LastExecutionDate",
         144  +
    6,
         145  +
);
         146  +
static ASSOCIATION_MEMBER_OVERVIEW: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         147  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$Overview", "com.amazonaws.ssm", "Association"),
         148  +
    ::aws_smithy_schema::ShapeType::Structure,
         149  +
    "Overview",
         150  +
    7,
         151  +
);
         152  +
static ASSOCIATION_MEMBER_SCHEDULE_EXPRESSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         153  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$ScheduleExpression", "com.amazonaws.ssm", "Association"),
         154  +
    ::aws_smithy_schema::ShapeType::String,
         155  +
    "ScheduleExpression",
         156  +
    8,
         157  +
);
         158  +
static ASSOCIATION_MEMBER_ASSOCIATION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         159  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$AssociationName", "com.amazonaws.ssm", "Association"),
         160  +
    ::aws_smithy_schema::ShapeType::String,
         161  +
    "AssociationName",
         162  +
    9,
         163  +
);
         164  +
static ASSOCIATION_MEMBER_SCHEDULE_OFFSET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         165  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$ScheduleOffset", "com.amazonaws.ssm", "Association"),
         166  +
    ::aws_smithy_schema::ShapeType::Integer,
         167  +
    "ScheduleOffset",
         168  +
    10,
         169  +
);
         170  +
static ASSOCIATION_MEMBER_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         171  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$Duration", "com.amazonaws.ssm", "Association"),
         172  +
    ::aws_smithy_schema::ShapeType::Integer,
         173  +
    "Duration",
         174  +
    11,
         175  +
);
         176  +
static ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         177  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMapValueList$member", "com.amazonaws.ssm", "TargetMapValueList"),
         178  +
    ::aws_smithy_schema::ShapeType::String,
         179  +
    "member",
         180  +
    0,
         181  +
);
         182  +
static ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         183  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$key", "com.amazonaws.ssm", "TargetMap"),
         184  +
    ::aws_smithy_schema::ShapeType::String,
         185  +
    "key",
         186  +
    0,
         187  +
);
         188  +
static ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         189  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$value", "com.amazonaws.ssm", "TargetMap"),
         190  +
    ::aws_smithy_schema::ShapeType::List,
         191  +
    "value",
         192  +
    1,
         193  +
)
         194  +
.with_list_member(&ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER);
         195  +
static ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         196  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMaps$member", "com.amazonaws.ssm", "TargetMaps"),
         197  +
    ::aws_smithy_schema::ShapeType::Map,
         198  +
    "member",
         199  +
    0,
         200  +
)
         201  +
.with_map_members(&ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_KEY, &ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE);
         202  +
static ASSOCIATION_MEMBER_TARGET_MAPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         203  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association$TargetMaps", "com.amazonaws.ssm", "Association"),
         204  +
    ::aws_smithy_schema::ShapeType::List,
         205  +
    "TargetMaps",
         206  +
    12,
         207  +
)
         208  +
.with_list_member(&ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER);
         209  +
static ASSOCIATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         210  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Association", "com.amazonaws.ssm", "Association"),
         211  +
    ::aws_smithy_schema::ShapeType::Structure,
         212  +
    &[
         213  +
        &ASSOCIATION_MEMBER_NAME,
         214  +
        &ASSOCIATION_MEMBER_INSTANCE_ID,
         215  +
        &ASSOCIATION_MEMBER_ASSOCIATION_ID,
         216  +
        &ASSOCIATION_MEMBER_ASSOCIATION_VERSION,
         217  +
        &ASSOCIATION_MEMBER_DOCUMENT_VERSION,
         218  +
        &ASSOCIATION_MEMBER_TARGETS,
         219  +
        &ASSOCIATION_MEMBER_LAST_EXECUTION_DATE,
         220  +
        &ASSOCIATION_MEMBER_OVERVIEW,
         221  +
        &ASSOCIATION_MEMBER_SCHEDULE_EXPRESSION,
         222  +
        &ASSOCIATION_MEMBER_ASSOCIATION_NAME,
         223  +
        &ASSOCIATION_MEMBER_SCHEDULE_OFFSET,
         224  +
        &ASSOCIATION_MEMBER_DURATION,
         225  +
        &ASSOCIATION_MEMBER_TARGET_MAPS,
         226  +
    ],
         227  +
);
         228  +
impl Association {
         229  +
    /// The schema for this shape.
         230  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ASSOCIATION_SCHEMA;
         231  +
}
         232  +
impl ::aws_smithy_schema::serde::SerializableStruct for Association {
         233  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         234  +
    fn serialize_members(
         235  +
        &self,
         236  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         237  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         238  +
        if let Some(ref val) = self.name {
         239  +
            ser.write_string(&ASSOCIATION_MEMBER_NAME, val)?;
         240  +
        }
         241  +
        if let Some(ref val) = self.instance_id {
         242  +
            ser.write_string(&ASSOCIATION_MEMBER_INSTANCE_ID, val)?;
         243  +
        }
         244  +
        if let Some(ref val) = self.association_id {
         245  +
            ser.write_string(&ASSOCIATION_MEMBER_ASSOCIATION_ID, val)?;
         246  +
        }
         247  +
        if let Some(ref val) = self.association_version {
         248  +
            ser.write_string(&ASSOCIATION_MEMBER_ASSOCIATION_VERSION, val)?;
         249  +
        }
         250  +
        if let Some(ref val) = self.document_version {
         251  +
            ser.write_string(&ASSOCIATION_MEMBER_DOCUMENT_VERSION, val)?;
         252  +
        }
         253  +
        if let Some(ref val) = self.targets {
         254  +
            ser.write_list(
         255  +
                &ASSOCIATION_MEMBER_TARGETS,
         256  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         257  +
                    for item in val {
         258  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         259  +
                    }
         260  +
                    Ok(())
         261  +
                },
         262  +
            )?;
         263  +
        }
         264  +
        if let Some(ref val) = self.last_execution_date {
         265  +
            ser.write_timestamp(&ASSOCIATION_MEMBER_LAST_EXECUTION_DATE, val)?;
         266  +
        }
         267  +
        if let Some(ref val) = self.overview {
         268  +
            ser.write_struct(&ASSOCIATION_MEMBER_OVERVIEW, val)?;
         269  +
        }
         270  +
        if let Some(ref val) = self.schedule_expression {
         271  +
            ser.write_string(&ASSOCIATION_MEMBER_SCHEDULE_EXPRESSION, val)?;
         272  +
        }
         273  +
        if let Some(ref val) = self.association_name {
         274  +
            ser.write_string(&ASSOCIATION_MEMBER_ASSOCIATION_NAME, val)?;
         275  +
        }
         276  +
        if let Some(ref val) = self.schedule_offset {
         277  +
            ser.write_integer(&ASSOCIATION_MEMBER_SCHEDULE_OFFSET, *val)?;
         278  +
        }
         279  +
        if let Some(ref val) = self.duration {
         280  +
            ser.write_integer(&ASSOCIATION_MEMBER_DURATION, *val)?;
         281  +
        }
         282  +
        if let Some(ref val) = self.target_maps {
         283  +
            ser.write_list(
         284  +
                &ASSOCIATION_MEMBER_TARGET_MAPS,
         285  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         286  +
                    for item in val {
         287  +
                        ser.write_map(
         288  +
                            &ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER,
         289  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         290  +
                                for (key, value) in item {
         291  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         292  +
         293  +
                                    ser.write_list(
         294  +
                                        &ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE,
         295  +
                                        &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         296  +
                                            for item in value {
         297  +
                                                ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         298  +
                                            }
         299  +
                                            Ok(())
         300  +
                                        },
         301  +
                                    )?;
         302  +
                                }
         303  +
                                Ok(())
         304  +
                            },
         305  +
                        )?;
         306  +
                    }
         307  +
                    Ok(())
         308  +
                },
         309  +
            )?;
         310  +
        }
         311  +
        Ok(())
         312  +
    }
         313  +
}
         314  +
impl Association {
         315  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         316  +
    pub fn deserialize(
         317  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         318  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         319  +
        #[allow(unused_variables, unused_mut)]
         320  +
        let mut builder = Self::builder();
         321  +
        #[allow(
         322  +
            unused_variables,
         323  +
            unreachable_code,
         324  +
            clippy::single_match,
         325  +
            clippy::match_single_binding,
         326  +
            clippy::diverging_sub_expression
         327  +
        )]
         328  +
        deserializer.read_struct(&ASSOCIATION_SCHEMA, &mut |member, deser| {
         329  +
            match member.member_index() {
         330  +
                Some(0) => {
         331  +
                    if deser.is_null() {
         332  +
                        deser.read_null()?;
         333  +
                    } else {
         334  +
                        builder.name = Some(deser.read_string(member)?);
         335  +
                    }
         336  +
                }
         337  +
                Some(1) => {
         338  +
                    if deser.is_null() {
         339  +
                        deser.read_null()?;
         340  +
                    } else {
         341  +
                        builder.instance_id = Some(deser.read_string(member)?);
         342  +
                    }
         343  +
                }
         344  +
                Some(2) => {
         345  +
                    if deser.is_null() {
         346  +
                        deser.read_null()?;
         347  +
                    } else {
         348  +
                        builder.association_id = Some(deser.read_string(member)?);
         349  +
                    }
         350  +
                }
         351  +
                Some(3) => {
         352  +
                    if deser.is_null() {
         353  +
                        deser.read_null()?;
         354  +
                    } else {
         355  +
                        builder.association_version = Some(deser.read_string(member)?);
         356  +
                    }
         357  +
                }
         358  +
                Some(4) => {
         359  +
                    if deser.is_null() {
         360  +
                        deser.read_null()?;
         361  +
                    } else {
         362  +
                        builder.document_version = Some(deser.read_string(member)?);
         363  +
                    }
         364  +
                }
         365  +
                Some(5) => {
         366  +
                    if deser.is_null() {
         367  +
                        deser.read_null()?;
         368  +
                    } else {
         369  +
                        builder.targets = Some({
         370  +
                            let mut container = Vec::new();
         371  +
                            deser.read_list(member, &mut |deser| {
         372  +
                                container.push(crate::types::Target::deserialize(deser)?);
         373  +
                                Ok(())
         374  +
                            })?;
         375  +
                            container
         376  +
                        });
         377  +
                    }
         378  +
                }
         379  +
                Some(6) => {
         380  +
                    if deser.is_null() {
         381  +
                        deser.read_null()?;
         382  +
                    } else {
         383  +
                        builder.last_execution_date = Some(deser.read_timestamp(member)?);
         384  +
                    }
         385  +
                }
         386  +
                Some(7) => {
         387  +
                    if deser.is_null() {
         388  +
                        deser.read_null()?;
         389  +
                    } else {
         390  +
                        builder.overview = Some(crate::types::AssociationOverview::deserialize(deser)?);
         391  +
                    }
         392  +
                }
         393  +
                Some(8) => {
         394  +
                    if deser.is_null() {
         395  +
                        deser.read_null()?;
         396  +
                    } else {
         397  +
                        builder.schedule_expression = Some(deser.read_string(member)?);
         398  +
                    }
         399  +
                }
         400  +
                Some(9) => {
         401  +
                    if deser.is_null() {
         402  +
                        deser.read_null()?;
         403  +
                    } else {
         404  +
                        builder.association_name = Some(deser.read_string(member)?);
         405  +
                    }
         406  +
                }
         407  +
                Some(10) => {
         408  +
                    if deser.is_null() {
         409  +
                        deser.read_null()?;
         410  +
                    } else {
         411  +
                        builder.schedule_offset = Some(deser.read_integer(member)?);
         412  +
                    }
         413  +
                }
         414  +
                Some(11) => {
         415  +
                    if deser.is_null() {
         416  +
                        deser.read_null()?;
         417  +
                    } else {
         418  +
                        builder.duration = Some(deser.read_integer(member)?);
         419  +
                    }
         420  +
                }
         421  +
                Some(12) => {
         422  +
                    if deser.is_null() {
         423  +
                        deser.read_null()?;
         424  +
                    } else {
         425  +
                        builder.target_maps = Some({
         426  +
                            let mut container = Vec::new();
         427  +
                            deser.read_list(member, &mut |deser| {
         428  +
                                container.push({
         429  +
                                    let mut map = ::std::collections::HashMap::new();
         430  +
                                    deser.read_map(&ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER, &mut |key, deser| {
         431  +
                                        let value = {
         432  +
                                            let mut list = Vec::new();
         433  +
                                            deser.read_list(&ASSOCIATION_MEMBER_TARGET_MAPS_MEMBER_VALUE, &mut |deser| {
         434  +
                                                list.push(deser.read_string(&::aws_smithy_schema::prelude::STRING)?);
         435  +
                                                Ok(())
         436  +
                                            })?;
         437  +
                                            list
         438  +
                                        };
         439  +
                                        map.insert(key, value);
         440  +
                                        Ok(())
         441  +
                                    })?;
         442  +
                                    map
         443  +
                                });
         444  +
                                Ok(())
         445  +
                            })?;
         446  +
                            container
         447  +
                        });
         448  +
                    }
         449  +
                }
         450  +
                _ => {}
         451  +
            }
         452  +
            Ok(())
         453  +
        })?;
         454  +
        Ok(builder.build())
         455  +
    }
         456  +
}
         457  +
impl Association {
         458  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         459  +
    pub fn deserialize_with_response(
         460  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         461  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         462  +
        _status: u16,
         463  +
        _body: &[u8],
         464  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         465  +
        Self::deserialize(deserializer)
         466  +
    }
         467  +
}
         468  +
impl Association {
         469  +
    /// Creates a new builder-style object to manufacture [`Association`](crate::types::Association).
         470  +
    pub fn builder() -> crate::types::builders::AssociationBuilder {
         471  +
        crate::types::builders::AssociationBuilder::default()
         472  +
    }
         473  +
}
         474  +
         475  +
/// A builder for [`Association`](crate::types::Association).
         476  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         477  +
#[non_exhaustive]
         478  +
pub struct AssociationBuilder {
         479  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         480  +
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
         481  +
    pub(crate) association_id: ::std::option::Option<::std::string::String>,
         482  +
    pub(crate) association_version: ::std::option::Option<::std::string::String>,
         483  +
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
         484  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         485  +
    pub(crate) last_execution_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         486  +
    pub(crate) overview: ::std::option::Option<crate::types::AssociationOverview>,
         487  +
    pub(crate) schedule_expression: ::std::option::Option<::std::string::String>,
         488  +
    pub(crate) association_name: ::std::option::Option<::std::string::String>,
         489  +
    pub(crate) schedule_offset: ::std::option::Option<i32>,
         490  +
    pub(crate) duration: ::std::option::Option<i32>,
         491  +
    pub(crate) target_maps:
         492  +
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
         493  +
}
         494  +
impl AssociationBuilder {
         495  +
    /// <p>The name of the SSM document.</p>
         496  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         497  +
        self.name = ::std::option::Option::Some(input.into());
         498  +
        self
         499  +
    }
         500  +
    /// <p>The name of the SSM document.</p>
         501  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         502  +
        self.name = input;
         503  +
        self
         504  +
    }
         505  +
    /// <p>The name of the SSM document.</p>
         506  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         507  +
        &self.name
         508  +
    }
         509  +
    /// <p>The managed node ID.</p>
         510  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         511  +
        self.instance_id = ::std::option::Option::Some(input.into());
         512  +
        self
         513  +
    }
         514  +
    /// <p>The managed node ID.</p>
         515  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         516  +
        self.instance_id = input;
         517  +
        self
         518  +
    }
         519  +
    /// <p>The managed node ID.</p>
         520  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         521  +
        &self.instance_id
         522  +
    }
         523  +
    /// <p>The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.</p>
         524  +
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         525  +
        self.association_id = ::std::option::Option::Some(input.into());
         526  +
        self
         527  +
    }
         528  +
    /// <p>The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.</p>
         529  +
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         530  +
        self.association_id = input;
         531  +
        self
         532  +
    }
         533  +
    /// <p>The ID created by the system when you create an association. An association is a binding between a document and a set of targets with a schedule.</p>
         534  +
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
         535  +
        &self.association_id
         536  +
    }
         537  +
    /// <p>The association version.</p>
         538  +
    pub fn association_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         539  +
        self.association_version = ::std::option::Option::Some(input.into());
         540  +
        self
         541  +
    }
         542  +
    /// <p>The association version.</p>
         543  +
    pub fn set_association_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         544  +
        self.association_version = input;
         545  +
        self
         546  +
    }
         547  +
    /// <p>The association version.</p>
         548  +
    pub fn get_association_version(&self) -> &::std::option::Option<::std::string::String> {
         549  +
        &self.association_version
         550  +
    }
         551  +
    /// <p>The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the <code>apply-only-at-cron-interval</code> parameter.</p><important>
         552  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         553  +
    /// </important>
         554  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         555  +
        self.document_version = ::std::option::Option::Some(input.into());
         556  +
        self
         557  +
    }
         558  +
    /// <p>The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the <code>apply-only-at-cron-interval</code> parameter.</p><important>
         559  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         560  +
    /// </important>
         561  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         562  +
        self.document_version = input;
         563  +
        self
         564  +
    }
         565  +
    /// <p>The version of the document used in the association. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the <code>apply-only-at-cron-interval</code> parameter.</p><important>
         566  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         567  +
    /// </important>
         568  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         569  +
        &self.document_version
         570  +
    }
         571  +
    /// Appends an item to `targets`.
         572  +
    ///
         573  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         574  +
    ///
         575  +
    /// <p>The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.</p>
         576  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         577  +
        let mut v = self.targets.unwrap_or_default();
         578  +
        v.push(input);
         579  +
        self.targets = ::std::option::Option::Some(v);
         580  +
        self
         581  +
    }
         582  +
    /// <p>The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.</p>
         583  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         584  +
        self.targets = input;
         585  +
        self
         586  +
    }
         587  +
    /// <p>The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.</p>
         588  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         589  +
        &self.targets
         590  +
    }
         591  +
    /// <p>The date on which the association was last run.</p>
         592  +
    pub fn last_execution_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         593  +
        self.last_execution_date = ::std::option::Option::Some(input);
         594  +
        self
         595  +
    }
         596  +
    /// <p>The date on which the association was last run.</p>
         597  +
    pub fn set_last_execution_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         598  +
        self.last_execution_date = input;
         599  +
        self
         600  +
    }
         601  +
    /// <p>The date on which the association was last run.</p>
         602  +
    pub fn get_last_execution_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         603  +
        &self.last_execution_date
         604  +
    }
         605  +
    /// <p>Information about the association.</p>
         606  +
    pub fn overview(mut self, input: crate::types::AssociationOverview) -> Self {
         607  +
        self.overview = ::std::option::Option::Some(input);
         608  +
        self
         609  +
    }
         610  +
    /// <p>Information about the association.</p>
         611  +
    pub fn set_overview(mut self, input: ::std::option::Option<crate::types::AssociationOverview>) -> Self {
         612  +
        self.overview = input;
         613  +
        self
         614  +
    }
         615  +
    /// <p>Information about the association.</p>
         616  +
    pub fn get_overview(&self) -> &::std::option::Option<crate::types::AssociationOverview> {
         617  +
        &self.overview
         618  +
    }
         619  +
    /// <p>A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).</p>
         620  +
    pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         621  +
        self.schedule_expression = ::std::option::Option::Some(input.into());
         622  +
        self
         623  +
    }
         624  +
    /// <p>A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).</p>
         625  +
    pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         626  +
        self.schedule_expression = input;
         627  +
        self
         628  +
    }
         629  +
    /// <p>A cron expression that specifies a schedule when the association runs. The schedule runs in Coordinated Universal Time (UTC).</p>
         630  +
    pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
         631  +
        &self.schedule_expression
         632  +
    }
         633  +
    /// <p>The association name.</p>
         634  +
    pub fn association_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         635  +
        self.association_name = ::std::option::Option::Some(input.into());
         636  +
        self
         637  +
    }
         638  +
    /// <p>The association name.</p>
         639  +
    pub fn set_association_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         640  +
        self.association_name = input;
         641  +
        self
         642  +
    }
         643  +
    /// <p>The association name.</p>
         644  +
    pub fn get_association_name(&self) -> &::std::option::Option<::std::string::String> {
         645  +
        &self.association_name
         646  +
    }
         647  +
    /// <p>Number of days to wait after the scheduled day to run an association.</p>
         648  +
    pub fn schedule_offset(mut self, input: i32) -> Self {
         649  +
        self.schedule_offset = ::std::option::Option::Some(input);
         650  +
        self
         651  +
    }
         652  +
    /// <p>Number of days to wait after the scheduled day to run an association.</p>
         653  +
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
         654  +
        self.schedule_offset = input;
         655  +
        self
         656  +
    }
         657  +
    /// <p>Number of days to wait after the scheduled day to run an association.</p>
         658  +
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
         659  +
        &self.schedule_offset
         660  +
    }
         661  +
    /// <p>The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.</p>
         662  +
    pub fn duration(mut self, input: i32) -> Self {
         663  +
        self.duration = ::std::option::Option::Some(input);
         664  +
        self
         665  +
    }
         666  +
    /// <p>The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.</p>
         667  +
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
         668  +
        self.duration = input;
         669  +
        self
         670  +
    }
         671  +
    /// <p>The number of hours that an association can run on specified targets. After the resulting cutoff time passes, associations that are currently running are cancelled, and no pending executions are started on remaining targets.</p>
         672  +
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
         673  +
        &self.duration
         674  +
    }
         675  +
    /// Appends an item to `target_maps`.
         676  +
    ///
         677  +
    /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
         678  +
    ///
         679  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         680  +
    pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
         681  +
        let mut v = self.target_maps.unwrap_or_default();
         682  +
        v.push(input);
         683  +
        self.target_maps = ::std::option::Option::Some(v);
         684  +
        self
         685  +
    }
         686  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         687  +
    pub fn set_target_maps(
         688  +
        mut self,
         689  +
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
         690  +
    ) -> Self {
         691  +
        self.target_maps = input;
         692  +
        self
         693  +
    }
         694  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         695  +
    pub fn get_target_maps(
         696  +
        &self,
         697  +
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
         698  +
        &self.target_maps
         699  +
    }
         700  +
    /// Consumes the builder and constructs a [`Association`](crate::types::Association).
         701  +
    pub fn build(self) -> crate::types::Association {
         702  +
        crate::types::Association {
         703  +
            name: self.name,
         704  +
            instance_id: self.instance_id,
         705  +
            association_id: self.association_id,
         706  +
            association_version: self.association_version,
         707  +
            document_version: self.document_version,
         708  +
            targets: self.targets,
         709  +
            last_execution_date: self.last_execution_date,
         710  +
            overview: self.overview,
         711  +
            schedule_expression: self.schedule_expression,
         712  +
            association_name: self.association_name,
         713  +
            schedule_offset: self.schedule_offset,
         714  +
            duration: self.duration,
         715  +
            target_maps: self.target_maps,
         716  +
        }
         717  +
    }
         718  +
}