AWS SDK

AWS SDK

rev. 2915cec5ef64cb1ed4992565a748d76a11505b3b (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_maintenance_window/builders.rs

@@ -0,1 +0,310 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_maintenance_window::_update_maintenance_window_input::UpdateMaintenanceWindowInputBuilder;
           3  +
           4  +
pub use crate::operation::update_maintenance_window::_update_maintenance_window_output::UpdateMaintenanceWindowOutputBuilder;
           5  +
           6  +
impl crate::operation::update_maintenance_window::builders::UpdateMaintenanceWindowInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_maintenance_window::UpdateMaintenanceWindowError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_maintenance_window();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateMaintenanceWindow`.
          24  +
///
          25  +
/// <p>Updates an existing maintenance window. Only specified parameters are modified.</p><note>
          26  +
/// <p>The value you specify for <code>Duration</code> determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for <code>Cutoff</code>. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for <code>Cutoff</code> is one hour, no maintenance window tasks can start after 5 PM.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct UpdateMaintenanceWindowFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::update_maintenance_window::builders::UpdateMaintenanceWindowInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowOutput,
          37  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowError,
          38  +
    > for UpdateMaintenanceWindowFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::update_maintenance_window::UpdateMaintenanceWindowOutput,
          46  +
            crate::operation::update_maintenance_window::UpdateMaintenanceWindowError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl UpdateMaintenanceWindowFluentBuilder {
          53  +
    /// Creates a new `UpdateMaintenanceWindowFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the UpdateMaintenanceWindow as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::update_maintenance_window::builders::UpdateMaintenanceWindowInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::update_maintenance_window::UpdateMaintenanceWindowError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::update_maintenance_window::UpdateMaintenanceWindow::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindow::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowOutput,
          99  +
        crate::operation::update_maintenance_window::UpdateMaintenanceWindowError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// <p>The ID of the maintenance window to update.</p>
         114  +
    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         115  +
        self.inner = self.inner.window_id(input.into());
         116  +
        self
         117  +
    }
         118  +
    /// <p>The ID of the maintenance window to update.</p>
         119  +
    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         120  +
        self.inner = self.inner.set_window_id(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>The ID of the maintenance window to update.</p>
         124  +
    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
         125  +
        self.inner.get_window_id()
         126  +
    }
         127  +
    /// <p>The name of the maintenance window.</p>
         128  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        self.inner = self.inner.name(input.into());
         130  +
        self
         131  +
    }
         132  +
    /// <p>The name of the maintenance window.</p>
         133  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         134  +
        self.inner = self.inner.set_name(input);
         135  +
        self
         136  +
    }
         137  +
    /// <p>The name of the maintenance window.</p>
         138  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         139  +
        self.inner.get_name()
         140  +
    }
         141  +
    /// <p>An optional description for the update request.</p>
         142  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         143  +
        self.inner = self.inner.description(input.into());
         144  +
        self
         145  +
    }
         146  +
    /// <p>An optional description for the update request.</p>
         147  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         148  +
        self.inner = self.inner.set_description(input);
         149  +
        self
         150  +
    }
         151  +
    /// <p>An optional description for the update request.</p>
         152  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         153  +
        self.inner.get_description()
         154  +
    }
         155  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         156  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         157  +
    /// </note>
         158  +
    pub fn start_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         159  +
        self.inner = self.inner.start_date(input.into());
         160  +
        self
         161  +
    }
         162  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         163  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         164  +
    /// </note>
         165  +
    pub fn set_start_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         166  +
        self.inner = self.inner.set_start_date(input);
         167  +
        self
         168  +
    }
         169  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. <code>StartDate</code> allows you to delay activation of the maintenance window until the specified future date.</p><note>
         170  +
    /// <p>When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.</p>
         171  +
    /// </note>
         172  +
    pub fn get_start_date(&self) -> &::std::option::Option<::std::string::String> {
         173  +
        self.inner.get_start_date()
         174  +
    }
         175  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         176  +
    pub fn end_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         177  +
        self.inner = self.inner.end_date(input.into());
         178  +
        self
         179  +
    }
         180  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         181  +
    pub fn set_end_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         182  +
        self.inner = self.inner.set_end_date(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. <code>EndDate</code> allows you to set a date and time in the future when the maintenance window will no longer run.</p>
         186  +
    pub fn get_end_date(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_end_date()
         188  +
    }
         189  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         190  +
    pub fn schedule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         191  +
        self.inner = self.inner.schedule(input.into());
         192  +
        self
         193  +
    }
         194  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         195  +
    pub fn set_schedule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         196  +
        self.inner = self.inner.set_schedule(input);
         197  +
        self
         198  +
    }
         199  +
    /// <p>The schedule of the maintenance window in the form of a cron or rate expression.</p>
         200  +
    pub fn get_schedule(&self) -> &::std::option::Option<::std::string::String> {
         201  +
        self.inner.get_schedule()
         202  +
    }
         203  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         204  +
    pub fn schedule_timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         205  +
        self.inner = self.inner.schedule_timezone(input.into());
         206  +
        self
         207  +
    }
         208  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         209  +
    pub fn set_schedule_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         210  +
        self.inner = self.inner.set_schedule_timezone(input);
         211  +
        self
         212  +
    }
         213  +
    /// <p>The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the <a href="https://www.iana.org/time-zones">Time Zone Database</a> on the IANA website.</p>
         214  +
    pub fn get_schedule_timezone(&self) -> &::std::option::Option<::std::string::String> {
         215  +
        self.inner.get_schedule_timezone()
         216  +
    }
         217  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         218  +
    /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
         219  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         220  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         221  +
    pub fn schedule_offset(mut self, input: i32) -> Self {
         222  +
        self.inner = self.inner.schedule_offset(input);
         223  +
        self
         224  +
    }
         225  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         226  +
    /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
         227  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         228  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         229  +
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
         230  +
        self.inner = self.inner.set_schedule_offset(input);
         231  +
        self
         232  +
    }
         233  +
    /// <p>The number of days to wait after the date and time specified by a cron expression before running the maintenance window.</p>
         234  +
    /// <p>For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.</p>
         235  +
    /// <p><code>cron(30 23 ? * TUE#3 *)</code></p>
         236  +
    /// <p>If the schedule offset is <code>2</code>, the maintenance window won't run until two days later.</p>
         237  +
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
         238  +
        self.inner.get_schedule_offset()
         239  +
    }
         240  +
    /// <p>The duration of the maintenance window in hours.</p>
         241  +
    pub fn duration(mut self, input: i32) -> Self {
         242  +
        self.inner = self.inner.duration(input);
         243  +
        self
         244  +
    }
         245  +
    /// <p>The duration of the maintenance window in hours.</p>
         246  +
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
         247  +
        self.inner = self.inner.set_duration(input);
         248  +
        self
         249  +
    }
         250  +
    /// <p>The duration of the maintenance window in hours.</p>
         251  +
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
         252  +
        self.inner.get_duration()
         253  +
    }
         254  +
    /// <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>
         255  +
    pub fn cutoff(mut self, input: i32) -> Self {
         256  +
        self.inner = self.inner.cutoff(input);
         257  +
        self
         258  +
    }
         259  +
    /// <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>
         260  +
    pub fn set_cutoff(mut self, input: ::std::option::Option<i32>) -> Self {
         261  +
        self.inner = self.inner.set_cutoff(input);
         262  +
        self
         263  +
    }
         264  +
    /// <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>
         265  +
    pub fn get_cutoff(&self) -> &::std::option::Option<i32> {
         266  +
        self.inner.get_cutoff()
         267  +
    }
         268  +
    /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
         269  +
    pub fn allow_unassociated_targets(mut self, input: bool) -> Self {
         270  +
        self.inner = self.inner.allow_unassociated_targets(input);
         271  +
        self
         272  +
    }
         273  +
    /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
         274  +
    pub fn set_allow_unassociated_targets(mut self, input: ::std::option::Option<bool>) -> Self {
         275  +
        self.inner = self.inner.set_allow_unassociated_targets(input);
         276  +
        self
         277  +
    }
         278  +
    /// <p>Whether targets must be registered with the maintenance window before tasks can be defined for those targets.</p>
         279  +
    pub fn get_allow_unassociated_targets(&self) -> &::std::option::Option<bool> {
         280  +
        self.inner.get_allow_unassociated_targets()
         281  +
    }
         282  +
    /// <p>Whether the maintenance window is enabled.</p>
         283  +
    pub fn enabled(mut self, input: bool) -> Self {
         284  +
        self.inner = self.inner.enabled(input);
         285  +
        self
         286  +
    }
         287  +
    /// <p>Whether the maintenance window is enabled.</p>
         288  +
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
         289  +
        self.inner = self.inner.set_enabled(input);
         290  +
        self
         291  +
    }
         292  +
    /// <p>Whether the maintenance window is enabled.</p>
         293  +
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
         294  +
        self.inner.get_enabled()
         295  +
    }
         296  +
    /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         297  +
    pub fn replace(mut self, input: bool) -> Self {
         298  +
        self.inner = self.inner.replace(input);
         299  +
        self
         300  +
    }
         301  +
    /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         302  +
    pub fn set_replace(mut self, input: ::std::option::Option<bool>) -> Self {
         303  +
        self.inner = self.inner.set_replace(input);
         304  +
        self
         305  +
    }
         306  +
    /// <p>If <code>True</code>, then all fields that are required by the <code>CreateMaintenanceWindow</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         307  +
    pub fn get_replace(&self) -> &::std::option::Option<bool> {
         308  +
        self.inner.get_replace()
         309  +
    }
         310  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_maintenance_window_target.rs

