AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,209 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Filter used in the request. Supported filter keys depend on the API operation that includes the filter. API operations that use <code>MaintenanceWindowFilter&gt;</code> include the following:</p>
           4  +
/// <ul>
           5  +
/// <li>
           6  +
/// <p><code>DescribeMaintenanceWindowExecutions</code></p></li>
           7  +
/// <li>
           8  +
/// <p><code>DescribeMaintenanceWindowExecutionTaskInvocations</code></p></li>
           9  +
/// <li>
          10  +
/// <p><code>DescribeMaintenanceWindowExecutionTasks</code></p></li>
          11  +
/// <li>
          12  +
/// <p><code>DescribeMaintenanceWindows</code></p></li>
          13  +
/// <li>
          14  +
/// <p><code>DescribeMaintenanceWindowTargets</code></p></li>
          15  +
/// <li>
          16  +
/// <p><code>DescribeMaintenanceWindowTasks</code></p></li>
          17  +
/// </ul>
          18  +
#[non_exhaustive]
          19  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          20  +
pub struct MaintenanceWindowFilter {
          21  +
    /// <p>The name of the filter.</p>
          22  +
    pub key: ::std::option::Option<::std::string::String>,
          23  +
    /// <p>The filter values.</p>
          24  +
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          25  +
}
          26  +
impl MaintenanceWindowFilter {
          27  +
    /// <p>The name of the filter.</p>
          28  +
    pub fn key(&self) -> ::std::option::Option<&str> {
          29  +
        self.key.as_deref()
          30  +
    }
          31  +
    /// <p>The filter values.</p>
          32  +
    ///
          33  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          34  +
    pub fn values(&self) -> &[::std::string::String] {
          35  +
        self.values.as_deref().unwrap_or_default()
          36  +
    }
          37  +
}
          38  +
static MAINTENANCEWINDOWFILTER_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts(
          40  +
        "com.amazonaws.ssm#MaintenanceWindowFilter$Key",
          41  +
        "com.amazonaws.ssm",
          42  +
        "MaintenanceWindowFilter",
          43  +
    ),
          44  +
    ::aws_smithy_schema::ShapeType::String,
          45  +
    "Key",
          46  +
    0,
          47  +
);
          48  +
static MAINTENANCEWINDOWFILTER_MEMBER_VALUES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_parts(
          50  +
        "com.amazonaws.ssm#MaintenanceWindowFilterValues$member",
          51  +
        "com.amazonaws.ssm",
          52  +
        "MaintenanceWindowFilterValues",
          53  +
    ),
          54  +
    ::aws_smithy_schema::ShapeType::String,
          55  +
    "member",
          56  +
    0,
          57  +
);
          58  +
static MAINTENANCEWINDOWFILTER_MEMBER_VALUES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          59  +
    ::aws_smithy_schema::ShapeId::from_parts(
          60  +
        "com.amazonaws.ssm#MaintenanceWindowFilter$Values",
          61  +
        "com.amazonaws.ssm",
          62  +
        "MaintenanceWindowFilter",
          63  +
    ),
          64  +
    ::aws_smithy_schema::ShapeType::List,
          65  +
    "Values",
          66  +
    1,
          67  +
)
          68  +
.with_list_member(&MAINTENANCEWINDOWFILTER_MEMBER_VALUES_MEMBER);
          69  +
static MAINTENANCEWINDOWFILTER_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          70  +
    ::aws_smithy_schema::ShapeId::from_parts(
          71  +
        "com.amazonaws.ssm#MaintenanceWindowFilter",
          72  +
        "com.amazonaws.ssm",
          73  +
        "MaintenanceWindowFilter",
          74  +
    ),
          75  +
    ::aws_smithy_schema::ShapeType::Structure,
          76  +
    &[&MAINTENANCEWINDOWFILTER_MEMBER_KEY, &MAINTENANCEWINDOWFILTER_MEMBER_VALUES],
          77  +
);
          78  +
