AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,742 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `RegisterTaskWithMaintenanceWindow`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct RegisterTaskWithMaintenanceWindow;
           6  +
impl RegisterTaskWithMaintenanceWindow {
           7  +
    /// Creates a new `RegisterTaskWithMaintenanceWindow`
           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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
          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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError>()
          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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput>()
          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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput,
          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(
          61  +
            "SSM",
          62  +
            "RegisterTaskWithMaintenanceWindow",
          63  +
            input,
          64  +
            runtime_plugins,
          65  +
            stop_point,
          66  +
        )
          67  +
        // Create a parent span for the entire operation. Includes a random, internal-only,
          68  +
        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          69  +
        .instrument(::tracing::debug_span!(
          70  +
            "SSM.RegisterTaskWithMaintenanceWindow",
          71  +
            "rpc.service" = "SSM",
          72  +
            "rpc.method" = "RegisterTaskWithMaintenanceWindow",
          73  +
            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          74  +
            "rpc.system" = "aws-api",
          75  +
        ))
          76  +
        .await
          77  +
    }
          78  +
          79  +
    pub(crate) fn operation_runtime_plugins(
          80  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          81  +
        client_config: &crate::config::Config,
          82  +
        config_override: ::std::option::Option<crate::config::Builder>,
          83  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          84  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          85  +
        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
          86  +
            |token_provider, input| {
          87  +
                let input: &mut crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput =
          88  +
                    input.downcast_mut().expect("correct type");
          89  +
                if input.client_token.is_none() {
          90  +
                    input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
          91  +
                }
          92  +
            },
          93  +
        ));
          94  +
        if let ::std::option::Option::Some(config_override) = config_override {
          95  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          96  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          97  +
            }
          98  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          99  +
                config_override,
         100  +
                client_config.config.clone(),
         101  +
                &client_config.runtime_components,
         102  +
            ));
         103  +
        }
         104  +
        runtime_plugins
         105  +
    }
         106  +
}
         107  +
/// Per-operation error registry. Contains an entry for every modeled
         108  +
/// error this operation can throw.
         109  +
///
         110  +
/// Used by the schema-serde error path as the operation-scoped lookup
         111  +
/// for registry-backed error reification: an error code that does not
         112  +
/// match one of the operation's modeled errors directly is resolved
         113  +
/// against this registry first, then widened to the service-wide error
         114  +
/// registry.
         115  +
pub(crate) mod error_registry {
         116  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         117  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         118  +
                            .insert_error_shape(
         119  +
                        crate::types::error::DoesNotExistException::SCHEMA,
         120  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         121  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DoesNotExistException::deserialize(d)?))
         122  +
                        },
         123  +
                        |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> {
         124  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DoesNotExistException::deserialize(d)?))
         125  +
                        },
         126  +
                    )
         127  +
.insert_error_shape(
         128  +
                        crate::types::error::FeatureNotAvailableException::SCHEMA,
         129  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         130  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::FeatureNotAvailableException::deserialize(d)?))
         131  +
                        },
         132  +
                        |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> {
         133  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::FeatureNotAvailableException::deserialize(d)?))
         134  +
                        },
         135  +
                    )
         136  +
.insert_error_shape(
         137  +
                        crate::types::error::IdempotentParameterMismatch::SCHEMA,
         138  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         139  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::IdempotentParameterMismatch::deserialize(d)?))
         140  +
                        },
         141  +
                        |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> {
         142  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::IdempotentParameterMismatch::deserialize(d)?))
         143  +
                        },
         144  +
                    )
         145  +
.insert_error_shape(
         146  +
                        crate::types::error::InternalServerError::SCHEMA,
         147  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         148  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         149  +
                        },
         150  +
                        |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> {
         151  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         152  +
                        },
         153  +
                    )
         154  +