@@ -0,1 +0,578 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `UpdateMaintenanceWindowTarget`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct UpdateMaintenanceWindowTarget;
           6  +
impl UpdateMaintenanceWindowTarget {
           7  +
    /// Creates a new `UpdateMaintenanceWindowTarget`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          13  +
        crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError,
          24  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          25  +
        >,
          26  +
    > {
          27  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          28  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          29  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          30  +
        >| {
          31  +
            err.map_service_error(|err| {
          32  +
                err.downcast::<crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError>()
          33  +
                    .expect("correct error type")
          34  +
            })
          35  +
        };
          36  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          37  +
            .await
          38  +
            .map_err(map_err)?;
          39  +
        let output = context.finalize().map_err(map_err)?;
          40  +
        ::std::result::Result::Ok(
          41  +
            output
          42  +
                .downcast::<crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetOutput>()
          43  +
                .expect("correct output type"),
          44  +
        )
          45  +
    }
          46  +
          47  +
    pub(crate) async fn orchestrate_with_stop_point(
          48  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          49  +
        input: crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetInput,
          50  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          51  +
    ) -> ::std::result::Result<
          52  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          53  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          54  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          55  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          56  +
        >,
          57  +
    > {
          58  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          59  +
        use ::tracing::Instrument;
          60  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "UpdateMaintenanceWindowTarget", input, runtime_plugins, stop_point)
          61  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          62  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          63  +
            .instrument(::tracing::debug_span!(
          64  +
                "SSM.UpdateMaintenanceWindowTarget",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "UpdateMaintenanceWindowTarget",
          67  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          68  +
                "rpc.system" = "aws-api",
          69  +
            ))
          70  +
            .await
          71  +
    }
          72  +
          73  +
    pub(crate) fn operation_runtime_plugins(
          74  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          75  +
        client_config: &crate::config::Config,
          76  +
        config_override: ::std::option::Option<crate::config::Builder>,
          77  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          78  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          79  +
          80  +
        if let ::std::option::Option::Some(config_override) = config_override {
          81  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          82  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          83  +
            }
          84  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          85  +
                config_override,
          86  +
                client_config.config.clone(),
          87  +
                &client_config.runtime_components,
          88  +
            ));
          89  +
        }
          90  +
        runtime_plugins
          91  +
    }
          92  +
}
          93  +
