AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede

Files changed:

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

@@ -0,1 +0,192 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The parameters for a <code>STEP_FUNCTIONS</code> task.</p>
           4  +
/// <p>For information about specifying and updating task parameters, see <code>RegisterTaskWithMaintenanceWindow</code> and <code>UpdateMaintenanceWindowTask</code>.</p><note>
           5  +
/// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
           6  +
/// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
           7  +
/// <p>For Step Functions tasks, Systems Manager ignores any values specified for <code>TaskParameters</code> and <code>LoggingInfo</code>.</p>
           8  +
/// </note>
           9  +
#[non_exhaustive]
          10  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
          11  +
pub struct MaintenanceWindowStepFunctionsParameters {
          12  +
    /// <p>The inputs for the <code>STEP_FUNCTIONS</code> task.</p>
          13  +
    pub input: ::std::option::Option<::std::string::String>,
          14  +
    /// <p>The name of the <code>STEP_FUNCTIONS</code> task.</p>
          15  +
    pub name: ::std::option::Option<::std::string::String>,
          16  +
}
          17  +
impl MaintenanceWindowStepFunctionsParameters {
          18  +
    /// <p>The inputs for the <code>STEP_FUNCTIONS</code> task.</p>
          19  +
    pub fn input(&self) -> ::std::option::Option<&str> {
          20  +
        self.input.as_deref()
          21  +
    }
          22  +
    /// <p>The name of the <code>STEP_FUNCTIONS</code> task.</p>
          23  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          24  +
        self.name.as_deref()
          25  +
    }
          26  +
}
          27  +
impl ::std::fmt::Debug for MaintenanceWindowStepFunctionsParameters {
          28  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          29  +
        let mut formatter = f.debug_struct("MaintenanceWindowStepFunctionsParameters");
          30  +
        formatter.field("input", &"*** Sensitive Data Redacted ***");
          31  +
        formatter.field("name", &self.name);
          32  +
        formatter.finish()
          33  +
    }
          34  +
}
          35  +
static MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_INPUT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          36  +
    ::aws_smithy_schema::ShapeId::from_parts(
          37  +
        "com.amazonaws.ssm#MaintenanceWindowStepFunctionsParameters$Input",
          38  +
        "com.amazonaws.ssm",
          39  +
        "MaintenanceWindowStepFunctionsParameters",
          40  +
    ),
          41  +
    ::aws_smithy_schema::ShapeType::String,
          42  +
    "Input",
          43  +
    0,
          44  +
);
          45  +
static MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          46  +
    ::aws_smithy_schema::ShapeId::from_parts(
          47  +
        "com.amazonaws.ssm#MaintenanceWindowStepFunctionsParameters$Name",
          48  +
        "com.amazonaws.ssm",
          49  +
        "MaintenanceWindowStepFunctionsParameters",
          50  +
    ),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "Name",
          53  +
    1,
          54  +
);
          55  +
static MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts(
          57  +
        "com.amazonaws.ssm#MaintenanceWindowStepFunctionsParameters",
          58  +
        "com.amazonaws.ssm",
          59  +
        "MaintenanceWindowStepFunctionsParameters",
          60  +
    ),
          61  +
    ::aws_smithy_schema::ShapeType::Structure,
          62  +
    &[
          63  +
        &MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_INPUT,
          64  +
        &MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_NAME,
          65  +
    ],
          66  +
);
          67  +
impl MaintenanceWindowStepFunctionsParameters {
          68  +
    /// The schema for this shape.
          69  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_SCHEMA;
          70  +
}
          71  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowStepFunctionsParameters {
          72  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          73  +
    fn serialize_members(
          74  +
        &self,
          75  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          76  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          77  +
        if let Some(ref val) = self.input {
          78  +
            ser.write_string(&MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_INPUT, val)?;
          79  +
        }
          80  +
        if let Some(ref val) = self.name {
          81  +
            ser.write_string(&MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_MEMBER_NAME, val)?;
          82  +
        }
          83  +
        Ok(())
          84  +
    }
          85  +
}
          86  +
impl MaintenanceWindowStepFunctionsParameters {
          87  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          88  +
    pub fn deserialize(
          89  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          90  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          91  +
        #[allow(unused_variables, unused_mut)]
          92  +
        let mut builder = Self::builder();
          93  +
        #[allow(
          94  +
            unused_variables,
          95  +
            unreachable_code,
          96  +
            clippy::single_match,
          97  +
            clippy::match_single_binding,
          98  +
            clippy::diverging_sub_expression
          99  +
        )]
         100  +
        deserializer.read_struct(&MAINTENANCEWINDOWSTEPFUNCTIONSPARAMETERS_SCHEMA, &mut |member, deser| {
         101  +
            match member.member_index() {
         102  +
                Some(0) => {
         103  +
                    if deser.is_null() {
         104  +
                        deser.read_null()?;
         105  +
                    } else {
         106  +
                        builder.input = Some(deser.read_string(member)?);
         107  +
                    }
         108  +
                }
         109  +
                Some(1) => {
         110  +
                    if deser.is_null() {
         111  +
                        deser.read_null()?;
         112  +
                    } else {
         113  +
                        builder.name = Some(deser.read_string(member)?);
         114  +
                    }
         115  +
                }
         116  +
                _ => {}
         117  +
            }
         118  +
            Ok(())
         119  +
        })?;
         120  +
        Ok(builder.build())
         121  +
    }
         122  +
}
         123  +
impl MaintenanceWindowStepFunctionsParameters {
         124  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         125  +
    pub fn deserialize_with_response(
         126  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         127  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         128  +
        _status: u16,
         129  +
        _body: &[u8],
         130  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         131  +
        Self::deserialize(deserializer)
         132  +
    }
         133  +
}
         134  +
impl MaintenanceWindowStepFunctionsParameters {
         135  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowStepFunctionsParameters`](crate::types::MaintenanceWindowStepFunctionsParameters).
         136  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowStepFunctionsParametersBuilder {
         137  +
        crate::types::builders::MaintenanceWindowStepFunctionsParametersBuilder::default()
         138  +
    }
         139  +
}
         140  +
         141  +
/// A builder for [`MaintenanceWindowStepFunctionsParameters`](crate::types::MaintenanceWindowStepFunctionsParameters).
         142  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         143  +
#[non_exhaustive]
         144  +
pub struct MaintenanceWindowStepFunctionsParametersBuilder {
         145  +
    pub(crate) input: ::std::option::Option<::std::string::String>,
         146  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         147  +
}
         148  +
impl MaintenanceWindowStepFunctionsParametersBuilder {
         149  +
    /// <p>The inputs for the <code>STEP_FUNCTIONS</code> task.</p>
         150  +
    pub fn input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         151  +
        self.input = ::std::option::Option::Some(input.into());
         152  +
        self
         153  +
    }
         154  +
    /// <p>The inputs for the <code>STEP_FUNCTIONS</code> task.</p>
         155  +
    pub fn set_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         156  +
        self.input = input;
         157  +
        self
         158  +
    }
         159  +
    /// <p>The inputs for the <code>STEP_FUNCTIONS</code> task.</p>
         160  +
    pub fn get_input(&self) -> &::std::option::Option<::std::string::String> {
         161  +
        &self.input
         162  +
    }
         163  +
    /// <p>The name of the <code>STEP_FUNCTIONS</code> task.</p>
         164  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         165  +
        self.name = ::std::option::Option::Some(input.into());
         166  +
        self
         167  +
    }
         168  +
    /// <p>The name of the <code>STEP_FUNCTIONS</code> task.</p>
         169  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         170  +
        self.name = input;
         171  +
        self
         172  +
    }
         173  +
    /// <p>The name of the <code>STEP_FUNCTIONS</code> task.</p>
         174  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         175  +
        &self.name
         176  +
    }
         177  +
    /// Consumes the builder and constructs a [`MaintenanceWindowStepFunctionsParameters`](crate::types::MaintenanceWindowStepFunctionsParameters).
         178  +
    pub fn build(self) -> crate::types::MaintenanceWindowStepFunctionsParameters {
         179  +
        crate::types::MaintenanceWindowStepFunctionsParameters {
         180  +
            input: self.input,
         181  +
            name: self.name,
         182  +
        }
         183  +
    }
         184  +
}
         185  +
impl ::std::fmt::Debug for MaintenanceWindowStepFunctionsParametersBuilder {
         186  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         187  +
        let mut formatter = f.debug_struct("MaintenanceWindowStepFunctionsParametersBuilder");
         188  +
        formatter.field("input", &"*** Sensitive Data Redacted ***");
         189  +
        formatter.field("name", &self.name);
         190  +
        formatter.finish()
         191  +
    }
         192  +
}

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

@@ -0,1 +0,492 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>The target registered with the maintenance window.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           6  +
pub struct MaintenanceWindowTarget {
           7  +
    /// <p>The ID of the maintenance window to register the target with.</p>
           8  +
    pub window_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The ID of the target.</p>
          10  +
    pub window_target_id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The type of target that is being registered with the maintenance window.</p>
          12  +
    pub resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
          13  +
    /// <p>The targets, either managed nodes or tags.</p>
          14  +
    /// <p>Specify managed nodes using the following format:</p>
          15  +
    /// <p><code>Key=instanceids,Values=<instanceid1>
          16  +
    /// ,
          17  +
    /// <instanceid2></instanceid2>
          18  +
    /// </instanceid1></code></p>
          19  +
    /// <p>Tags are specified using the following format:</p>
          20  +
    /// <p><code>Key=<tag name>
          21  +
    /// ,Values=
          22  +
    /// <tag value></tag>
          23  +
    /// </tag></code>.</p>
          24  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          25  +
    /// <p>A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.</p>
          26  +
    pub owner_information: ::std::option::Option<::std::string::String>,
          27  +
    /// <p>The name for the maintenance window target.</p>
          28  +
    pub name: ::std::option::Option<::std::string::String>,
          29  +
    /// <p>A description for the target.</p>
          30  +
    pub description: ::std::option::Option<::std::string::String>,
          31  +
}
          32  +
impl MaintenanceWindowTarget {
          33  +
    /// <p>The ID of the maintenance window to register the target with.</p>
          34  +
    pub fn window_id(&self) -> ::std::option::Option<&str> {
          35  +
        self.window_id.as_deref()
          36  +
    }
          37  +
    /// <p>The ID of the target.</p>
          38  +
    pub fn window_target_id(&self) -> ::std::option::Option<&str> {
          39  +
        self.window_target_id.as_deref()
          40  +
    }
          41  +
    /// <p>The type of target that is being registered with the maintenance window.</p>
          42  +
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowResourceType> {
          43  +
        self.resource_type.as_ref()
          44  +
    }
          45  +
    /// <p>The targets, either managed nodes or tags.</p>
          46  +
    /// <p>Specify managed nodes using the following format:</p>
          47  +
    /// <p><code>Key=instanceids,Values=<instanceid1>
          48  +
    /// ,
          49  +
    /// <instanceid2></instanceid2>
          50  +
    /// </instanceid1></code></p>
          51  +
    /// <p>Tags are specified using the following format:</p>
          52  +
    /// <p><code>Key=<tag name>
          53  +
    /// ,Values=
          54  +
    /// <tag value></tag>
          55  +
    /// </tag></code>.</p>
          56  +
    ///
          57  +
    /// 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()`.
          58  +
    pub fn targets(&self) -> &[crate::types::Target] {
          59  +
        self.targets.as_deref().unwrap_or_default()
          60  +
    }
          61  +
    /// <p>A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.</p>
          62  +
    pub fn owner_information(&self) -> ::std::option::Option<&str> {
          63  +
        self.owner_information.as_deref()
          64  +
    }
          65  +
    /// <p>The name for the maintenance window target.</p>
          66  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          67  +
        self.name.as_deref()
          68  +
    }
          69  +
    /// <p>A description for the target.</p>
          70  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          71  +
        self.description.as_deref()
          72  +
    }
          73  +
}
          74  +