.insert_error_shape(
         155  +
                        crate::types::error::ResourceLimitExceededException::SCHEMA,
         156  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         157  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceLimitExceededException::deserialize(d)?))
         158  +
                        },
         159  +
                        |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> {
         160  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceLimitExceededException::deserialize(d)?))
         161  +
                        },
         162  +
                    )
         163  +
                            .build()
         164  +
    });
         165  +
}
         166  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RegisterTaskWithMaintenanceWindow {
         167  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         168  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RegisterTaskWithMaintenanceWindow");
         169  +
         170  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         171  +
            RegisterTaskWithMaintenanceWindowRequestSerializer,
         172  +
        ));
         173  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         174  +
            RegisterTaskWithMaintenanceWindowResponseDeserializer,
         175  +
        ));
         176  +
         177  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         178  +
            crate::config::auth::Params::builder()
         179  +
                .operation_name("RegisterTaskWithMaintenanceWindow")
         180  +
                .build()
         181  +
                .expect("required fields set"),
         182  +
        ));
         183  +
         184  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         185  +
            "RegisterTaskWithMaintenanceWindow",
         186  +
            "SSM",
         187  +
        ));
         188  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         189  +
        signing_options.double_uri_encode = true;
         190  +
        signing_options.content_sha256_header = false;
         191  +
        signing_options.normalize_uri_path = true;
         192  +
        signing_options.payload_override = None;
         193  +
         194  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         195  +
            signing_options,
         196  +
            ..::std::default::Default::default()
         197  +
        });
         198  +
         199  +
        ::std::option::Option::Some(cfg.freeze())
         200  +
    }
         201  +
         202  +
    fn runtime_components(
         203  +
        &self,
         204  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         205  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         206  +
        #[allow(unused_mut)]
         207  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RegisterTaskWithMaintenanceWindow")
         208  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         209  +
                RegisterTaskWithMaintenanceWindowTelemetryInputCaptureInterceptor,
         210  +
            ))
         211  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         212  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         213  +
            ))
         214  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         215  +
                RegisterTaskWithMaintenanceWindowEndpointParamsInterceptor,
         216  +
            ))
         217  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         218  +
                crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
         219  +
            >::new())
         220  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         221  +
                crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
         222  +
            >::new())
         223  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         224  +
                crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
         225  +
            >::new())
         226  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         227  +
                crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
         228  +
            >::new());
         229  +
         230  +
        ::std::borrow::Cow::Owned(rcb)
         231  +
    }
         232  +
}
         233  +
         234  +
#[derive(Debug)]
         235  +
struct RegisterTaskWithMaintenanceWindowTelemetryInputCaptureInterceptor;
         236  +
         237  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         238  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RegisterTaskWithMaintenanceWindowTelemetryInputCaptureInterceptor {
         239  +
    fn name(&self) -> &'static str {
         240  +
        "RegisterTaskWithMaintenanceWindowTelemetryInputCaptureInterceptor"
         241  +
    }
         242  +
         243  +
    fn read_before_execution(
         244  +
        &self,
         245  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         246  +
            '_,
         247  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         248  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         249  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         250  +
        >,
         251  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         252  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         253  +
        // Nothing to do unless the customer opted in by naming members to record.
         254  +
        let ::std::option::Option::Some(requested) = cfg
         255  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         256  +
            .filter(|r| !r.is_empty())
         257  +
        else {
         258  +
            return ::std::result::Result::Ok(());
         259  +
        };
         260  +
         261  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<RegisterTaskWithMaintenanceWindowInput>() else {
         262  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         263  +
            return ::std::result::Result::Ok(());
         264  +
        };
         265  +
         266  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         267  +
        if requested.should_capture("WindowId") {
         268  +
            if let ::std::option::Option::Some(value) = input.window_id.as_deref() {
         269  +
                captured.insert("WindowId", value);
         270  +
            }
         271  +
        }
         272  +
        if requested.should_capture("TaskArn") {
         273  +
            if let ::std::option::Option::Some(value) = input.task_arn.as_deref() {
         274  +
                captured.insert("TaskArn", value);
         275  +
            }
         276  +
        }
         277  +
        if requested.should_capture("ServiceRoleArn") {
         278  +
            if let ::std::option::Option::Some(value) = input.service_role_arn.as_deref() {
         279  +
                captured.insert("ServiceRoleArn", value);
         280  +
            }
         281  +
        }
         282  +
        if requested.should_capture("MaxConcurrency") {
         283  +
            if let ::std::option::Option::Some(value) = input.max_concurrency.as_deref() {
         284  +
                captured.insert("MaxConcurrency", value);
         285  +
            }
         286  +
        }
         287  +
        if requested.should_capture("MaxErrors") {
         288  +
            if let ::std::option::Option::Some(value) = input.max_errors.as_deref() {
         289  +
                captured.insert("MaxErrors", value);
         290  +
            }
         291  +
        }
         292  +
        if requested.should_capture("Name") {
         293  +
            if let ::std::option::Option::Some(value) = input.name.as_deref() {
         294  +
                captured.insert("Name", value);
         295  +
            }
         296  +
        }
         297  +
        if requested.should_capture("ClientToken") {
         298  +
            if let ::std::option::Option::Some(value) = input.client_token.as_deref() {
         299  +
                captured.insert("ClientToken", value);
         300  +
            }
         301  +
        }
         302  +
         303  +
        cfg.interceptor_state().store_put(captured);
         304  +
        ::std::result::Result::Ok(())
         305  +
    }
         306  +
}
         307  +