/// Per-operation error registry. Contains an entry for every modeled
          94  +
/// error this operation can throw.
          95  +
///
          96  +
/// Used by the schema-serde error path as the operation-scoped lookup
          97  +
/// for registry-backed error reification: an error code that does not
          98  +
/// match one of the operation's modeled errors directly is resolved
          99  +
/// against this registry first, then widened to the service-wide error
         100  +
/// registry.
         101  +
pub(crate) mod error_registry {
         102  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         103  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         104  +
                            .insert_error_shape(
         105  +
                        crate::types::error::DoesNotExistException::SCHEMA,
         106  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         107  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DoesNotExistException::deserialize(d)?))
         108  +
                        },
         109  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         110  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DoesNotExistException::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::InternalServerError::SCHEMA,
         115  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         116  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         117  +
                        },
         118  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         119  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
                            .build()
         123  +
    });
         124  +
}
         125  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateMaintenanceWindowTarget {
         126  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         127  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateMaintenanceWindowTarget");
         128  +
         129  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         130  +
            UpdateMaintenanceWindowTargetRequestSerializer,
         131  +
        ));
         132  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         133  +
            UpdateMaintenanceWindowTargetResponseDeserializer,
         134  +
        ));
         135  +
         136  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         137  +
            crate::config::auth::Params::builder()
         138  +
                .operation_name("UpdateMaintenanceWindowTarget")
         139  +
                .build()
         140  +
                .expect("required fields set"),
         141  +
        ));
         142  +
         143  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
         144  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         145  +
            "UpdateMaintenanceWindowTarget",
         146  +
            "SSM",
         147  +
        ));
         148  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         149  +
        signing_options.double_uri_encode = true;
         150  +
        signing_options.content_sha256_header = false;
         151  +
        signing_options.normalize_uri_path = true;
         152  +
        signing_options.payload_override = None;
         153  +
         154  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         155  +
            signing_options,
         156  +
            ..::std::default::Default::default()
         157  +
        });
         158  +
         159  +
        ::std::option::Option::Some(cfg.freeze())
         160  +
    }
         161  +
         162  +
    fn runtime_components(
         163  +
        &self,
         164  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         165  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         166  +
        #[allow(unused_mut)]
         167  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateMaintenanceWindowTarget")
         168  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         169  +
                UpdateMaintenanceWindowTargetTelemetryInputCaptureInterceptor,
         170  +
            ))
         171  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         172  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         173  +
            ))
         174  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         175  +
                UpdateMaintenanceWindowTargetEndpointParamsInterceptor,
         176  +
            ))
         177  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         178  +
                crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError,
         179  +
            >::new())
         180  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         181  +
                crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError,
         182  +
            >::new())
         183  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         184  +
                crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError,
         185  +
            >::new())
         186  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         187  +
                crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError,
         188  +
            >::new());
         189  +
         190  +
        ::std::borrow::Cow::Owned(rcb)
         191  +
    }
         192  +
}
         193  +
         194  +