impl ::std::fmt::Debug for MaintenanceWindowTarget {
          75  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          76  +
        let mut formatter = f.debug_struct("MaintenanceWindowTarget");
          77  +
        formatter.field("window_id", &self.window_id);
          78  +
        formatter.field("window_target_id", &self.window_target_id);
          79  +
        formatter.field("resource_type", &self.resource_type);
          80  +
        formatter.field("targets", &self.targets);
          81  +
        formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
          82  +
        formatter.field("name", &self.name);
          83  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
          84  +
        formatter.finish()
          85  +
    }
          86  +
}
          87  +
static MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          88  +
    ::aws_smithy_schema::ShapeId::from_parts(
          89  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$WindowId",
          90  +
        "com.amazonaws.ssm",
          91  +
        "MaintenanceWindowTarget",
          92  +
    ),
          93  +
    ::aws_smithy_schema::ShapeType::String,
          94  +
    "WindowId",
          95  +
    0,
          96  +
);
          97  +
static MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_TARGET_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          98  +
    ::aws_smithy_schema::ShapeId::from_parts(
          99  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$WindowTargetId",
         100  +
        "com.amazonaws.ssm",
         101  +
        "MaintenanceWindowTarget",
         102  +
    ),
         103  +
    ::aws_smithy_schema::ShapeType::String,
         104  +
    "WindowTargetId",
         105  +
    1,
         106  +
);
         107  +
static MAINTENANCEWINDOWTARGET_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         108  +
    ::aws_smithy_schema::ShapeId::from_parts(
         109  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$ResourceType",
         110  +
        "com.amazonaws.ssm",
         111  +
        "MaintenanceWindowTarget",
         112  +
    ),
         113  +
    ::aws_smithy_schema::ShapeType::String,
         114  +
    "ResourceType",
         115  +
    2,
         116  +
);
         117  +
static MAINTENANCEWINDOWTARGET_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         118  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
         119  +
    ::aws_smithy_schema::ShapeType::Structure,
         120  +
    "member",
         121  +
    0,
         122  +
);
         123  +
static MAINTENANCEWINDOWTARGET_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         124  +
    ::aws_smithy_schema::ShapeId::from_parts(
         125  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$Targets",
         126  +
        "com.amazonaws.ssm",
         127  +
        "MaintenanceWindowTarget",
         128  +
    ),
         129  +
    ::aws_smithy_schema::ShapeType::List,
         130  +
    "Targets",
         131  +
    3,
         132  +
)
         133  +
.with_list_member(&MAINTENANCEWINDOWTARGET_MEMBER_TARGETS_MEMBER);
         134  +
static MAINTENANCEWINDOWTARGET_MEMBER_OWNER_INFORMATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         135  +
    ::aws_smithy_schema::ShapeId::from_parts(
         136  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$OwnerInformation",
         137  +
        "com.amazonaws.ssm",
         138  +
        "MaintenanceWindowTarget",
         139  +
    ),
         140  +
    ::aws_smithy_schema::ShapeType::String,
         141  +
    "OwnerInformation",
         142  +
    4,
         143  +
);
         144  +
static MAINTENANCEWINDOWTARGET_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         145  +
    ::aws_smithy_schema::ShapeId::from_parts(
         146  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$Name",
         147  +
        "com.amazonaws.ssm",
         148  +
        "MaintenanceWindowTarget",
         149  +
    ),
         150  +
    ::aws_smithy_schema::ShapeType::String,
         151  +
    "Name",
         152  +
    5,
         153  +
);
         154  +
static MAINTENANCEWINDOWTARGET_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         155  +
    ::aws_smithy_schema::ShapeId::from_parts(
         156  +
        "com.amazonaws.ssm#MaintenanceWindowTarget$Description",
         157  +
        "com.amazonaws.ssm",
         158  +
        "MaintenanceWindowTarget",
         159  +
    ),
         160  +
    ::aws_smithy_schema::ShapeType::String,
         161  +
    "Description",
         162  +
    6,
         163  +
);
         164  +
static MAINTENANCEWINDOWTARGET_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         165  +
    ::aws_smithy_schema::ShapeId::from_parts(
         166  +
        "com.amazonaws.ssm#MaintenanceWindowTarget",
         167  +
        "com.amazonaws.ssm",
         168  +
        "MaintenanceWindowTarget",
         169  +
    ),
         170  +
    ::aws_smithy_schema::ShapeType::Structure,
         171  +
    &[
         172  +
        &MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_ID,
         173  +
        &MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_TARGET_ID,
         174  +
        &MAINTENANCEWINDOWTARGET_MEMBER_RESOURCE_TYPE,
         175  +
        &MAINTENANCEWINDOWTARGET_MEMBER_TARGETS,
         176  +
        &MAINTENANCEWINDOWTARGET_MEMBER_OWNER_INFORMATION,
         177  +
        &MAINTENANCEWINDOWTARGET_MEMBER_NAME,
         178  +
        &MAINTENANCEWINDOWTARGET_MEMBER_DESCRIPTION,
         179  +
    ],
         180  +
);
         181  +