impl MaintenanceWindowFilter {
          79  +
    /// The schema for this shape.
          80  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWFILTER_SCHEMA;
          81  +
}
          82  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowFilter {
          83  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          84  +
    fn serialize_members(
          85  +
        &self,
          86  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          87  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          88  +
        if let Some(ref val) = self.key {
          89  +
            ser.write_string(&MAINTENANCEWINDOWFILTER_MEMBER_KEY, val)?;
          90  +
        }
          91  +
        if let Some(ref val) = self.values {
          92  +
            ser.write_list(
          93  +
                &MAINTENANCEWINDOWFILTER_MEMBER_VALUES,
          94  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
          95  +
                    for item in val {
          96  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
          97  +
                    }
          98  +
                    Ok(())
          99  +
                },
         100  +
            )?;
         101  +
        }
         102  +
        Ok(())
         103  +
    }
         104  +
}
         105  +
impl MaintenanceWindowFilter {
         106  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         107  +
    pub fn deserialize(
         108  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        #[allow(unused_variables, unused_mut)]
         111  +
        let mut builder = Self::builder();
         112  +
        #[allow(
         113  +
            unused_variables,
         114  +
            unreachable_code,
         115  +
            clippy::single_match,
         116  +
            clippy::match_single_binding,
         117  +
            clippy::diverging_sub_expression
         118  +
        )]
         119  +
        deserializer.read_struct(&MAINTENANCEWINDOWFILTER_SCHEMA, &mut |member, deser| {
         120  +
            match member.member_index() {
         121  +
                Some(0) => {
         122  +
                    if deser.is_null() {
         123  +
                        deser.read_null()?;
         124  +
                    } else {
         125  +
                        builder.key = Some(deser.read_string(member)?);
         126  +
                    }
         127  +
                }
         128  +
                Some(1) => {
         129  +
                    if deser.is_null() {
         130  +
                        deser.read_null()?;
         131  +
                    } else {
         132  +
                        builder.values = Some(deser.read_string_list(member)?);
         133  +
                    }
         134  +
                }
         135  +
                _ => {}
         136  +
            }
         137  +
            Ok(())
         138  +
        })?;
         139  +
        Ok(builder.build())
         140  +
    }
         141  +
}
         142  +
impl MaintenanceWindowFilter {
         143  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         144  +
    pub fn deserialize_with_response(
         145  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         146  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         147  +
        _status: u16,
         148  +
        _body: &[u8],
         149  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         150  +
        Self::deserialize(deserializer)
         151  +
    }
         152  +
}
         153  +