#[derive(Debug)]
         195  +
struct UpdateMaintenanceWindowTargetTelemetryInputCaptureInterceptor;
         196  +
         197  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         198  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateMaintenanceWindowTargetTelemetryInputCaptureInterceptor {
         199  +
    fn name(&self) -> &'static str {
         200  +
        "UpdateMaintenanceWindowTargetTelemetryInputCaptureInterceptor"
         201  +
    }
         202  +
         203  +
    fn read_before_execution(
         204  +
        &self,
         205  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         206  +
            '_,
         207  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         208  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         209  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         210  +
        >,
         211  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         212  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         213  +
        // Nothing to do unless the customer opted in by naming members to record.
         214  +
        let ::std::option::Option::Some(requested) = cfg
         215  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         216  +
            .filter(|r| !r.is_empty())
         217  +
        else {
         218  +
            return ::std::result::Result::Ok(());
         219  +
        };
         220  +
         221  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateMaintenanceWindowTargetInput>() else {
         222  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         223  +
            return ::std::result::Result::Ok(());
         224  +
        };
         225  +
         226  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         227  +
        if requested.should_capture("WindowId") {
         228  +
            if let ::std::option::Option::Some(value) = input.window_id.as_deref() {
         229  +
                captured.insert("WindowId", value);
         230  +
            }
         231  +
        }
         232  +
        if requested.should_capture("WindowTargetId") {
         233  +
            if let ::std::option::Option::Some(value) = input.window_target_id.as_deref() {
         234  +
                captured.insert("WindowTargetId", value);
         235  +
            }
         236  +
        }
         237  +
        if requested.should_capture("Name") {
         238  +
            if let ::std::option::Option::Some(value) = input.name.as_deref() {
         239  +
                captured.insert("Name", value);
         240  +
            }
         241  +
        }
         242  +
         243  +
        cfg.interceptor_state().store_put(captured);
         244  +
        ::std::result::Result::Ok(())
         245  +
    }
         246  +
}
         247  +