impl MaintenanceWindowTarget {
         182  +
    /// The schema for this shape.
         183  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWTARGET_SCHEMA;
         184  +
}
         185  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowTarget {
         186  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         187  +
    fn serialize_members(
         188  +
        &self,
         189  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         190  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         191  +
        if let Some(ref val) = self.window_id {
         192  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_ID, val)?;
         193  +
        }
         194  +
        if let Some(ref val) = self.window_target_id {
         195  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_WINDOW_TARGET_ID, val)?;
         196  +
        }
         197  +
        if let Some(ref val) = self.resource_type {
         198  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_RESOURCE_TYPE, val.as_str())?;
         199  +
        }
         200  +
        if let Some(ref val) = self.targets {
         201  +
            ser.write_list(
         202  +
                &MAINTENANCEWINDOWTARGET_MEMBER_TARGETS,
         203  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         204  +
                    for item in val {
         205  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         206  +
                    }
         207  +
                    Ok(())
         208  +
                },
         209  +
            )?;
         210  +
        }
         211  +
        if let Some(ref val) = self.owner_information {
         212  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_OWNER_INFORMATION, val)?;
         213  +
        }
         214  +
        if let Some(ref val) = self.name {
         215  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_NAME, val)?;
         216  +
        }
         217  +
        if let Some(ref val) = self.description {
         218  +
            ser.write_string(&MAINTENANCEWINDOWTARGET_MEMBER_DESCRIPTION, val)?;
         219  +
        }
         220  +
        Ok(())
         221  +
    }
         222  +
}
         223  +
impl MaintenanceWindowTarget {
         224  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         225  +
    pub fn deserialize(
         226  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         227  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         228  +
        #[allow(unused_variables, unused_mut)]
         229  +
        let mut builder = Self::builder();
         230  +
        #[allow(
         231  +
            unused_variables,
         232  +
            unreachable_code,
         233  +
            clippy::single_match,
         234  +
            clippy::match_single_binding,
         235  +
            clippy::diverging_sub_expression
         236  +
        )]
         237  +
        deserializer.read_struct(&MAINTENANCEWINDOWTARGET_SCHEMA, &mut |member, deser| {
         238  +
            match member.member_index() {
         239  +
                Some(0) => {
         240  +
                    if deser.is_null() {
         241  +
                        deser.read_null()?;
         242  +
                    } else {
         243  +
                        builder.window_id = Some(deser.read_string(member)?);
         244  +
                    }
         245  +
                }
         246  +
                Some(1) => {
         247  +
                    if deser.is_null() {
         248  +
                        deser.read_null()?;
         249  +
                    } else {
         250  +
                        builder.window_target_id = Some(deser.read_string(member)?);
         251  +
                    }
         252  +
                }
         253  +
                Some(2) => {
         254  +
                    if deser.is_null() {
         255  +
                        deser.read_null()?;
         256  +
                    } else {
         257  +
                        builder.resource_type = Some(crate::types::MaintenanceWindowResourceType::from(deser.read_string(member)?.as_str()));
         258  +
                    }
         259  +
                }
         260  +
                Some(3) => {
         261  +
                    if deser.is_null() {
         262  +
                        deser.read_null()?;
         263  +
                    } else {
         264  +
                        builder.targets = Some({
         265  +
                            let mut container = Vec::new();
         266  +
                            deser.read_list(member, &mut |deser| {
         267  +
                                container.push(crate::types::Target::deserialize(deser)?);
         268  +
                                Ok(())
         269  +
                            })?;
         270  +
                            container
         271  +
                        });
         272  +
                    }
         273  +
                }
         274  +
                Some(4) => {
         275  +
                    if deser.is_null() {
         276  +
                        deser.read_null()?;
         277  +
                    } else {
         278  +
                        builder.owner_information = Some(deser.read_string(member)?);
         279  +
                    }
         280  +
                }
         281  +
                Some(5) => {
         282  +
                    if deser.is_null() {
         283  +
                        deser.read_null()?;
         284  +
                    } else {
         285  +
                        builder.name = Some(deser.read_string(member)?);
         286  +
                    }
         287  +
                }
         288  +
                Some(6) => {
         289  +
                    if deser.is_null() {
         290  +
                        deser.read_null()?;
         291  +
                    } else {
         292  +
                        builder.description = Some(deser.read_string(member)?);
         293  +
                    }
         294  +
                }
         295  +
                _ => {}
         296  +
            }
         297  +
            Ok(())
         298  +
        })?;
         299  +
        Ok(builder.build())
         300  +
    }
         301  +
}
         302  +
impl MaintenanceWindowTarget {
         303  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         304  +
    pub fn deserialize_with_response(
         305  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         306  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         307  +
        _status: u16,
         308  +
        _body: &[u8],
         309  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         310  +
        Self::deserialize(deserializer)
         311  +
    }
         312  +
}
         313  +