#[derive(Debug)]
         308  +
struct RegisterTaskWithMaintenanceWindowResponseDeserializer;
         309  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RegisterTaskWithMaintenanceWindowResponseDeserializer {
         310  +
    fn deserialize_nonstreaming_with_config(
         311  +
        &self,
         312  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         313  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         314  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         315  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         316  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         317  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         318  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         319  +
        // loads `body` before firing this hook.
         320  +
        let body = response.body().bytes().expect("body loaded");
         321  +
        let headers = response.headers();
         322  +
        #[allow(unused_mut)]
         323  +
        let mut force_error = false;
         324  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         325  +
        if !success && status != 200 || force_error {
         326  +
            let protocol = _cfg
         327  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         328  +
                .expect("a SharedClientProtocol is required");
         329  +
            #[allow(unused_mut)]
         330  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         331  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         332  +
            })?;
         333  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         334  +
            let generic = generic_builder.build();
         335  +
            let error_code = match generic.code() {
         336  +
                ::std::option::Option::Some(code) => code,
         337  +
                ::std::option::Option::None => {
         338  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         339  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         340  +
                            crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::unhandled(generic),
         341  +
                        ),
         342  +
                    ))
         343  +
                }
         344  +
            };
         345  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         346  +
            let err = match error_code {
         347  +
                "DoesNotExistException" => {
         348  +
                    crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::DoesNotExistException({
         349  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         350  +
                            crate::types::error::DoesNotExistException::deserialize_with_response(
         351  +
                                &mut *deser,
         352  +
                                response.headers(),
         353  +
                                response.status().into(),
         354  +
                                body,
         355  +
                            )
         356  +
                        }) {
         357  +
                            ::std::result::Result::Ok(val) => val,
         358  +
                            ::std::result::Result::Err(e) => {
         359  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         360  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         361  +
                                ))
         362  +
                            }
         363  +
                        };
         364  +
                        tmp.meta = generic;
         365  +
                        if tmp.message.is_none() {
         366  +
                            tmp.message = _error_message;
         367  +
                        }
         368  +
                        tmp
         369  +
                    })
         370  +
                }
         371  +
                "FeatureNotAvailableException" => {
         372  +
                    crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::FeatureNotAvailableException({
         373  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         374  +
                            crate::types::error::FeatureNotAvailableException::deserialize_with_response(
         375  +
                                &mut *deser,
         376  +
                                response.headers(),
         377  +
                                response.status().into(),
         378  +
                                body,
         379  +
                            )
         380  +
                        }) {
         381  +
                            ::std::result::Result::Ok(val) => val,
         382  +
                            ::std::result::Result::Err(e) => {
         383  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         384  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         385  +
                                ))
         386  +
                            }
         387  +
                        };
         388  +
                        tmp.meta = generic;
         389  +
                        if tmp.message.is_none() {
         390  +
                            tmp.message = _error_message;
         391  +
                        }
         392  +
                        tmp
         393  +
                    })
         394  +
                }
         395  +
                "IdempotentParameterMismatch" => {
         396  +
                    crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::IdempotentParameterMismatch({
         397  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         398  +
                            crate::types::error::IdempotentParameterMismatch::deserialize_with_response(
         399  +
                                &mut *deser,
         400  +
                                response.headers(),
         401  +
                                response.status().into(),
         402  +
                                body,
         403  +
                            )
         404  +
                        }) {
         405  +
                            ::std::result::Result::Ok(val) => val,
         406  +
                            ::std::result::Result::Err(e) => {
         407  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         408  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         409  +
                                ))
         410  +
                            }
         411  +
                        };
         412  +
                        tmp.meta = generic;
         413  +
                        if tmp.message.is_none() {
         414  +
                            tmp.message = _error_message;
         415  +
                        }
         416  +
                        tmp
         417  +
                    })
         418  +
                }
         419  +
                "InternalServerError" => {
         420  +
                    crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::InternalServerError({
         421  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         422  +
                            crate::types::error::InternalServerError::deserialize_with_response(
         423  +
                                &mut *deser,
         424  +
                                response.headers(),
         425  +
                                response.status().into(),
         426  +
                                body,
         427  +
                            )
         428  +
                        }) {
         429  +
                            ::std::result::Result::Ok(val) => val,
         430  +
                            ::std::result::Result::Err(e) => {
         431  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         432  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         433  +
                                ))
         434  +
                            }
         435  +
                        };
         436  +
                        tmp.meta = generic;
         437  +
                        if tmp.message.is_none() {
         438  +
                            tmp.message = _error_message;
         439  +
                        }
         440  +
                        tmp
         441  +
                    })
         442  +
                }
         443  +
                "ResourceLimitExceededException" => {
         444  +
                    crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::ResourceLimitExceededException({
         445  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         446  +
                            crate::types::error::ResourceLimitExceededException::deserialize_with_response(
         447  +
                                &mut *deser,
         448  +
                                response.headers(),
         449  +
                                response.status().into(),
         450  +
                                body,
         451  +
                            )
         452  +
                        }) {
         453  +
                            ::std::result::Result::Ok(val) => val,
         454  +
                            ::std::result::Result::Err(e) => {
         455  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         456  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         457  +
                                ))
         458  +
                            }
         459  +
                        };
         460  +
                        tmp.meta = generic;
         461  +
                        if tmp.message.is_none() {
         462  +
                            tmp.message = _error_message;
         463  +
                        }
         464  +
                        tmp
         465  +
                    })
         466  +
                }
         467  +
                _ => {
         468  +
                    // Registry-backed, operation-scoped reification of an error whose
         469  +
                    // code this operation does not model directly: the operation's own
         470  +
                    // error registry is consulted first, then the lookup widens to the
         471  +
                    // service-wide error registry. On a hit, the reified error is attached
         472  +
                    // as the source of the returned unhandled error while its metadata
         473  +
                    // (code, message, request id) is preserved; on a miss the generic
         474  +
                    // error is returned unchanged.
         475  +
                    match protocol
         476  +
                        .deserialize_error_response(response, _cfg)
         477  +
                        .ok()
         478  +
                        .and_then(|mut deser| {
         479  +
                            ::aws_smithy_schema::registry::reify_error(
         480  +
                                crate::operation::register_task_with_maintenance_window::error_registry::REGISTRY
         481  +
                                    .or(&crate::error_type_registry::REGISTRY),
         482  +
                                error_code,
         483  +
                                &mut *deser,
         484  +
                            )
         485  +
                        }) {
         486  +
                        ::std::option::Option::Some(source) => <crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         487  +
                        ::std::option::Option::None => crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError::generic(generic),
         488  +
                    }
         489  +
                }
         490  +
            };
         491  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         492  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         493  +
            ))
         494  +
        } else {
         495  +
            let protocol = _cfg
         496  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         497  +
                .expect("a SharedClientProtocol is required");
         498  +
            let mut deser = protocol
         499  +
                .deserialize_response(response, RegisterTaskWithMaintenanceWindow::OUTPUT_SCHEMA, _cfg)
         500  +
                .map_err(|e| {
         501  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         502  +
                })?;
         503  +
            // body and headers are already in scope from the top of the function;
         504  +
            // alias `headers` as `_response_headers` so MutateOutput
         505  +
            // customizations have a stable name to read from.
         506  +
            let _response_headers = headers;
         507  +
            #[allow(unused_mut)]
         508  +
            let mut output =
         509  +
                crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput::deserialize_with_response(
         510  +
                    &mut *deser,
         511  +
                    _response_headers,
         512  +
                    response.status().into(),
         513  +
                    body,
         514  +
                )
         515  +
                .map_err(|e| {
         516  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         517  +
                })?;
         518  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         519  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         520  +
        }
         521  +
    }
         522  +
}
         523  +