#[derive(Debug)]
         248  +
struct UpdateMaintenanceWindowTargetResponseDeserializer;
         249  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateMaintenanceWindowTargetResponseDeserializer {
         250  +
    fn deserialize_nonstreaming_with_config(
         251  +
        &self,
         252  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         253  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         254  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         255  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         256  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         257  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         258  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         259  +
        // loads `body` before firing this hook.
         260  +
        let body = response.body().bytes().expect("body loaded");
         261  +
        let headers = response.headers();
         262  +
        #[allow(unused_mut)]
         263  +
        let mut force_error = false;
         264  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         265  +
        if !success && status != 200 || force_error {
         266  +
            let protocol = _cfg
         267  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         268  +
                .expect("a SharedClientProtocol is required");
         269  +
            #[allow(unused_mut)]
         270  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         271  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         272  +
            })?;
         273  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         274  +
            let generic = generic_builder.build();
         275  +
            let error_code = match generic.code() {
         276  +
                ::std::option::Option::Some(code) => code,
         277  +
                ::std::option::Option::None => {
         278  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         279  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         280  +
                            crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError::unhandled(generic),
         281  +
                        ),
         282  +
                    ))
         283  +
                }
         284  +
            };
         285  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         286  +
            let err = match error_code {
         287  +
                "DoesNotExistException" => {
         288  +
                    crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError::DoesNotExistException({
         289  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         290  +
                            crate::types::error::DoesNotExistException::deserialize_with_response(
         291  +
                                &mut *deser,
         292  +
                                response.headers(),
         293  +
                                response.status().into(),
         294  +
                                body,
         295  +
                            )
         296  +
                        }) {
         297  +
                            ::std::result::Result::Ok(val) => val,
         298  +
                            ::std::result::Result::Err(e) => {
         299  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         300  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         301  +
                                ))
         302  +
                            }
         303  +
                        };
         304  +
                        tmp.meta = generic;
         305  +
                        if tmp.message.is_none() {
         306  +
                            tmp.message = _error_message;
         307  +
                        }
         308  +
                        tmp
         309  +
                    })
         310  +
                }
         311  +
                "InternalServerError" => {
         312  +
                    crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError::InternalServerError({
         313  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         314  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         315  +
                                &mut *deser,
         316  +
                                response.headers(),
         317  +
                                response.status().into(),
         318  +
                                body,
         319  +
                            )
         320  +
                        }) {
         321  +
                            ::std::result::Result::Ok(val) => val,
         322  +
                            ::std::result::Result::Err(e) => {
         323  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         324  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         325  +
                                ))
         326  +
                            }
         327  +
                        };
         328  +
                        tmp.meta = generic;
         329  +
                        if tmp.message.is_none() {
         330  +
                            tmp.message = _error_message;
         331  +
                        }
         332  +
                        tmp
         333  +
                    })
         334  +
                }
         335  +
                _ => {
         336  +
                    // Registry-backed, operation-scoped reification of an error whose
         337  +
                    // code this operation does not model directly: the operation's own
         338  +
                    // error registry is consulted first, then the lookup widens to the
         339  +
                    // service-wide error registry. On a hit, the reified error is attached
         340  +
                    // as the source of the returned unhandled error while its metadata
         341  +
                    // (code, message, request id) is preserved; on a miss the generic
         342  +
                    // error is returned unchanged.
         343  +
                    match protocol
         344  +
                        .deserialize_error_response(response, _cfg)
         345  +
                        .ok()
         346  +
                        .and_then(|mut deser| {
         347  +
                            ::aws_smithy_schema::registry::reify_error(
         348  +
                                crate::operation::update_maintenance_window_target::error_registry::REGISTRY
         349  +
                                    .or(&crate::error_type_registry::REGISTRY),
         350  +
                                error_code,
         351  +
                                &mut *deser,
         352  +
                            )
         353  +
                        }) {
         354  +
                        ::std::option::Option::Some(source) => <crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         355  +
                        ::std::option::Option::None => crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError::generic(generic),
         356  +
                    }
         357  +
                }
         358  +
            };
         359  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         360  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         361  +
            ))
         362  +
        } else {
         363  +
            let protocol = _cfg
         364  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         365  +
                .expect("a SharedClientProtocol is required");
         366  +
            let mut deser = protocol
         367  +
                .deserialize_response(response, UpdateMaintenanceWindowTarget::OUTPUT_SCHEMA, _cfg)
         368  +
                .map_err(|e| {
         369  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         370  +
                })?;
         371  +
            // body and headers are already in scope from the top of the function;
         372  +
            // alias `headers` as `_response_headers` so MutateOutput
         373  +
            // customizations have a stable name to read from.
         374  +
            let _response_headers = headers;
         375  +
            #[allow(unused_mut)]
         376  +
            let mut output = crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetOutput::deserialize_with_response(
         377  +
                &mut *deser,
         378  +
                _response_headers,
         379  +
                response.status().into(),
         380  +
                body,
         381  +
            )
         382  +
            .map_err(|e| {
         383  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         384  +
            })?;
         385  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         386  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         387  +
        }
         388  +
    }
         389  +
}
         390  +