impl MaintenanceWindowTarget {
         314  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowTarget`](crate::types::MaintenanceWindowTarget).
         315  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowTargetBuilder {
         316  +
        crate::types::builders::MaintenanceWindowTargetBuilder::default()
         317  +
    }
         318  +
}
         319  +
         320  +
/// A builder for [`MaintenanceWindowTarget`](crate::types::MaintenanceWindowTarget).
         321  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         322  +
#[non_exhaustive]
         323  +
pub struct MaintenanceWindowTargetBuilder {
         324  +
    pub(crate) window_id: ::std::option::Option<::std::string::String>,
         325  +
    pub(crate) window_target_id: ::std::option::Option<::std::string::String>,
         326  +
    pub(crate) resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
         327  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         328  +
    pub(crate) owner_information: ::std::option::Option<::std::string::String>,
         329  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         330  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         331  +
}
         332  +
impl MaintenanceWindowTargetBuilder {
         333  +
    /// <p>The ID of the maintenance window to register the target with.</p>
         334  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         335  +
        self.window_id = ::std::option::Option::Some(input.into());
         336  +
        self
         337  +
    }
         338  +
    /// <p>The ID of the maintenance window to register the target with.</p>
         339  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         340  +
        self.window_id = input;
         341  +
        self
         342  +
    }
         343  +
    /// <p>The ID of the maintenance window to register the target with.</p>
         344  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         345  +
        &self.window_id
         346  +
    }
         347  +
    /// <p>The ID of the target.</p>
         348  +
    pub fn window_target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         349  +
        self.window_target_id = ::std::option::Option::Some(input.into());
         350  +
        self
         351  +
    }
         352  +
    /// <p>The ID of the target.</p>
         353  +
    pub fn set_window_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         354  +
        self.window_target_id = input;
         355  +
        self
         356  +
    }
         357  +
    /// <p>The ID of the target.</p>
         358  +
    pub fn get_window_target_id(&self) -> &::std::option::Option<::std::string::String> {
         359  +
        &self.window_target_id
         360  +
    }
         361  +
    /// <p>The type of target that is being registered with the maintenance window.</p>
         362  +
    pub fn resource_type(mut self, input: crate::types::MaintenanceWindowResourceType) -> Self {
         363  +
        self.resource_type = ::std::option::Option::Some(input);
         364  +
        self
         365  +
    }
         366  +
    /// <p>The type of target that is being registered with the maintenance window.</p>
         367  +
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowResourceType>) -> Self {
         368  +
        self.resource_type = input;
         369  +
        self
         370  +
    }
         371  +
    /// <p>The type of target that is being registered with the maintenance window.</p>
         372  +
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowResourceType> {
         373  +
        &self.resource_type
         374  +
    }
         375  +
    /// Appends an item to `targets`.
         376  +
    ///
         377  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         378  +
    ///
         379  +
    /// <p>The targets, either managed nodes or tags.</p>
         380  +
    /// <p>Specify managed nodes using the following format:</p>
         381  +
    /// <p><code>Key=instanceids,Values=<instanceid1>
         382  +
    /// ,
         383  +
    /// <instanceid2></instanceid2>
         384  +
    /// </instanceid1></code></p>
         385  +
    /// <p>Tags are specified using the following format:</p>
         386  +
    /// <p><code>Key=<tag name>
         387  +
    /// ,Values=
         388  +
    /// <tag value></tag>
         389  +
    /// </tag></code>.</p>
         390  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         391  +
        let mut v = self.targets.unwrap_or_default();
         392  +
        v.push(input);
         393  +
        self.targets = ::std::option::Option::Some(v);
         394  +
        self
         395  +
    }
         396  +
    /// <p>The targets, either managed nodes or tags.</p>
         397  +
    /// <p>Specify managed nodes using the following format:</p>
         398  +
    /// <p><code>Key=instanceids,Values=<instanceid1>
         399  +
    /// ,
         400  +
    /// <instanceid2></instanceid2>
         401  +
    /// </instanceid1></code></p>
         402  +
    /// <p>Tags are specified using the following format:</p>
         403  +
    /// <p><code>Key=<tag name>
         404  +
    /// ,Values=
         405  +
    /// <tag value></tag>
         406  +
    /// </tag></code>.</p>
         407  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         408  +
        self.targets = input;
         409  +
        self
         410  +
    }
         411  +
    /// <p>The targets, either managed nodes or tags.</p>
         412  +
    /// <p>Specify managed nodes using the following format:</p>
         413  +
    /// <p><code>Key=instanceids,Values=<instanceid1>
         414  +
    /// ,
         415  +
    /// <instanceid2></instanceid2>
         416  +
    /// </instanceid1></code></p>
         417  +
    /// <p>Tags are specified using the following format:</p>
         418  +
    /// <p><code>Key=<tag name>
         419  +
    /// ,Values=
         420  +
    /// <tag value></tag>
         421  +
    /// </tag></code>.</p>
         422  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         423  +
        &self.targets
         424  +
    }
         425  +
    /// <p>A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.</p>
         426  +
    pub fn owner_information(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         427  +
        self.owner_information = ::std::option::Option::Some(input.into());
         428  +
        self
         429  +
    }
         430  +
    /// <p>A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.</p>
         431  +
    pub fn set_owner_information(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         432  +
        self.owner_information = input;
         433  +
        self
         434  +
    }
         435  +
    /// <p>A user-provided value that will be included in any Amazon CloudWatch Events events that are raised while running tasks for these targets in this maintenance window.</p>
         436  +
    pub fn get_owner_information(&self) -> &::std::option::Option<::std::string::String> {
         437  +
        &self.owner_information
         438  +
    }
         439  +
    /// <p>The name for the maintenance window target.</p>
         440  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         441  +
        self.name = ::std::option::Option::Some(input.into());
         442  +
        self
         443  +
    }
         444  +
    /// <p>The name for the maintenance window target.</p>
         445  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         446  +
        self.name = input;
         447  +
        self
         448  +
    }
         449  +
    /// <p>The name for the maintenance window target.</p>
         450  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         451  +
        &self.name
         452  +
    }
         453  +
    /// <p>A description for the target.</p>
         454  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         455  +
        self.description = ::std::option::Option::Some(input.into());
         456  +
        self
         457  +
    }
         458  +
    /// <p>A description for the target.</p>
         459  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         460  +
        self.description = input;
         461  +
        self
         462  +
    }
         463  +
    /// <p>A description for the target.</p>
         464  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         465  +
        &self.description
         466  +
    }
         467  +
    /// Consumes the builder and constructs a [`MaintenanceWindowTarget`](crate::types::MaintenanceWindowTarget).
         468  +
    pub fn build(self) -> crate::types::MaintenanceWindowTarget {
         469  +
        crate::types::MaintenanceWindowTarget {
         470  +
            window_id: self.window_id,
         471  +
            window_target_id: self.window_target_id,
         472  +
            resource_type: self.resource_type,
         473  +
            targets: self.targets,
         474  +
            owner_information: self.owner_information,
         475  +
            name: self.name,
         476  +
            description: self.description,
         477  +
        }
         478  +
    }
         479  +
}
         480  +
impl ::std::fmt::Debug for MaintenanceWindowTargetBuilder {
         481  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         482  +
        let mut formatter = f.debug_struct("MaintenanceWindowTargetBuilder");
         483  +
        formatter.field("window_id", &self.window_id);
         484  +
        formatter.field("window_target_id", &self.window_target_id);
         485  +
        formatter.field("resource_type", &self.resource_type);
         486  +
        formatter.field("targets", &self.targets);
         487  +
        formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
         488  +
        formatter.field("name", &self.name);
         489  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         490  +
        formatter.finish()
         491  +
    }
         492  +
}

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

@@ -0,1 +0,951 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about a task defined for a maintenance window.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           6  +
pub struct MaintenanceWindowTask {
           7  +
    /// <p>The ID of the maintenance window where the task is registered.</p>
           8  +
    pub window_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The task ID.</p>
          10  +
    pub window_task_id: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p><note>
          12  +
    /// <p>Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid.</p>
          13  +
    /// </note>
          14  +
    pub task_arn: ::std::option::Option<::std::string::String>,
          15  +
    /// <p>The type of task.</p>
          16  +
    pub r#type: ::std::option::Option<crate::types::MaintenanceWindowTaskType>,
          17  +
    /// <p>The targets (either managed nodes or tags). Managed nodes are specified using <code>Key=instanceids,Values=<instanceid1>
          18  +
    /// ,
          19  +
    /// <instanceid2></instanceid2>
          20  +
    /// </instanceid1></code>. Tags are specified using <code>Key=<tag name>
          21  +
    /// ,Values=
          22  +
    /// <tag value></tag>
          23  +
    /// </tag></code>.</p>
          24  +
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
          25  +
    /// <p>The parameters that should be passed to the task when it is run.</p><note>
          26  +
    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
          27  +
    /// </note>
          28  +
    pub task_parameters:
          29  +
        ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
          30  +
    /// <p>The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
          31  +
    pub priority: i32,
          32  +
    /// <p>Information about an S3 bucket to write task-level logs to.</p><note>
          33  +
    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
          34  +
    /// </note>
          35  +
    pub logging_info: ::std::option::Option<crate::types::LoggingInfo>,
          36  +
    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
          37  +
    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          38  +
    pub service_role_arn: ::std::option::Option<::std::string::String>,
          39  +
    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
          40  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
          41  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
          42  +
    /// </note>
          43  +
    pub max_concurrency: ::std::option::Option<::std::string::String>,
          44  +
    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
          45  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
          46  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
          47  +
    /// </note>
          48  +
    pub max_errors: ::std::option::Option<::std::string::String>,
          49  +
    /// <p>The task name.</p>
          50  +
    pub name: ::std::option::Option<::std::string::String>,
          51  +
    /// <p>A description of the task.</p>
          52  +
    pub description: ::std::option::Option<::std::string::String>,
          53  +
    /// <p>The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
          54  +
    pub cutoff_behavior: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>,
          55  +
    /// <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
          56  +
    pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
          57  +
}
          58  +
impl MaintenanceWindowTask {
          59  +
    /// <p>The ID of the maintenance window where the task is registered.</p>
          60  +
    pub fn window_id(&self) -> ::std::option::Option<&str> {
          61  +
        self.window_id.as_deref()
          62  +
    }
          63  +
    /// <p>The task ID.</p>
          64  +
    pub fn window_task_id(&self) -> ::std::option::Option<&str> {
          65  +
        self.window_task_id.as_deref()
          66  +
    }
          67  +
    /// <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p><note>
          68  +
    /// <p>Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid.</p>
          69  +
    /// </note>
          70  +
    pub fn task_arn(&self) -> ::std::option::Option<&str> {
          71  +
        self.task_arn.as_deref()
          72  +
    }
          73  +
    /// <p>The type of task.</p>
          74  +
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowTaskType> {
          75  +
        self.r#type.as_ref()
          76  +
    }
          77  +
    /// <p>The targets (either managed nodes or tags). Managed nodes are specified using <code>Key=instanceids,Values=<instanceid1>
          78  +
    /// ,
          79  +
    /// <instanceid2></instanceid2>
          80  +
    /// </instanceid1></code>. Tags are specified using <code>Key=<tag name>
          81  +
    /// ,Values=
          82  +
    /// <tag value></tag>
          83  +
    /// </tag></code>.</p>
          84  +
    ///
          85  +
    /// 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()`.
          86  +
    pub fn targets(&self) -> &[crate::types::Target] {
          87  +
        self.targets.as_deref().unwrap_or_default()
          88  +
    }
          89  +
    /// <p>The parameters that should be passed to the task when it is run.</p><note>
          90  +
    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
          91  +
    /// </note>
          92  +
    pub fn task_parameters(
          93  +
        &self,
          94  +
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>> {
          95  +
        self.task_parameters.as_ref()
          96  +
    }
          97  +
    /// <p>The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
          98  +
    pub fn priority(&self) -> i32 {
          99  +
        self.priority
         100  +
    }
         101  +
    /// <p>Information about an S3 bucket to write task-level logs to.</p><note>
         102  +
    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         103  +
    /// </note>
         104  +
    pub fn logging_info(&self) -> ::std::option::Option<&crate::types::LoggingInfo> {
         105  +
        self.logging_info.as_ref()
         106  +
    }
         107  +
    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
         108  +
    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         109  +
    pub fn service_role_arn(&self) -> ::std::option::Option<&str> {
         110  +
        self.service_role_arn.as_deref()
         111  +
    }
         112  +
    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
         113  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         114  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         115  +
    /// </note>
         116  +
    pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
         117  +
        self.max_concurrency.as_deref()
         118  +
    }
         119  +
    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
         120  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         121  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         122  +
    /// </note>
         123  +
    pub fn max_errors(&self) -> ::std::option::Option<&str> {
         124  +
        self.max_errors.as_deref()
         125  +
    }
         126  +
    /// <p>The task name.</p>
         127  +
    pub fn name(&self) -> ::std::option::Option<&str> {
         128  +
        self.name.as_deref()
         129  +
    }
         130  +
    /// <p>A description of the task.</p>
         131  +
    pub fn description(&self) -> ::std::option::Option<&str> {
         132  +
        self.description.as_deref()
         133  +
    }
         134  +
    /// <p>The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
         135  +
    pub fn cutoff_behavior(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowTaskCutoffBehavior> {
         136  +
        self.cutoff_behavior.as_ref()
         137  +
    }
         138  +
    /// <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
         139  +
    pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
         140  +
        self.alarm_configuration.as_ref()
         141  +
    }
         142  +
}
         143  +