#[derive(Debug)]
         524  +
struct RegisterTaskWithMaintenanceWindowRequestSerializer;
         525  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RegisterTaskWithMaintenanceWindowRequestSerializer {
         526  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         527  +
    fn serialize_input(
         528  +
        &self,
         529  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         530  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         531  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         532  +
        let input = input
         533  +
            .downcast::<crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput>()
         534  +
            .expect("correct type");
         535  +
         536  +
        let protocol = _cfg
         537  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         538  +
            .expect("a SharedClientProtocol is required");
         539  +
        let mut request = protocol
         540  +
            .serialize_request(&input, RegisterTaskWithMaintenanceWindow::INPUT_SCHEMA, "/", _cfg)
         541  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         542  +
         543  +
        return ::std::result::Result::Ok(request);
         544  +
    }
         545  +
}
         546  +
#[derive(Debug)]
         547  +
struct RegisterTaskWithMaintenanceWindowEndpointParamsInterceptor;
         548  +
         549  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         550  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RegisterTaskWithMaintenanceWindowEndpointParamsInterceptor {
         551  +
    fn name(&self) -> &'static str {
         552  +
        "RegisterTaskWithMaintenanceWindowEndpointParamsInterceptor"
         553  +
    }
         554  +
         555  +
    fn read_before_execution(
         556  +
        &self,
         557  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         558  +
            '_,
         559  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         560  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         561  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         562  +
        >,
         563  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         564  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         565  +
        let _input = context
         566  +
            .input()
         567  +
            .downcast_ref::<RegisterTaskWithMaintenanceWindowInput>()
         568  +
            .ok_or("failed to downcast to RegisterTaskWithMaintenanceWindowInput")?;
         569  +
         570  +
        let params = crate::config::endpoint::Params::builder()
         571  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         572  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         573  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         574  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         575  +
            .build()
         576  +
            .map_err(|err| {
         577  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         578  +
            })?;
         579  +
        cfg.interceptor_state()
         580  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         581  +
        ::std::result::Result::Ok(())
         582  +
    }
         583  +
}
         584  +
         585  +