#[derive(Debug)]
         391  +
struct UpdateMaintenanceWindowTargetRequestSerializer;
         392  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateMaintenanceWindowTargetRequestSerializer {
         393  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         394  +
    fn serialize_input(
         395  +
        &self,
         396  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         397  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         398  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         399  +
        let input = input
         400  +
            .downcast::<crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetInput>()
         401  +
            .expect("correct type");
         402  +
         403  +
        let protocol = _cfg
         404  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         405  +
            .expect("a SharedClientProtocol is required");
         406  +
        let mut request = protocol
         407  +
            .serialize_request(&input, UpdateMaintenanceWindowTarget::INPUT_SCHEMA, "/", _cfg)
         408  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         409  +
         410  +
        return ::std::result::Result::Ok(request);
         411  +
    }
         412  +
}
         413  +
#[derive(Debug)]
         414  +
struct UpdateMaintenanceWindowTargetEndpointParamsInterceptor;
         415  +
         416  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         417  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateMaintenanceWindowTargetEndpointParamsInterceptor {
         418  +
    fn name(&self) -> &'static str {
         419  +
        "UpdateMaintenanceWindowTargetEndpointParamsInterceptor"
         420  +
    }
         421  +
         422  +
    fn read_before_execution(
         423  +
        &self,
         424  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         425  +
            '_,
         426  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         427  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         428  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         429  +
        >,
         430  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         431  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         432  +
        let _input = context
         433  +
            .input()
         434  +
            .downcast_ref::<UpdateMaintenanceWindowTargetInput>()
         435  +
            .ok_or("failed to downcast to UpdateMaintenanceWindowTargetInput")?;
         436  +
         437  +
        let params = crate::config::endpoint::Params::builder()
         438  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         439  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         440  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         441  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         442  +
            .build()
         443  +
            .map_err(|err| {
         444  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         445  +
            })?;
         446  +
        cfg.interceptor_state()
         447  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         448  +
        ::std::result::Result::Ok(())
         449  +
    }
         450  +
}
         451  +
         452  +
// The get_* functions below are generated from JMESPath expressions in the
         453  +
// operationContextParams trait. They target the operation's input shape.
         454  +
         455  +
/// Error type for the `UpdateMaintenanceWindowTargetError` operation.
         456  +
#[non_exhaustive]
         457  +
#[derive(::std::fmt::Debug)]
         458  +
pub enum UpdateMaintenanceWindowTargetError {
         459  +
    /// <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p>
         460  +
    /// <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
         461  +
    DoesNotExistException(crate::types::error::DoesNotExistException),
         462  +
    /// <p>An error occurred on the server side.</p>
         463  +
    InternalServerError(crate::types::error::InternalServerError),
         464  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         465  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         466  +
    variable wildcard pattern and check `.code()`:
         467  +
     \
         468  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         469  +
     \
         470  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateMaintenanceWindowTargetError) for what information is available for the error.")]
         471  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         472  +
}
         473  +