impl ::std::fmt::Debug for MaintenanceWindowTask {
         144  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         145  +
        let mut formatter = f.debug_struct("MaintenanceWindowTask");
         146  +
        formatter.field("window_id", &self.window_id);
         147  +
        formatter.field("window_task_id", &self.window_task_id);
         148  +
        formatter.field("task_arn", &self.task_arn);
         149  +
        formatter.field("r#type", &self.r#type);
         150  +
        formatter.field("targets", &self.targets);
         151  +
        formatter.field("task_parameters", &"*** Sensitive Data Redacted ***");
         152  +
        formatter.field("priority", &self.priority);
         153  +
        formatter.field("logging_info", &self.logging_info);
         154  +
        formatter.field("service_role_arn", &self.service_role_arn);
         155  +
        formatter.field("max_concurrency", &self.max_concurrency);
         156  +
        formatter.field("max_errors", &self.max_errors);
         157  +
        formatter.field("name", &self.name);
         158  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         159  +
        formatter.field("cutoff_behavior", &self.cutoff_behavior);
         160  +
        formatter.field("alarm_configuration", &self.alarm_configuration);
         161  +
        formatter.finish()
         162  +
    }
         163  +
}
         164  +
static MAINTENANCEWINDOWTASK_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         165  +
    ::aws_smithy_schema::ShapeId::from_parts(
         166  +
        "com.amazonaws.ssm#MaintenanceWindowTask$WindowId",
         167  +
        "com.amazonaws.ssm",
         168  +
        "MaintenanceWindowTask",
         169  +
    ),
         170  +
    ::aws_smithy_schema::ShapeType::String,
         171  +
    "WindowId",
         172  +
    0,
         173  +
);
         174  +
static MAINTENANCEWINDOWTASK_MEMBER_WINDOW_TASK_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         175  +
    ::aws_smithy_schema::ShapeId::from_parts(
         176  +
        "com.amazonaws.ssm#MaintenanceWindowTask$WindowTaskId",
         177  +
        "com.amazonaws.ssm",
         178  +
        "MaintenanceWindowTask",
         179  +
    ),
         180  +
    ::aws_smithy_schema::ShapeType::String,
         181  +
    "WindowTaskId",
         182  +
    1,
         183  +
);
         184  +
static MAINTENANCEWINDOWTASK_MEMBER_TASK_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         185  +
    ::aws_smithy_schema::ShapeId::from_parts(
         186  +
        "com.amazonaws.ssm#MaintenanceWindowTask$TaskArn",
         187  +
        "com.amazonaws.ssm",
         188  +
        "MaintenanceWindowTask",
         189  +
    ),
         190  +
    ::aws_smithy_schema::ShapeType::String,
         191  +
    "TaskArn",
         192  +
    2,
         193  +
);
         194  +
static MAINTENANCEWINDOWTASK_MEMBER_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         195  +
    ::aws_smithy_schema::ShapeId::from_parts(
         196  +
        "com.amazonaws.ssm#MaintenanceWindowTask$Type",
         197  +
        "com.amazonaws.ssm",
         198  +
        "MaintenanceWindowTask",
         199  +
    ),
         200  +
    ::aws_smithy_schema::ShapeType::String,
         201  +
    "Type",
         202  +
    3,
         203  +
);
         204  +
static MAINTENANCEWINDOWTASK_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         205  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
         206  +
    ::aws_smithy_schema::ShapeType::Structure,
         207  +
    "member",
         208  +
    0,
         209  +
);
         210  +
static MAINTENANCEWINDOWTASK_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         211  +
    ::aws_smithy_schema::ShapeId::from_parts(
         212  +
        "com.amazonaws.ssm#MaintenanceWindowTask$Targets",
         213  +
        "com.amazonaws.ssm",
         214  +
        "MaintenanceWindowTask",
         215  +
    ),
         216  +
    ::aws_smithy_schema::ShapeType::List,
         217  +
    "Targets",
         218  +
    4,
         219  +
)
         220  +
.with_list_member(&MAINTENANCEWINDOWTASK_MEMBER_TARGETS_MEMBER);
         221  +
static MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         222  +
    ::aws_smithy_schema::ShapeId::from_parts(
         223  +
        "com.amazonaws.ssm#MaintenanceWindowTaskParameters$key",
         224  +
        "com.amazonaws.ssm",
         225  +
        "MaintenanceWindowTaskParameters",
         226  +
    ),
         227  +
    ::aws_smithy_schema::ShapeType::String,
         228  +
    "key",
         229  +
    0,
         230  +
);
         231  +
static MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         232  +
    ::aws_smithy_schema::ShapeId::from_parts(
         233  +
        "com.amazonaws.ssm#MaintenanceWindowTaskParameters$value",
         234  +
        "com.amazonaws.ssm",
         235  +
        "MaintenanceWindowTaskParameters",
         236  +
    ),
         237  +
    ::aws_smithy_schema::ShapeType::Structure,
         238  +
    "value",
         239  +
    1,
         240  +
);
         241  +
static MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         242  +
    ::aws_smithy_schema::ShapeId::from_parts(
         243  +
        "com.amazonaws.ssm#MaintenanceWindowTask$TaskParameters",
         244  +
        "com.amazonaws.ssm",
         245  +
        "MaintenanceWindowTask",
         246  +
    ),
         247  +
    ::aws_smithy_schema::ShapeType::Map,
         248  +
    "TaskParameters",
         249  +
    5,
         250  +
)
         251  +
.with_map_members(
         252  +
    &MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS_KEY,
         253  +
    &MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS_VALUE,
         254  +
);
         255  +
static MAINTENANCEWINDOWTASK_MEMBER_PRIORITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         256  +
    ::aws_smithy_schema::ShapeId::from_parts(
         257  +
        "com.amazonaws.ssm#MaintenanceWindowTask$Priority",
         258  +
        "com.amazonaws.ssm",
         259  +
        "MaintenanceWindowTask",
         260  +
    ),
         261  +
    ::aws_smithy_schema::ShapeType::Integer,
         262  +
    "Priority",
         263  +
    6,
         264  +
);
         265  +
static MAINTENANCEWINDOWTASK_MEMBER_LOGGING_INFO: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         266  +
    ::aws_smithy_schema::ShapeId::from_parts(
         267  +
        "com.amazonaws.ssm#MaintenanceWindowTask$LoggingInfo",
         268  +
        "com.amazonaws.ssm",
         269  +
        "MaintenanceWindowTask",
         270  +
    ),
         271  +
    ::aws_smithy_schema::ShapeType::Structure,
         272  +
    "LoggingInfo",
         273  +
    7,
         274  +
);
         275  +
static MAINTENANCEWINDOWTASK_MEMBER_SERVICE_ROLE_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         276  +
    ::aws_smithy_schema::ShapeId::from_parts(
         277  +
        "com.amazonaws.ssm#MaintenanceWindowTask$ServiceRoleArn",
         278  +
        "com.amazonaws.ssm",
         279  +
        "MaintenanceWindowTask",
         280  +
    ),
         281  +
    ::aws_smithy_schema::ShapeType::String,
         282  +
    "ServiceRoleArn",
         283  +
    8,
         284  +
);
         285  +
static MAINTENANCEWINDOWTASK_MEMBER_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         286  +
    ::aws_smithy_schema::ShapeId::from_parts(
         287  +
        "com.amazonaws.ssm#MaintenanceWindowTask$MaxConcurrency",
         288  +
        "com.amazonaws.ssm",
         289  +
        "MaintenanceWindowTask",
         290  +
    ),
         291  +
    ::aws_smithy_schema::ShapeType::String,
         292  +
    "MaxConcurrency",
         293  +
    9,
         294  +
);
         295  +
static MAINTENANCEWINDOWTASK_MEMBER_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         296  +
    ::aws_smithy_schema::ShapeId::from_parts(
         297  +
        "com.amazonaws.ssm#MaintenanceWindowTask$MaxErrors",
         298  +
        "com.amazonaws.ssm",
         299  +
        "MaintenanceWindowTask",
         300  +
    ),
         301  +
    ::aws_smithy_schema::ShapeType::String,
         302  +
    "MaxErrors",
         303  +
    10,
         304  +
);
         305  +
static MAINTENANCEWINDOWTASK_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         306  +
    ::aws_smithy_schema::ShapeId::from_parts(
         307  +
        "com.amazonaws.ssm#MaintenanceWindowTask$Name",
         308  +
        "com.amazonaws.ssm",
         309  +
        "MaintenanceWindowTask",
         310  +
    ),
         311  +
    ::aws_smithy_schema::ShapeType::String,
         312  +
    "Name",
         313  +
    11,
         314  +
);
         315  +