impl MaintenanceWindowFilter {
         154  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowFilter`](crate::types::MaintenanceWindowFilter).
         155  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowFilterBuilder {
         156  +
        crate::types::builders::MaintenanceWindowFilterBuilder::default()
         157  +
    }
         158  +
}
         159  +
         160  +
/// A builder for [`MaintenanceWindowFilter`](crate::types::MaintenanceWindowFilter).
         161  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         162  +
#[non_exhaustive]
         163  +
pub struct MaintenanceWindowFilterBuilder {
         164  +
    pub(crate) key: ::std::option::Option<::std::string::String>,
         165  +
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         166  +
}
         167  +
impl MaintenanceWindowFilterBuilder {
         168  +
    /// <p>The name of the filter.</p>
         169  +
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         170  +
        self.key = ::std::option::Option::Some(input.into());
         171  +
        self
         172  +
    }
         173  +
    /// <p>The name of the filter.</p>
         174  +
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         175  +
        self.key = input;
         176  +
        self
         177  +
    }
         178  +
    /// <p>The name of the filter.</p>
         179  +
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
         180  +
        &self.key
         181  +
    }
         182  +
    /// Appends an item to `values`.
         183  +
    ///
         184  +
    /// To override the contents of this collection use [`set_values`](Self::set_values).
         185  +
    ///
         186  +
    /// <p>The filter values.</p>
         187  +
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         188  +
        let mut v = self.values.unwrap_or_default();
         189  +
        v.push(input.into());
         190  +
        self.values = ::std::option::Option::Some(v);
         191  +
        self
         192  +
    }
         193  +
    /// <p>The filter values.</p>
         194  +
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         195  +
        self.values = input;
         196  +
        self
         197  +
    }
         198  +
    /// <p>The filter values.</p>
         199  +
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         200  +
        &self.values
         201  +
    }
         202  +
    /// Consumes the builder and constructs a [`MaintenanceWindowFilter`](crate::types::MaintenanceWindowFilter).
         203  +
    pub fn build(self) -> crate::types::MaintenanceWindowFilter {
         204  +
        crate::types::MaintenanceWindowFilter {
         205  +
            key: self.key,
         206  +
            values: self.values,
         207  +
        }
         208  +
    }
         209  +
}

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

@@ -0,1 +0,631 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Information about the maintenance window.</p>
           4  +
#[non_exhaustive]
           5  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
           6  +
pub struct MaintenanceWindowIdentity {
           7  +
    /// <p>The ID of the maintenance window.</p>
           8  +
    pub window_id: ::std::option::Option<::std::string::String>,
           9  +
    /// <p>The name of the maintenance window.</p>
          10  +
    pub name: ::std::option::Option<::std::string::String>,
          11  +
    /// <p>A description of the maintenance window.</p>
          12  +
    pub description: ::std::option::Option<::std::string::String>,
          13  +
    /// <p>Indicates whether the maintenance window is enabled.</p>
          14  +
    pub enabled: bool,
          15  +
    /// <p>The duration of the maintenance window in hours.</p>
          16  +
    pub duration: ::std::option::Option<i32>,
          17  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
          18  +
    pub cutoff: i32,
          19  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
          20  +
    pub schedule: ::std::option::Option<::std::string::String>,
          21  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
          22  +
    pub schedule_timezone: ::std::option::Option<::std::string::String>,
          23  +
    /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
          24  +
    pub schedule_offset: ::std::option::Option<i32>,
          25  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
          26  +
    pub end_date: ::std::option::Option<::std::string::String>,
          27  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
          28  +
    pub start_date: ::std::option::Option<::std::string::String>,
          29  +
    /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
          30  +
    pub next_execution_time: ::std::option::Option<::std::string::String>,
          31  +
}
          32  +
impl MaintenanceWindowIdentity {
          33  +
    /// <p>The ID of the maintenance window.</p>
          34  +
    pub fn window_id(&self) -> ::std::option::Option<&str> {
          35  +
        self.window_id.as_deref()
          36  +
    }
          37  +
    /// <p>The name of the maintenance window.</p>
          38  +
    pub fn name(&self) -> ::std::option::Option<&str> {
          39  +
        self.name.as_deref()
          40  +
    }
          41  +
    /// <p>A description of the maintenance window.</p>
          42  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          43  +
        self.description.as_deref()
          44  +
    }
          45  +
    /// <p>Indicates whether the maintenance window is enabled.</p>
          46  +
    pub fn enabled(&self) -> bool {
          47  +
        self.enabled
          48  +
    }
          49  +
    /// <p>The duration of the maintenance window in hours.</p>
          50  +
    pub fn duration(&self) -> ::std::option::Option<i32> {
          51  +
        self.duration
          52  +
    }
          53  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
          54  +
    pub fn cutoff(&self) -> i32 {
          55  +
        self.cutoff
          56  +
    }
          57  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
          58  +
    pub fn schedule(&self) -> ::std::option::Option<&str> {
          59  +
        self.schedule.as_deref()
          60  +
    }
          61  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
          62  +
    pub fn schedule_timezone(&self) -> ::std::option::Option<&str> {
          63  +
        self.schedule_timezone.as_deref()
          64  +
    }
          65  +
    /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
          66  +
    pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
          67  +
        self.schedule_offset
          68  +
    }
          69  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
          70  +
    pub fn end_date(&self) -> ::std::option::Option<&str> {
          71  +
        self.end_date.as_deref()
          72  +
    }
          73  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
          74  +
    pub fn start_date(&self) -> ::std::option::Option<&str> {
          75  +
        self.start_date.as_deref()
          76  +
    }
          77  +
    /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
          78  +
    pub fn next_execution_time(&self) -> ::std::option::Option<&str> {
          79  +
        self.next_execution_time.as_deref()
          80  +
    }
          81  +
}
          82  +
impl ::std::fmt::Debug for MaintenanceWindowIdentity {
          83  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          84  +
        let mut formatter = f.debug_struct("MaintenanceWindowIdentity");
          85  +
        formatter.field("window_id", &self.window_id);
          86  +
        formatter.field("name", &self.name);
          87  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
          88  +
        formatter.field("enabled", &self.enabled);
          89  +
        formatter.field("duration", &self.duration);
          90  +
        formatter.field("cutoff", &self.cutoff);
          91  +
        formatter.field("schedule", &self.schedule);
          92  +
        formatter.field("schedule_timezone", &self.schedule_timezone);
          93  +
        formatter.field("schedule_offset", &self.schedule_offset);
          94  +
        formatter.field("end_date", &self.end_date);
          95  +
        formatter.field("start_date", &self.start_date);
          96  +
        formatter.field("next_execution_time", &self.next_execution_time);
          97  +
        formatter.finish()
          98  +
    }
          99  +
}
         100  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         101  +
    ::aws_smithy_schema::ShapeId::from_parts(
         102  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$WindowId",
         103  +
        "com.amazonaws.ssm",
         104  +
        "MaintenanceWindowIdentity",
         105  +
    ),
         106  +
    ::aws_smithy_schema::ShapeType::String,
         107  +
    "WindowId",
         108  +
    0,
         109  +
);
         110  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         111  +
    ::aws_smithy_schema::ShapeId::from_parts(
         112  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Name",
         113  +
        "com.amazonaws.ssm",
         114  +
        "MaintenanceWindowIdentity",
         115  +
    ),
         116  +
    ::aws_smithy_schema::ShapeType::String,
         117  +
    "Name",
         118  +
    1,
         119  +
);
         120  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         121  +
    ::aws_smithy_schema::ShapeId::from_parts(
         122  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Description",
         123  +
        "com.amazonaws.ssm",
         124  +
        "MaintenanceWindowIdentity",
         125  +
    ),
         126  +
    ::aws_smithy_schema::ShapeType::String,
         127  +
    "Description",
         128  +
    2,
         129  +
);
         130  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         131  +
    ::aws_smithy_schema::ShapeId::from_parts(
         132  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Enabled",
         133  +
        "com.amazonaws.ssm",
         134  +
        "MaintenanceWindowIdentity",
         135  +
    ),
         136  +
    ::aws_smithy_schema::ShapeType::Boolean,
         137  +
    "Enabled",
         138  +
    3,
         139  +
);
         140  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         141  +
    ::aws_smithy_schema::ShapeId::from_parts(
         142  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Duration",
         143  +
        "com.amazonaws.ssm",
         144  +
        "MaintenanceWindowIdentity",
         145  +
    ),
         146  +
    ::aws_smithy_schema::ShapeType::Integer,
         147  +
    "Duration",
         148  +
    4,
         149  +
);
         150  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         151  +
    ::aws_smithy_schema::ShapeId::from_parts(
         152  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Cutoff",
         153  +
        "com.amazonaws.ssm",
         154  +
        "MaintenanceWindowIdentity",
         155  +
    ),
         156  +
    ::aws_smithy_schema::ShapeType::Integer,
         157  +
    "Cutoff",
         158  +
    5,
         159  +
);
         160  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         161  +
    ::aws_smithy_schema::ShapeId::from_parts(
         162  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$Schedule",
         163  +
        "com.amazonaws.ssm",
         164  +
        "MaintenanceWindowIdentity",
         165  +
    ),
         166  +
    ::aws_smithy_schema::ShapeType::String,
         167  +
    "Schedule",
         168  +
    6,
         169  +
);
         170  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         171  +
    ::aws_smithy_schema::ShapeId::from_parts(
         172  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$ScheduleTimezone",
         173  +
        "com.amazonaws.ssm",
         174  +
        "MaintenanceWindowIdentity",
         175  +
    ),
         176  +
    ::aws_smithy_schema::ShapeType::String,
         177  +
    "ScheduleTimezone",
         178  +
    7,
         179  +
);
         180  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         181  +
    ::aws_smithy_schema::ShapeId::from_parts(
         182  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$ScheduleOffset",
         183  +
        "com.amazonaws.ssm",
         184  +
        "MaintenanceWindowIdentity",
         185  +
    ),
         186  +
    ::aws_smithy_schema::ShapeType::Integer,
         187  +
    "ScheduleOffset",
         188  +
    8,
         189  +
);
         190  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         191  +
    ::aws_smithy_schema::ShapeId::from_parts(
         192  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$EndDate",
         193  +
        "com.amazonaws.ssm",
         194  +
        "MaintenanceWindowIdentity",
         195  +
    ),
         196  +
    ::aws_smithy_schema::ShapeType::String,
         197  +
    "EndDate",
         198  +
    9,
         199  +
);
         200  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         201  +
    ::aws_smithy_schema::ShapeId::from_parts(
         202  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$StartDate",
         203  +
        "com.amazonaws.ssm",
         204  +
        "MaintenanceWindowIdentity",
         205  +
    ),
         206  +
    ::aws_smithy_schema::ShapeType::String,
         207  +
    "StartDate",
         208  +
    10,
         209  +
);
         210  +
static MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         211  +
    ::aws_smithy_schema::ShapeId::from_parts(
         212  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity$NextExecutionTime",
         213  +
        "com.amazonaws.ssm",
         214  +
        "MaintenanceWindowIdentity",
         215  +
    ),
         216  +
    ::aws_smithy_schema::ShapeType::String,
         217  +
    "NextExecutionTime",
         218  +
    11,
         219  +
);
         220  +
static MAINTENANCEWINDOWIDENTITY_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         221  +
    ::aws_smithy_schema::ShapeId::from_parts(
         222  +
        "com.amazonaws.ssm#MaintenanceWindowIdentity",
         223  +
        "com.amazonaws.ssm",
         224  +
        "MaintenanceWindowIdentity",
         225  +
    ),
         226  +
    ::aws_smithy_schema::ShapeType::Structure,
         227  +
    &[
         228  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID,
         229  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_NAME,
         230  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION,
         231  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED,
         232  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION,
         233  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF,
         234  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE,
         235  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE,
         236  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET,
         237  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE,
         238  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE,
         239  +
        &MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME,
         240  +
    ],
         241  +
);
         242  +
impl MaintenanceWindowIdentity {
         243  +
    /// The schema for this shape.
         244  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &MAINTENANCEWINDOWIDENTITY_SCHEMA;
         245  +
}
         246  +
impl ::aws_smithy_schema::serde::SerializableStruct for MaintenanceWindowIdentity {
         247  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         248  +
    fn serialize_members(
         249  +
        &self,
         250  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         251  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         252  +
        if let Some(ref val) = self.window_id {
         253  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_WINDOW_ID, val)?;
         254  +
        }
         255  +
        if let Some(ref val) = self.name {
         256  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_NAME, val)?;
         257  +
        }
         258  +
        if let Some(ref val) = self.description {
         259  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_DESCRIPTION, val)?;
         260  +
        }
         261  +
        {
         262  +
            let val = &self.enabled;
         263  +
            ser.write_boolean(&MAINTENANCEWINDOWIDENTITY_MEMBER_ENABLED, *val)?;
         264  +
        }
         265  +
        if let Some(ref val) = self.duration {
         266  +
            ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_DURATION, *val)?;
         267  +
        }
         268  +
        {
         269  +
            let val = &self.cutoff;
         270  +
            ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_CUTOFF, *val)?;
         271  +
        }
         272  +
        if let Some(ref val) = self.schedule {
         273  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE, val)?;
         274  +
        }
         275  +
        if let Some(ref val) = self.schedule_timezone {
         276  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_TIMEZONE, val)?;
         277  +
        }
         278  +
        if let Some(ref val) = self.schedule_offset {
         279  +
            ser.write_integer(&MAINTENANCEWINDOWIDENTITY_MEMBER_SCHEDULE_OFFSET, *val)?;
         280  +
        }
         281  +
        if let Some(ref val) = self.end_date {
         282  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_END_DATE, val)?;
         283  +
        }
         284  +
        if let Some(ref val) = self.start_date {
         285  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_START_DATE, val)?;
         286  +
        }
         287  +
        if let Some(ref val) = self.next_execution_time {
         288  +
            ser.write_string(&MAINTENANCEWINDOWIDENTITY_MEMBER_NEXT_EXECUTION_TIME, val)?;
         289  +
        }
         290  +
        Ok(())
         291  +
    }
         292  +
}
         293  +
impl MaintenanceWindowIdentity {
         294  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         295  +
    pub fn deserialize(
         296  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         297  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         298  +
        #[allow(unused_variables, unused_mut)]
         299  +
        let mut builder = Self::builder();
         300  +
        #[allow(
         301  +
            unused_variables,
         302  +
            unreachable_code,
         303  +
            clippy::single_match,
         304  +
            clippy::match_single_binding,
         305  +
            clippy::diverging_sub_expression
         306  +
        )]
         307  +
        deserializer.read_struct(&MAINTENANCEWINDOWIDENTITY_SCHEMA, &mut |member, deser| {
         308  +
            match member.member_index() {
         309  +
                Some(0) => {
         310  +
                    if deser.is_null() {
         311  +
                        deser.read_null()?;
         312  +
                    } else {
         313  +
                        builder.window_id = Some(deser.read_string(member)?);
         314  +
                    }
         315  +
                }
         316  +
                Some(1) => {
         317  +
                    if deser.is_null() {
         318  +
                        deser.read_null()?;
         319  +
                    } else {
         320  +
                        builder.name = Some(deser.read_string(member)?);
         321  +
                    }
         322  +
                }
         323  +
                Some(2) => {
         324  +
                    if deser.is_null() {
         325  +
                        deser.read_null()?;
         326  +
                    } else {
         327  +
                        builder.description = Some(deser.read_string(member)?);
         328  +
                    }
         329  +
                }
         330  +
                Some(3) => {
         331  +
                    builder.enabled = Some(deser.read_boolean(member)?);
         332  +
                }
         333  +
                Some(4) => {
         334  +
                    if deser.is_null() {
         335  +
                        deser.read_null()?;
         336  +
                    } else {
         337  +
                        builder.duration = Some(deser.read_integer(member)?);
         338  +
                    }
         339  +
                }
         340  +
                Some(5) => {
         341  +
                    builder.cutoff = Some(deser.read_integer(member)?);
         342  +
                }
         343  +
                Some(6) => {
         344  +
                    if deser.is_null() {
         345  +
                        deser.read_null()?;
         346  +
                    } else {
         347  +
                        builder.schedule = Some(deser.read_string(member)?);
         348  +
                    }
         349  +
                }
         350  +
                Some(7) => {
         351  +
                    if deser.is_null() {
         352  +
                        deser.read_null()?;
         353  +
                    } else {
         354  +
                        builder.schedule_timezone = Some(deser.read_string(member)?);
         355  +
                    }
         356  +
                }
         357  +
                Some(8) => {
         358  +
                    if deser.is_null() {
         359  +
                        deser.read_null()?;
         360  +
                    } else {
         361  +
                        builder.schedule_offset = Some(deser.read_integer(member)?);
         362  +
                    }
         363  +
                }
         364  +
                Some(9) => {
         365  +
                    if deser.is_null() {
         366  +
                        deser.read_null()?;
         367  +
                    } else {
         368  +
                        builder.end_date = Some(deser.read_string(member)?);
         369  +
                    }
         370  +
                }
         371  +
                Some(10) => {
         372  +
                    if deser.is_null() {
         373  +
                        deser.read_null()?;
         374  +
                    } else {
         375  +
                        builder.start_date = Some(deser.read_string(member)?);
         376  +
                    }
         377  +
                }
         378  +
                Some(11) => {
         379  +
                    if deser.is_null() {
         380  +
                        deser.read_null()?;
         381  +
                    } else {
         382  +
                        builder.next_execution_time = Some(deser.read_string(member)?);
         383  +
                    }
         384  +
                }
         385  +
                _ => {}
         386  +
            }
         387  +
            Ok(())
         388  +
        })?;
         389  +
        Ok(builder.build())
         390  +
    }
         391  +
}
         392  +
impl MaintenanceWindowIdentity {
         393  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         394  +
    pub fn deserialize_with_response(
         395  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         396  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         397  +
        _status: u16,
         398  +
        _body: &[u8],
         399  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         400  +
        Self::deserialize(deserializer)
         401  +
    }
         402  +
}
         403  +
impl MaintenanceWindowIdentity {
         404  +
    /// Creates a new builder-style object to manufacture [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
         405  +
    pub fn builder() -> crate::types::builders::MaintenanceWindowIdentityBuilder {
         406  +
        crate::types::builders::MaintenanceWindowIdentityBuilder::default()
         407  +
    }
         408  +
}
         409  +
         410  +
/// A builder for [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
         411  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
         412  +
#[non_exhaustive]
         413  +
pub struct MaintenanceWindowIdentityBuilder {
         414  +
    pub(crate) window_id: ::std::option::Option<::std::string::String>,
         415  +
    pub(crate) name: ::std::option::Option<::std::string::String>,
         416  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         417  +
    pub(crate) enabled: ::std::option::Option<bool>,
         418  +
    pub(crate) duration: ::std::option::Option<i32>,
         419  +
    pub(crate) cutoff: ::std::option::Option<i32>,
         420  +
    pub(crate) schedule: ::std::option::Option<::std::string::String>,
         421  +
    pub(crate) schedule_timezone: ::std::option::Option<::std::string::String>,
         422  +
    pub(crate) schedule_offset: ::std::option::Option<i32>,
         423  +
    pub(crate) end_date: ::std::option::Option<::std::string::String>,
         424  +
    pub(crate) start_date: ::std::option::Option<::std::string::String>,
         425  +
    pub(crate) next_execution_time: ::std::option::Option<::std::string::String>,
         426  +
}
         427  +
impl MaintenanceWindowIdentityBuilder {
         428  +
    /// <p>The ID of the maintenance window.</p>
         429  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         430  +
        self.window_id = ::std::option::Option::Some(input.into());
         431  +
        self
         432  +
    }
         433  +
    /// <p>The ID of the maintenance window.</p>
         434  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         435  +
        self.window_id = input;
         436  +
        self
         437  +
    }
         438  +
    /// <p>The ID of the maintenance window.</p>
         439  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         440  +
        &self.window_id
         441  +
    }
         442  +
    /// <p>The name of the maintenance window.</p>
         443  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         444  +
        self.name = ::std::option::Option::Some(input.into());
         445  +
        self
         446  +
    }
         447  +
    /// <p>The name of the maintenance window.</p>
         448  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         449  +
        self.name = input;
         450  +
        self
         451  +
    }
         452  +
    /// <p>The name of the maintenance window.</p>
         453  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         454  +
        &self.name
         455  +
    }
         456  +
    /// <p>A description of the maintenance window.</p>
         457  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         458  +
        self.description = ::std::option::Option::Some(input.into());
         459  +
        self
         460  +
    }
         461  +
    /// <p>A description of the maintenance window.</p>
         462  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         463  +
        self.description = input;
         464  +
        self
         465  +
    }
         466  +
    /// <p>A description of the maintenance window.</p>
         467  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         468  +
        &self.description
         469  +
    }
         470  +
    /// <p>Indicates whether the maintenance window is enabled.</p>
         471  +
    pub fn enabled(mut self, input: bool) -> Self {
         472  +
        self.enabled = ::std::option::Option::Some(input);
         473  +
        self
         474  +
    }
         475  +
    /// <p>Indicates whether the maintenance window is enabled.</p>
         476  +
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
         477  +
        self.enabled = input;
         478  +
        self
         479  +
    }
         480  +
    /// <p>Indicates whether the maintenance window is enabled.</p>
         481  +
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
         482  +
        &self.enabled
         483  +
    }
         484  +
    /// <p>The duration of the maintenance window in hours.</p>
         485  +
    pub fn duration(mut self, input: i32) -> Self {
         486  +
        self.duration = ::std::option::Option::Some(input);
         487  +
        self
         488  +
    }
         489  +
    /// <p>The duration of the maintenance window in hours.</p>
         490  +
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
         491  +
        self.duration = input;
         492  +
        self
         493  +
    }
         494  +
    /// <p>The duration of the maintenance window in hours.</p>
         495  +
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
         496  +
        &self.duration
         497  +
    }
         498  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         499  +
    pub fn cutoff(mut self, input: i32) -> Self {
         500  +
        self.cutoff = ::std::option::Option::Some(input);
         501  +
        self
         502  +
    }
         503  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         504  +
    pub fn set_cutoff(mut self, input: ::std::option::Option<i32>) -> Self {
         505  +
        self.cutoff = input;
         506  +
        self
         507  +
    }
         508  +
    /// <p>The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.</p>
         509  +
    pub fn get_cutoff(&self) -> &::std::option::Option<i32> {
         510  +
        &self.cutoff
         511  +
    }
         512  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         513  +
    pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         514  +
        self.schedule = ::std::option::Option::Some(input.into());
         515  +
        self
         516  +
    }
         517  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         518  +
    pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         519  +
        self.schedule = input;
         520  +
        self
         521  +
    }
         522  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         523  +
    pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
         524  +
        &self.schedule
         525  +
    }
         526  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
         527  +
    pub fn schedule_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         528  +
        self.schedule_timezone = ::std::option::Option::Some(input.into());
         529  +
        self
         530  +
    }
         531  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
         532  +
    pub fn set_schedule_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         533  +
        self.schedule_timezone = input;
         534  +
        self
         535  +
    }
         536  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.</p>
         537  +
    pub fn get_schedule_timezone(&self) -> &::std::option::Option<::std::string::String> {
         538  +
        &self.schedule_timezone
         539  +
    }
         540  +
    /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
         541  +
    pub fn schedule_offset(mut self, input: i32) -> Self {
         542  +
        self.schedule_offset = ::std::option::Option::Some(input);
         543  +
        self
         544  +
    }
         545  +
    /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
         546  +
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
         547  +
        self.schedule_offset = input;
         548  +
        self
         549  +
    }
         550  +
    /// <p>The number of days to wait to run a maintenance window after the scheduled cron expression date and time.</p>
         551  +
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
         552  +
        &self.schedule_offset
         553  +
    }
         554  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
         555  +
    pub fn end_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         556  +
        self.end_date = ::std::option::Option::Some(input.into());
         557  +
        self
         558  +
    }
         559  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
         560  +
    pub fn set_end_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         561  +
        self.end_date = input;
         562  +
        self
         563  +
    }
         564  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.</p>
         565  +
    pub fn get_end_date(&self) -> &::std::option::Option<::std::string::String> {
         566  +
        &self.end_date
         567  +
    }
         568  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
         569  +
    pub fn start_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         570  +
        self.start_date = ::std::option::Option::Some(input.into());
         571  +
        self
         572  +
    }
         573  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
         574  +
    pub fn set_start_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         575  +
        self.start_date = input;
         576  +
        self
         577  +
    }
         578  +
    /// <p>The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.</p>
         579  +
    pub fn get_start_date(&self) -> &::std::option::Option<::std::string::String> {
         580  +
        &self.start_date
         581  +
    }
         582  +
    /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
         583  +
    pub fn next_execution_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         584  +
        self.next_execution_time = ::std::option::Option::Some(input.into());
         585  +
        self
         586  +
    }
         587  +
    /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
         588  +
    pub fn set_next_execution_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         589  +
        self.next_execution_time = input;
         590  +
        self
         591  +
    }
         592  +
    /// <p>The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.</p>
         593  +
    pub fn get_next_execution_time(&self) -> &::std::option::Option<::std::string::String> {
         594  +
        &self.next_execution_time
         595  +
    }
         596  +
    /// Consumes the builder and constructs a [`MaintenanceWindowIdentity`](crate::types::MaintenanceWindowIdentity).
         597  +
    pub fn build(self) -> crate::types::MaintenanceWindowIdentity {
         598  +
        crate::types::MaintenanceWindowIdentity {
         599  +
            window_id: self.window_id,
         600  +
            name: self.name,
         601  +
            description: self.description,
         602  +
            enabled: self.enabled.unwrap_or_default(),
         603  +
            duration: self.duration,
         604  +
            cutoff: self.cutoff.unwrap_or_default(),
         605  +
            schedule: self.schedule,
         606  +
            schedule_timezone: self.schedule_timezone,
         607  +
            schedule_offset: self.schedule_offset,
         608  +
            end_date: self.end_date,
         609  +
            start_date: self.start_date,
         610  +
            next_execution_time: self.next_execution_time,
         611  +
        }
         612  +
    }
         613  +
}
         614  +
impl ::std::fmt::Debug for MaintenanceWindowIdentityBuilder {
         615  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         616  +
        let mut formatter = f.debug_struct("MaintenanceWindowIdentityBuilder");
         617  +
        formatter.field("window_id", &self.window_id);
         618  +
        formatter.field("name", &self.name);
         619  +
        formatter.field("description", &"*** Sensitive Data Redacted ***");
         620  +
        formatter.field("enabled", &self.enabled);
         621  +
        formatter.field("duration", &self.duration);
         622  +
        formatter.field("cutoff", &self.cutoff);
         623  +
        formatter.field("schedule", &self.schedule);
         624  +
        formatter.field("schedule_timezone", &self.schedule_timezone);
         625  +
        formatter.field("schedule_offset", &self.schedule_offset);
         626  +
        formatter.field("end_date", &self.end_date);
         627  +
        formatter.field("start_date", &self.start_date);
         628  +
        formatter.field("next_execution_time", &self.next_execution_time);
         629  +
        formatter.finish()
         630  +
    }
         631  +
}

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

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