impl UpdateMaintenanceWindowTargetError {
         474  +
    /// Creates the `UpdateMaintenanceWindowTargetError::Unhandled` variant from any error type.
         475  +
    pub fn unhandled(
         476  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         477  +
    ) -> Self {
         478  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         479  +
            source: err.into(),
         480  +
            meta: ::std::default::Default::default(),
         481  +
        })
         482  +
    }
         483  +
         484  +
    /// Creates the `UpdateMaintenanceWindowTargetError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         485  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         486  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         487  +
            source: err.clone().into(),
         488  +
            meta: err,
         489  +
        })
         490  +
    }
         491  +
    ///
         492  +
    /// Returns error metadata, which includes the error code, message,
         493  +
    /// request ID, and potentially additional information.
         494  +
    ///
         495  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         496  +
        match self {
         497  +
            Self::DoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         498  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         499  +
            Self::Unhandled(e) => &e.meta,
         500  +
        }
         501  +
    }
         502  +
    /// Returns `true` if the error kind is `UpdateMaintenanceWindowTargetError::DoesNotExistException`.
         503  +
    pub fn is_does_not_exist_exception(&self) -> bool {
         504  +
        matches!(self, Self::DoesNotExistException(_))
         505  +
    }
         506  +
    /// Returns `true` if the error kind is `UpdateMaintenanceWindowTargetError::InternalServerError`.
         507  +
    pub fn is_internal_server_error(&self) -> bool {
         508  +
        matches!(self, Self::InternalServerError(_))
         509  +
    }
         510  +
}
         511  +
impl ::std::error::Error for UpdateMaintenanceWindowTargetError {
         512  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         513  +
        match self {
         514  +
            Self::DoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
         515  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         516  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         517  +
        }
         518  +
    }
         519  +
}
         520  +
impl ::std::fmt::Display for UpdateMaintenanceWindowTargetError {
         521  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         522  +
        match self {
         523  +
            Self::DoesNotExistException(_inner) => _inner.fmt(f),
         524  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         525  +
            Self::Unhandled(_inner) => {
         526  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         527  +
                    write!(f, "unhandled error ({code})")
         528  +
                } else {
         529  +
                    f.write_str("unhandled error")
         530  +
                }
         531  +
            }
         532  +
        }
         533  +
    }
         534  +
}
         535  +
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateMaintenanceWindowTargetError {
         536  +
    fn code(&self) -> ::std::option::Option<&str> {
         537  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         538  +
    }
         539  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         540  +
        ::std::option::Option::None
         541  +
    }
         542  +
}
         543  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateMaintenanceWindowTargetError {
         544  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         545  +
        match self {
         546  +
            Self::DoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         547  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         548  +
            Self::Unhandled(_inner) => &_inner.meta,
         549  +
        }
         550  +
    }
         551  +
}
         552  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateMaintenanceWindowTargetError {
         553  +
    fn create_unhandled_error(
         554  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         555  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         556  +
    ) -> Self {
         557  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         558  +
            source,
         559  +
            meta: meta.unwrap_or_default(),
         560  +
        })
         561  +
    }
         562  +
}
         563  +
impl ::aws_types::request_id::RequestId for crate::operation::update_maintenance_window_target::UpdateMaintenanceWindowTargetError {
         564  +
    fn request_id(&self) -> Option<&str> {
         565  +
        self.meta().request_id()
         566  +
    }
         567  +
}
         568  +
         569  +
pub use crate::operation::update_maintenance_window_target::_update_maintenance_window_target_input::UpdateMaintenanceWindowTargetInput;
         570  +
         571  +
pub use crate::operation::update_maintenance_window_target::_update_maintenance_window_target_output::UpdateMaintenanceWindowTargetOutput;
         572  +
         573  +
mod _update_maintenance_window_target_input;
         574  +
         575  +
mod _update_maintenance_window_target_output;
         576  +
         577  +
/// Builders
         578  +
pub mod builders;

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_maintenance_window_target/_update_maintenance_window_target_input.rs

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