static MAINTENANCEWINDOWTASK_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         316  +
    ::aws_smithy_schema::ShapeId::from_parts(
         317  +
        "com.amazonaws.ssm#MaintenanceWindowTask$Description",
         318  +
        "com.amazonaws.ssm",
         319  +
        "MaintenanceWindowTask",
         320  +
    ),
         321  +
    ::aws_smithy_schema::ShapeType::String,
         322  +
    "Description",
         323  +
    12,
         324  +
);
         325  +
static MAINTENANCEWINDOWTASK_MEMBER_CUTOFF_BEHAVIOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         326  +
    ::aws_smithy_schema::ShapeId::from_parts(
         327  +
        "com.amazonaws.ssm#MaintenanceWindowTask$CutoffBehavior",
         328  +
        "com.amazonaws.ssm",
         329  +
        "MaintenanceWindowTask",
         330  +
    ),
         331  +
    ::aws_smithy_schema::ShapeType::String,
         332  +
    "CutoffBehavior",
         333  +
    13,
         334  +
);
         335  +
static MAINTENANCEWINDOWTASK_MEMBER_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         336  +
    ::aws_smithy_schema::ShapeId::from_parts(
         337  +
        "com.amazonaws.ssm#MaintenanceWindowTask$AlarmConfiguration",
         338  +
        "com.amazonaws.ssm",
         339  +
        "MaintenanceWindowTask",
         340  +
    ),
         341  +
    ::aws_smithy_schema::ShapeType::Structure,
         342  +
    "AlarmConfiguration",
         343  +
    14,
         344  +
);
         345  +
static MAINTENANCEWINDOWTASK_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         346  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MaintenanceWindowTask", "com.amazonaws.ssm", "MaintenanceWindowTask"),
         347  +
    ::aws_smithy_schema::ShapeType::Structure,
         348  +
    &[
         349  +
        &MAINTENANCEWINDOWTASK_MEMBER_WINDOW_ID,
         350  +
        &MAINTENANCEWINDOWTASK_MEMBER_WINDOW_TASK_ID,
         351  +
        &MAINTENANCEWINDOWTASK_MEMBER_TASK_ARN,
         352  +
        &MAINTENANCEWINDOWTASK_MEMBER_TYPE,
         353  +
        &MAINTENANCEWINDOWTASK_MEMBER_TARGETS,
         354  +
        &MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS,
         355  +
        &MAINTENANCEWINDOWTASK_MEMBER_PRIORITY,
         356  +
        &MAINTENANCEWINDOWTASK_MEMBER_LOGGING_INFO,
         357  +
        &MAINTENANCEWINDOWTASK_MEMBER_SERVICE_ROLE_ARN,
         358  +
        &MAINTENANCEWINDOWTASK_MEMBER_MAX_CONCURRENCY,
         359  +
        &MAINTENANCEWINDOWTASK_MEMBER_MAX_ERRORS,
         360  +
        &MAINTENANCEWINDOWTASK_MEMBER_NAME,
         361  +
        &MAINTENANCEWINDOWTASK_MEMBER_DESCRIPTION,
         362  +
        &MAINTENANCEWINDOWTASK_MEMBER_CUTOFF_BEHAVIOR,
         363  +
        &MAINTENANCEWINDOWTASK_MEMBER_ALARM_CONFIGURATION,
         364  +
    ],
         365  +
);
         366  +
impl MaintenanceWindowTask {
         367  +
    /// The schema for this shape.
         368  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWTASK_SCHEMA;
         369  +
}
         370  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowTask {
         371  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         372  +
    fn serialize_members(
         373  +
        &self,
         374  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         375  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         376  +
        if let Some(ref val) = self.window_id {
         377  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_WINDOW_ID, val)?;
         378  +
        }
         379  +
        if let Some(ref val) = self.window_task_id {
         380  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_WINDOW_TASK_ID, val)?;
         381  +
        }
         382  +
        if let Some(ref val) = self.task_arn {
         383  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_TASK_ARN, val)?;
         384  +
        }
         385  +
        if let Some(ref val) = self.r#type {
         386  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_TYPE, val.as_str())?;
         387  +
        }
         388  +
        if let Some(ref val) = self.targets {
         389  +
            ser.write_list(
         390  +
                &MAINTENANCEWINDOWTASK_MEMBER_TARGETS,
         391  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         392  +
                    for item in val {
         393  +
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
         394  +
                    }
         395  +
                    Ok(())
         396  +
                },
         397  +
            )?;
         398  +
        }
         399  +
        if let Some(ref val) = self.task_parameters {
         400  +
            ser.write_map(
         401  +
                &MAINTENANCEWINDOWTASK_MEMBER_TASK_PARAMETERS,
         402  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         403  +
                    for (key, value) in val {
         404  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         405  +
                        ser.write_struct(crate::types::MaintenanceWindowTaskParameterValueExpression::SCHEMA, value)?;
         406  +
                    }
         407  +
                    Ok(())
         408  +
                },
         409  +
            )?;
         410  +
        }
         411  +
        {
         412  +
            let val = &self.priority;
         413  +
            ser.write_integer(&MAINTENANCEWINDOWTASK_MEMBER_PRIORITY, *val)?;
         414  +
        }
         415  +
        if let Some(ref val) = self.logging_info {
         416  +
            ser.write_struct(&MAINTENANCEWINDOWTASK_MEMBER_LOGGING_INFO, val)?;
         417  +
        }
         418  +
        if let Some(ref val) = self.service_role_arn {
         419  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_SERVICE_ROLE_ARN, val)?;
         420  +
        }
         421  +
        if let Some(ref val) = self.max_concurrency {
         422  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_MAX_CONCURRENCY, val)?;
         423  +
        }
         424  +
        if let Some(ref val) = self.max_errors {
         425  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_MAX_ERRORS, val)?;
         426  +
        }
         427  +
        if let Some(ref val) = self.name {
         428  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_NAME, val)?;
         429  +
        }
         430  +
        if let Some(ref val) = self.description {
         431  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_DESCRIPTION, val)?;
         432  +
        }
         433  +
        if let Some(ref val) = self.cutoff_behavior {
         434  +
            ser.write_string(&MAINTENANCEWINDOWTASK_MEMBER_CUTOFF_BEHAVIOR, val.as_str())?;
         435  +
        }
         436  +
        if let Some(ref val) = self.alarm_configuration {
         437  +
            ser.write_struct(&MAINTENANCEWINDOWTASK_MEMBER_ALARM_CONFIGURATION, val)?;
         438  +
        }
         439  +
        Ok(())
         440  +
    }
         441  +
}
         442  +