// The get_* functions below are generated from JMESPath expressions in the
         586  +
// operationContextParams trait. They target the operation's input shape.
         587  +
         588  +
/// Error type for the `RegisterTaskWithMaintenanceWindowError` operation.
         589  +
#[non_exhaustive]
         590  +
#[derive(::std::fmt::Debug)]
         591  +
pub enum RegisterTaskWithMaintenanceWindowError {
         592  +
    /// <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p>
         593  +
    /// <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>
         594  +
    DoesNotExistException(crate::types::error::DoesNotExistException),
         595  +
    /// <p>You attempted to register a <code>LAMBDA</code> or <code>STEP_FUNCTIONS</code> task in a region where the corresponding service isn't available.</p>
         596  +
    FeatureNotAvailableException(crate::types::error::FeatureNotAvailableException),
         597  +
    /// <p>Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token.</p>
         598  +
    IdempotentParameterMismatch(crate::types::error::IdempotentParameterMismatch),
         599  +
    /// <p>An error occurred on the server side.</p>
         600  +
    InternalServerError(crate::types::error::InternalServerError),
         601  +
    /// <p>Error returned when the caller has exceeded the default resource quotas. For example, too many maintenance windows or patch baselines have been created.</p>
         602  +
    /// <p>For information about resource quotas in 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>
         603  +
    ResourceLimitExceededException(crate::types::error::ResourceLimitExceededException),
         604  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         605  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         606  +
    variable wildcard pattern and check `.code()`:
         607  +
     \
         608  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         609  +
     \
         610  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RegisterTaskWithMaintenanceWindowError) for what information is available for the error.")]
         611  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         612  +
}
         613  +
impl RegisterTaskWithMaintenanceWindowError {
         614  +
    /// Creates the `RegisterTaskWithMaintenanceWindowError::Unhandled` variant from any error type.
         615  +
    pub fn unhandled(
         616  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         617  +
    ) -> Self {
         618  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         619  +
            source: err.into(),
         620  +
            meta: ::std::default::Default::default(),
         621  +
        })
         622  +
    }
         623  +
         624  +
    /// Creates the `RegisterTaskWithMaintenanceWindowError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         625  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         626  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         627  +
            source: err.clone().into(),
         628  +
            meta: err,
         629  +
        })
         630  +
    }
         631  +
    ///
         632  +
    /// Returns error metadata, which includes the error code, message,
         633  +
    /// request ID, and potentially additional information.
         634  +
    ///
         635  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         636  +
        match self {
         637  +
            Self::DoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         638  +
            Self::FeatureNotAvailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         639  +
            Self::IdempotentParameterMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         640  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         641  +
            Self::ResourceLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         642  +
            Self::Unhandled(e) => &e.meta,
         643  +
        }
         644  +
    }
         645  +
    /// Returns `true` if the error kind is `RegisterTaskWithMaintenanceWindowError::DoesNotExistException`.
         646  +
    pub fn is_does_not_exist_exception(&self) -> bool {
         647  +
        matches!(self, Self::DoesNotExistException(_))
         648  +
    }
         649  +
    /// Returns `true` if the error kind is `RegisterTaskWithMaintenanceWindowError::FeatureNotAvailableException`.
         650  +
    pub fn is_feature_not_available_exception(&self) -> bool {
         651  +
        matches!(self, Self::FeatureNotAvailableException(_))
         652  +
    }
         653  +
    /// Returns `true` if the error kind is `RegisterTaskWithMaintenanceWindowError::IdempotentParameterMismatch`.
         654  +
    pub fn is_idempotent_parameter_mismatch(&self) -> bool {
         655  +
        matches!(self, Self::IdempotentParameterMismatch(_))
         656  +
    }
         657  +
    /// Returns `true` if the error kind is `RegisterTaskWithMaintenanceWindowError::InternalServerError`.
         658  +
    pub fn is_internal_server_error(&self) -> bool {
         659  +
        matches!(self, Self::InternalServerError(_))
         660  +
    }
         661  +
    /// Returns `true` if the error kind is `RegisterTaskWithMaintenanceWindowError::ResourceLimitExceededException`.
         662  +
    pub fn is_resource_limit_exceeded_exception(&self) -> bool {
         663  +
        matches!(self, Self::ResourceLimitExceededException(_))
         664  +
    }
         665  +
}
         666  +