impl MaintenanceWindowTask {
         443  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         444  +
    pub fn deserialize(
         445  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         446  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         447  +
        #[allow(unused_variables, unused_mut)]
         448  +
        let mut builder = Self::builder();
         449  +
        #[allow(
         450  +
            unused_variables,
         451  +
            unreachable_code,
         452  +
            clippy::single_match,
         453  +
            clippy::match_single_binding,
         454  +
            clippy::diverging_sub_expression
         455  +
        )]
         456  +
        deserializer.read_struct(&MAINTENANCEWINDOWTASK_SCHEMA, &mut |member, deser| {
         457  +
            match member.member_index() {
         458  +
                Some(0) => {
         459  +
                    if deser.is_null() {
         460  +
                        deser.read_null()?;
         461  +
                    } else {
         462  +
                        builder.window_id = Some(deser.read_string(member)?);
         463  +
                    }
         464  +
                }
         465  +
                Some(1) => {
         466  +
                    if deser.is_null() {
         467  +
                        deser.read_null()?;
         468  +
                    } else {
         469  +
                        builder.window_task_id = Some(deser.read_string(member)?);
         470  +
                    }
         471  +
                }
         472  +
                Some(2) => {
         473  +
                    if deser.is_null() {
         474  +
                        deser.read_null()?;
         475  +
                    } else {
         476  +
                        builder.task_arn = Some(deser.read_string(member)?);
         477  +
                    }
         478  +
                }
         479  +
                Some(3) => {
         480  +
                    if deser.is_null() {
         481  +
                        deser.read_null()?;
         482  +
                    } else {
         483  +
                        builder.r#type = Some(crate::types::MaintenanceWindowTaskType::from(deser.read_string(member)?.as_str()));
         484  +
                    }
         485  +
                }
         486  +
                Some(4) => {
         487  +
                    if deser.is_null() {
         488  +
                        deser.read_null()?;
         489  +
                    } else {
         490  +
                        builder.targets = Some({
         491  +
                            let mut container = Vec::new();
         492  +
                            deser.read_list(member, &mut |deser| {
         493  +
                                container.push(crate::types::Target::deserialize(deser)?);
         494  +
                                Ok(())
         495  +
                            })?;
         496  +
                            container
         497  +
                        });
         498  +
                    }
         499  +
                }
         500  +
                Some(5) => {
         501  +
                    if deser.is_null() {
         502  +
                        deser.read_null()?;
         503  +
                    } else {
         504  +
                        builder.task_parameters = Some({
         505  +
                            let mut container = std::collections::HashMap::new();
         506  +
                            deser.read_map(member, &mut |key, deser| {
         507  +
                                container.insert(key, crate::types::MaintenanceWindowTaskParameterValueExpression::deserialize(deser)?);
         508  +
                                Ok(())
         509  +
                            })?;
         510  +
                            container
         511  +
                        });
         512  +
                    }
         513  +
                }
         514  +
                Some(6) => {
         515  +
                    builder.priority = Some(deser.read_integer(member)?);
         516  +
                }
         517  +
                Some(7) => {
         518  +
                    if deser.is_null() {
         519  +
                        deser.read_null()?;
         520  +
                    } else {
         521  +
                        builder.logging_info = Some(crate::types::LoggingInfo::deserialize(deser)?);
         522  +
                    }
         523  +
                }
         524  +
                Some(8) => {
         525  +
                    if deser.is_null() {
         526  +
                        deser.read_null()?;
         527  +
                    } else {
         528  +
                        builder.service_role_arn = Some(deser.read_string(member)?);
         529  +
                    }
         530  +
                }
         531  +
                Some(9) => {
         532  +
                    if deser.is_null() {
         533  +
                        deser.read_null()?;
         534  +
                    } else {
         535  +
                        builder.max_concurrency = Some(deser.read_string(member)?);
         536  +
                    }
         537  +
                }
         538  +
                Some(10) => {
         539  +
                    if deser.is_null() {
         540  +
                        deser.read_null()?;
         541  +
                    } else {
         542  +
                        builder.max_errors = Some(deser.read_string(member)?);
         543  +
                    }
         544  +
                }
         545  +
                Some(11) => {
         546  +
                    if deser.is_null() {
         547  +
                        deser.read_null()?;
         548  +
                    } else {
         549  +
                        builder.name = Some(deser.read_string(member)?);
         550  +
                    }
         551  +
                }
         552  +
                Some(12) => {
         553  +
                    if deser.is_null() {
         554  +
                        deser.read_null()?;
         555  +
                    } else {
         556  +
                        builder.description = Some(deser.read_string(member)?);
         557  +
                    }
         558  +
                }
         559  +
                Some(13) => {
         560  +
                    if deser.is_null() {
         561  +
                        deser.read_null()?;
         562  +
                    } else {
         563  +
                        builder.cutoff_behavior = Some(crate::types::MaintenanceWindowTaskCutoffBehavior::from(
         564  +
                            deser.read_string(member)?.as_str(),
         565  +
                        ));
         566  +
                    }
         567  +
                }
         568  +
                Some(14) => {
         569  +
                    if deser.is_null() {
         570  +
                        deser.read_null()?;
         571  +
                    } else {
         572  +
                        builder.alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
         573  +
                    }
         574  +
                }
         575  +
                _ => {}
         576  +
            }
         577  +
            Ok(())
         578  +
        })?;
         579  +
        Ok(builder.build())
         580  +
    }
         581  +
}
         582  +
impl MaintenanceWindowTask {
         583  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         584  +
    pub fn deserialize_with_response(
         585  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         586  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         587  +
        _status: u16,
         588  +
        _body: &[u8],
         589  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         590  +
        Self::deserialize(deserializer)
         591  +
    }
         592  +
}
         593  +
impl MaintenanceWindowTask {
         594  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowTask`](crate::types::MaintenanceWindowTask).
         595  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowTaskBuilder {
         596  +
        crate::types::builders::MaintenanceWindowTaskBuilder::default()
         597  +
    }
         598  +
}
         599  +
         600  +
/// A builder for [`MaintenanceWindowTask`](crate::types::MaintenanceWindowTask).
         601  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         602  +
#[non_exhaustive]
         603  +
pub struct MaintenanceWindowTaskBuilder {
         604  +
    pub(crate) window_id: ::std::option::Option<::std::string::String>,
         605  +
    pub(crate) window_task_id: ::std::option::Option<::std::string::String>,
         606  +
    pub(crate) task_arn: ::std::option::Option<::std::string::String>,
         607  +
    pub(crate) r#type: ::std::option::Option<crate::types::MaintenanceWindowTaskType>,
         608  +
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
         609  +
    pub(crate) task_parameters:
         610  +
        ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
         611  +
    pub(crate) priority: ::std::option::Option<i32>,
         612  +
    pub(crate) logging_info: ::std::option::Option<crate::types::LoggingInfo>,
         613  +
    pub(crate) service_role_arn: ::std::option::Option<::std::string::String>,
         614  +
    pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
         615  +
    pub(crate) max_errors: ::std::option::Option<::std::string::String>,
         616  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         617  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         618  +
    pub(crate) cutoff_behavior: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>,
         619  +
    pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
         620  +
}
         621  +
impl MaintenanceWindowTaskBuilder {
         622  +
    /// <p>The ID of the maintenance window where the task is registered.</p>
         623  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         624  +
        self.window_id = ::std::option::Option::Some(input.into());
         625  +
        self
         626  +
    }
         627  +
    /// <p>The ID of the maintenance window where the task is registered.</p>
         628  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         629  +
        self.window_id = input;
         630  +
        self
         631  +
    }
         632  +
    /// <p>The ID of the maintenance window where the task is registered.</p>
         633  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         634  +
        &self.window_id
         635  +
    }
         636  +
    /// <p>The task ID.</p>
         637  +
    pub fn window_task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         638  +
        self.window_task_id = ::std::option::Option::Some(input.into());
         639  +
        self
         640  +
    }
         641  +
    /// <p>The task ID.</p>
         642  +
    pub fn set_window_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         643  +
        self.window_task_id = input;
         644  +
        self
         645  +
    }
         646  +
    /// <p>The task ID.</p>
         647  +
    pub fn get_window_task_id(&self) -> &::std::option::Option<::std::string::String> {
         648  +
        &self.window_task_id
         649  +
    }
         650  +
    /// <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p><note>
         651  +
    /// <p>Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid.</p>
         652  +
    /// </note>
         653  +
    pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         654  +
        self.task_arn = ::std::option::Option::Some(input.into());
         655  +
        self
         656  +
    }
         657  +
    /// <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p><note>
         658  +
    /// <p>Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid.</p>
         659  +
    /// </note>
         660  +
    pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         661  +
        self.task_arn = input;
         662  +
        self
         663  +
    }
         664  +
    /// <p>The resource that the task uses during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, <code>TaskArn</code> is the Amazon Web Services Systems Manager (SSM document) name or ARN. For <code>LAMBDA</code> tasks, it's the function name or ARN. For <code>STEP_FUNCTIONS</code> tasks, it's the state machine ARN.</p><note>
         665  +
    /// <p>Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid.</p>
         666  +
    /// </note>
         667  +
    pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
         668  +
        &self.task_arn
         669  +
    }
         670  +
    /// <p>The type of task.</p>
         671  +
    pub fn r#type(mut self, input: crate::types::MaintenanceWindowTaskType) -> Self {
         672  +
        self.r#type = ::std::option::Option::Some(input);
         673  +
        self
         674  +
    }
         675  +
    /// <p>The type of task.</p>
         676  +
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskType>) -> Self {
         677  +
        self.r#type = input;
         678  +
        self
         679  +
    }
         680  +
    /// <p>The type of task.</p>
         681  +
    pub fn get_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskType> {
         682  +
        &self.r#type
         683  +
    }
         684  +
    /// Appends an item to `targets`.
         685  +
    ///
         686  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         687  +
    ///
         688  +
    /// <p>The targets (either managed nodes or tags). Managed nodes are specified using <code>Key=instanceids,Values=<instanceid1>
         689  +
    /// ,
         690  +
    /// <instanceid2></instanceid2>
         691  +
    /// </instanceid1></code>. Tags are specified using <code>Key=<tag name>
         692  +
    /// ,Values=
         693  +
    /// <tag value></tag>
         694  +
    /// </tag></code>.</p>
         695  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         696  +
        let mut v = self.targets.unwrap_or_default();
         697  +
        v.push(input);
         698  +
        self.targets = ::std::option::Option::Some(v);
         699  +
        self
         700  +
    }
         701  +
    /// <p>The targets (either managed nodes or tags). Managed nodes are specified using <code>Key=instanceids,Values=<instanceid1>
         702  +
    /// ,
         703  +
    /// <instanceid2></instanceid2>
         704  +
    /// </instanceid1></code>. Tags are specified using <code>Key=<tag name>
         705  +
    /// ,Values=
         706  +
    /// <tag value></tag>
         707  +
    /// </tag></code>.</p>
         708  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         709  +
        self.targets = input;
         710  +
        self
         711  +
    }
         712  +
    /// <p>The targets (either managed nodes or tags). Managed nodes are specified using <code>Key=instanceids,Values=<instanceid1>
         713  +
    /// ,
         714  +
    /// <instanceid2></instanceid2>
         715  +
    /// </instanceid1></code>. Tags are specified using <code>Key=<tag name>
         716  +
    /// ,Values=
         717  +
    /// <tag value></tag>
         718  +
    /// </tag></code>.</p>
         719  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         720  +
        &self.targets
         721  +
    }
         722  +
    /// Adds a key-value pair to `task_parameters`.
         723  +
    ///
         724  +
    /// To override the contents of this collection use [`set_task_parameters`](Self::set_task_parameters).
         725  +
    ///
         726  +
    /// <p>The parameters that should be passed to the task when it is run.</p><note>
         727  +
    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         728  +
    /// </note>
         729  +
    pub fn task_parameters(
         730  +
        mut self,
         731  +
        k: impl ::std::convert::Into<::std::string::String>,
         732  +
        v: crate::types::MaintenanceWindowTaskParameterValueExpression,
         733  +
    ) -> Self {
         734  +
        let mut hash_map = self.task_parameters.unwrap_or_default();
         735  +
        hash_map.insert(k.into(), v);
         736  +
        self.task_parameters = ::std::option::Option::Some(hash_map);
         737  +
        self
         738  +
    }
         739  +
    /// <p>The parameters that should be passed to the task when it is run.</p><note>
         740  +
    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         741  +
    /// </note>
         742  +
    pub fn set_task_parameters(
         743  +
        mut self,
         744  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
         745  +
    ) -> Self {
         746  +
        self.task_parameters = input;
         747  +
        self
         748  +
    }
         749  +
    /// <p>The parameters that should be passed to the task when it is run.</p><note>
         750  +
    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         751  +
    /// </note>
         752  +
    pub fn get_task_parameters(
         753  +
        &self,
         754  +
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>> {
         755  +
        &self.task_parameters
         756  +
    }
         757  +
    /// <p>The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
         758  +
    pub fn priority(mut self, input: i32) -> Self {
         759  +
        self.priority = ::std::option::Option::Some(input);
         760  +
        self
         761  +
    }
         762  +
    /// <p>The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
         763  +
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
         764  +
        self.priority = input;
         765  +
        self
         766  +
    }
         767  +
    /// <p>The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
         768  +
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
         769  +
        &self.priority
         770  +
    }
         771  +
    /// <p>Information about an S3 bucket to write task-level logs to.</p><note>
         772  +
    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         773  +
    /// </note>
         774  +
    pub fn logging_info(mut self, input: crate::types::LoggingInfo) -> Self {
         775  +
        self.logging_info = ::std::option::Option::Some(input);
         776  +
        self
         777  +
    }
         778  +
    /// <p>Information about an S3 bucket to write task-level logs to.</p><note>
         779  +
    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         780  +
    /// </note>
         781  +
    pub fn set_logging_info(mut self, input: ::std::option::Option<crate::types::LoggingInfo>) -> Self {
         782  +
        self.logging_info = input;
         783  +
        self
         784  +
    }
         785  +
    /// <p>Information about an S3 bucket to write task-level logs to.</p><note>
         786  +
    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
         787  +
    /// </note>
         788  +
    pub fn get_logging_info(&self) -> &::std::option::Option<crate::types::LoggingInfo> {
         789  +
        &self.logging_info
         790  +
    }
         791  +
    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
         792  +
    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         793  +
    pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         794  +
        self.service_role_arn = ::std::option::Option::Some(input.into());
         795  +
        self
         796  +
    }
         797  +
    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
         798  +
    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         799  +
    pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         800  +
        self.service_role_arn = input;
         801  +
        self
         802  +
    }
         803  +
    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
         804  +
    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         805  +
    pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
         806  +
        &self.service_role_arn
         807  +
    }
         808  +
    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
         809  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         810  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         811  +
    /// </note>
         812  +
    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         813  +
        self.max_concurrency = ::std::option::Option::Some(input.into());
         814  +
        self
         815  +
    }
         816  +
    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
         817  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         818  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         819  +
    /// </note>
         820  +
    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         821  +
        self.max_concurrency = input;
         822  +
        self
         823  +
    }
         824  +
    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
         825  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         826  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         827  +
    /// </note>
         828  +
    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
         829  +
        &self.max_concurrency
         830  +
    }
         831  +
    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
         832  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         833  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         834  +
    /// </note>
         835  +
    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         836  +
        self.max_errors = ::std::option::Option::Some(input.into());
         837  +
        self
         838  +
    }
         839  +
    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
         840  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         841  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         842  +
    /// </note>
         843  +
    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         844  +
        self.max_errors = input;
         845  +
        self
         846  +
    }
         847  +
    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
         848  +
    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
         849  +
    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
         850  +
    /// </note>
         851  +
    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
         852  +
        &self.max_errors
         853  +
    }
         854  +
    /// <p>The task name.</p>
         855  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         856  +
        self.name = ::std::option::Option::Some(input.into());
         857  +
        self
         858  +
    }
         859  +
    /// <p>The task name.</p>
         860  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         861  +
        self.name = input;
         862  +
        self
         863  +
    }
         864  +
    /// <p>The task name.</p>
         865  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         866  +
        &self.name
         867  +
    }
         868  +
    /// <p>A description of the task.</p>
         869  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         870  +
        self.description = ::std::option::Option::Some(input.into());
         871  +
        self
         872  +
    }
         873  +
    /// <p>A description of the task.</p>
         874  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         875  +
        self.description = input;
         876  +
        self
         877  +
    }
         878  +
    /// <p>A description of the task.</p>
         879  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         880  +
        &self.description
         881  +
    }
         882  +
    /// <p>The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
         883  +
    pub fn cutoff_behavior(mut self, input: crate::types::MaintenanceWindowTaskCutoffBehavior) -> Self {
         884  +
        self.cutoff_behavior = ::std::option::Option::Some(input);
         885  +
        self
         886  +
    }
         887  +
    /// <p>The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
         888  +
    pub fn set_cutoff_behavior(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>) -> Self {
         889  +
        self.cutoff_behavior = input;
         890  +
        self
         891  +
    }
         892  +
    /// <p>The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
         893  +
    pub fn get_cutoff_behavior(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior> {
         894  +
        &self.cutoff_behavior
         895  +
    }
         896  +
    /// <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
         897  +
    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
         898  +
        self.alarm_configuration = ::std::option::Option::Some(input);
         899  +
        self
         900  +
    }
         901  +
    /// <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
         902  +
    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
         903  +
        self.alarm_configuration = input;
         904  +
        self
         905  +
    }
         906  +
    /// <p>The details for the CloudWatch alarm applied to your maintenance window task.</p>
         907  +
    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
         908  +
        &self.alarm_configuration
         909  +
    }
         910  +
    /// Consumes the builder and constructs a [`MaintenanceWindowTask`](crate::types::MaintenanceWindowTask).
         911  +
    pub fn build(self) -> crate::types::MaintenanceWindowTask {
         912  +
        crate::types::MaintenanceWindowTask {
         913  +
            window_id: self.window_id,
         914  +
            window_task_id: self.window_task_id,
         915  +
            task_arn: self.task_arn,
         916  +
            r#type: self.r#type,
         917  +
            targets: self.targets,
         918  +
            task_parameters: self.task_parameters,
         919  +
            priority: self.priority.unwrap_or_default(),
         920  +
            logging_info: self.logging_info,
         921  +
            service_role_arn: self.service_role_arn,
         922  +
            max_concurrency: self.max_concurrency,
         923  +
            max_errors: self.max_errors,
         924  +
            name: self.name,
         925  +
            description: self.description,
         926  +
            cutoff_behavior: self.cutoff_behavior,
         927  +
            alarm_configuration: self.alarm_configuration,
         928  +
        }
         929  +
    }
         930  +
}
         931  +
impl ::std::fmt::Debug for MaintenanceWindowTaskBuilder {
         932  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         933  +
        let mut formatter = f.debug_struct("MaintenanceWindowTaskBuilder");
         934  +
        formatter.field("window_id", &self.window_id);
         935  +
        formatter.field("window_task_id", &self.window_task_id);
         936  +
        formatter.field("task_arn", &self.task_arn);
         937  +
        formatter.field("r#type", &self.r#type);
         938  +
        formatter.field("targets", &self.targets);
         939  +
        formatter.field("task_parameters", &"*** Sensitive Data Redacted ***");
         940  +
        formatter.field("priority", &self.priority);
         941  +
        formatter.field("logging_info", &self.logging_info);
         942  +
        formatter.field("service_role_arn", &self.service_role_arn);
         943  +
        formatter.field("max_concurrency", &self.max_concurrency);
         944  +
        formatter.field("max_errors", &self.max_errors);
         945  +
        formatter.field("name", &self.name);
         946  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         947  +
        formatter.field("cutoff_behavior", &self.cutoff_behavior);
         948  +
        formatter.field("alarm_configuration", &self.alarm_configuration);
         949  +
        formatter.finish()
         950  +
    }
         951  +
}