impl ::std::error::Error for RegisterTaskWithMaintenanceWindowError {
         667  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         668  +
        match self {
         669  +
            Self::DoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
         670  +
            Self::FeatureNotAvailableException(_inner) => ::std::option::Option::Some(_inner),
         671  +
            Self::IdempotentParameterMismatch(_inner) => ::std::option::Option::Some(_inner),
         672  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         673  +
            Self::ResourceLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
         674  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         675  +
        }
         676  +
    }
         677  +
}
         678  +
impl ::std::fmt::Display for RegisterTaskWithMaintenanceWindowError {
         679  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         680  +
        match self {
         681  +
            Self::DoesNotExistException(_inner) => _inner.fmt(f),
         682  +
            Self::FeatureNotAvailableException(_inner) => _inner.fmt(f),
         683  +
            Self::IdempotentParameterMismatch(_inner) => _inner.fmt(f),
         684  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         685  +
            Self::ResourceLimitExceededException(_inner) => _inner.fmt(f),
         686  +
            Self::Unhandled(_inner) => {
         687  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         688  +
                    write!(f, "unhandled error ({code})")
         689  +
                } else {
         690  +
                    f.write_str("unhandled error")
         691  +
                }
         692  +
            }
         693  +
        }
         694  +
    }
         695  +
}
         696  +
impl ::aws_smithy_types::retry::ProvideErrorKind for RegisterTaskWithMaintenanceWindowError {
         697  +
    fn code(&self) -> ::std::option::Option<&str> {
         698  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         699  +
    }
         700  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         701  +
        ::std::option::Option::None
         702  +
    }
         703  +
}
         704  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RegisterTaskWithMaintenanceWindowError {
         705  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         706  +
        match self {
         707  +
            Self::DoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         708  +
            Self::FeatureNotAvailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         709  +
            Self::IdempotentParameterMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         710  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         711  +
            Self::ResourceLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         712  +
            Self::Unhandled(_inner) => &_inner.meta,
         713  +
        }
         714  +
    }
         715  +
}
         716  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RegisterTaskWithMaintenanceWindowError {
         717  +
    fn create_unhandled_error(
         718  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         719  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         720  +
    ) -> Self {
         721  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         722  +
            source,
         723  +
            meta: meta.unwrap_or_default(),
         724  +
        })
         725  +
    }
         726  +
}
         727  +
impl ::aws_types::request_id::RequestId for crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError {
         728  +
    fn request_id(&self) -> Option<&str> {
         729  +
        self.meta().request_id()
         730  +
    }
         731  +
}
         732  +
         733  +
pub use crate::operation::register_task_with_maintenance_window::_register_task_with_maintenance_window_input::RegisterTaskWithMaintenanceWindowInput;
         734  +
         735  +
pub use crate::operation::register_task_with_maintenance_window::_register_task_with_maintenance_window_output::RegisterTaskWithMaintenanceWindowOutput;
         736  +
         737  +
mod _register_task_with_maintenance_window_input;
         738  +
         739  +
mod _register_task_with_maintenance_window_output;
         740  +
         741  +
/// Builders
         742  +
pub mod builders;

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

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