AWS SDK

AWS SDK

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3 (ignoring whitespace)

Files changed:

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

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

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

@@ -0,1 +0,271 @@
           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, ::std::fmt::Debug)]
           5  +
pub struct GetDeployablePatchSnapshotForInstanceInput {
           6  +
    /// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
           7  +
    pub instance_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
           9  +
    pub snapshot_id: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>Defines the basic information about a patch baseline override.</p>
          11  +
    pub baseline_override: ::std::option::Option<crate::types::BaselineOverride>,
          12  +
    /// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
          13  +
    pub use_s3_dual_stack_endpoint: ::std::option::Option<bool>,
          14  +
}
          15  +
impl GetDeployablePatchSnapshotForInstanceInput {
          16  +
    /// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
          17  +
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
          18  +
        self.instance_id.as_deref()
          19  +
    }
          20  +
    /// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
          21  +
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
          22  +
        self.snapshot_id.as_deref()
          23  +
    }
          24  +
    /// <p>Defines the basic information about a patch baseline override.</p>
          25  +
    pub fn baseline_override(&self) -> ::std::option::Option<&crate::types::BaselineOverride> {
          26  +
        self.baseline_override.as_ref()
          27  +
    }
          28  +
    /// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
          29  +
    pub fn use_s3_dual_stack_endpoint(&self) -> ::std::option::Option<bool> {
          30  +
        self.use_s3_dual_stack_endpoint
          31  +
    }
          32  +
}
          33  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceInput$InstanceId",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "GetDeployablePatchSnapshotForInstanceInput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::String,
          40  +
    "InstanceId",
          41  +
    0,
          42  +
);
          43  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_SNAPSHOT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          44  +
    ::aws_smithy_schema::ShapeId::from_parts(
          45  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceInput$SnapshotId",
          46  +
        "com.amazonaws.ssm.synthetic",
          47  +
        "GetDeployablePatchSnapshotForInstanceInput",
          48  +
    ),
          49  +
    ::aws_smithy_schema::ShapeType::String,
          50  +
    "SnapshotId",
          51  +
    1,
          52  +
);
          53  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_BASELINE_OVERRIDE: ::aws_smithy_schema::Schema<'static> =
          54  +
    ::aws_smithy_schema::Schema::new_member(
          55  +
        ::aws_smithy_schema::ShapeId::from_parts(
          56  +
            "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceInput$BaselineOverride",
          57  +
            "com.amazonaws.ssm.synthetic",
          58  +
            "GetDeployablePatchSnapshotForInstanceInput",
          59  +
        ),
          60  +
        ::aws_smithy_schema::ShapeType::Structure,
          61  +
        "BaselineOverride",
          62  +
        2,
          63  +
    );
          64  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_USE_S3_DUAL_STACK_ENDPOINT: ::aws_smithy_schema::Schema<'static> =
          65  +
    ::aws_smithy_schema::Schema::new_member(
          66  +
        ::aws_smithy_schema::ShapeId::from_parts(
          67  +
            "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceInput$UseS3DualStackEndpoint",
          68  +
            "com.amazonaws.ssm.synthetic",
          69  +
            "GetDeployablePatchSnapshotForInstanceInput",
          70  +
        ),
          71  +
        ::aws_smithy_schema::ShapeType::Boolean,
          72  +
        "UseS3DualStackEndpoint",
          73  +
        3,
          74  +
    );
          75  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          76  +
    ::aws_smithy_schema::ShapeId::from_parts(
          77  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceInput",
          78  +
        "com.amazonaws.ssm.synthetic",
          79  +
        "GetDeployablePatchSnapshotForInstanceInput",
          80  +
    ),
          81  +
    ::aws_smithy_schema::ShapeType::Structure,
          82  +
    &[
          83  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_INSTANCE_ID,
          84  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_SNAPSHOT_ID,
          85  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_BASELINE_OVERRIDE,
          86  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_USE_S3_DUAL_STACK_ENDPOINT,
          87  +
    ],
          88  +
)
          89  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          90  +
.with_original_name("GetDeployablePatchSnapshotForInstanceRequest");
          91  +
impl GetDeployablePatchSnapshotForInstanceInput {
          92  +
    /// The schema for this shape.
          93  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_SCHEMA;
          94  +
}
          95  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetDeployablePatchSnapshotForInstanceInput {
          96  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          97  +
    fn serialize_members(
          98  +
        &self,
          99  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         100  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         101  +
        if let Some(ref val) = self.instance_id {
         102  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_INSTANCE_ID, val)?;
         103  +
        }
         104  +
        if let Some(ref val) = self.snapshot_id {
         105  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_SNAPSHOT_ID, val)?;
         106  +
        }
         107  +
        if let Some(ref val) = self.baseline_override {
         108  +
            ser.write_struct(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_BASELINE_OVERRIDE, val)?;
         109  +
        }
         110  +
        if let Some(ref val) = self.use_s3_dual_stack_endpoint {
         111  +
            ser.write_boolean(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_MEMBER_USE_S3_DUAL_STACK_ENDPOINT, *val)?;
         112  +
        }
         113  +
        Ok(())
         114  +
    }
         115  +
}
         116  +
impl GetDeployablePatchSnapshotForInstanceInput {
         117  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         118  +
    pub fn deserialize(
         119  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         120  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         121  +
        #[allow(unused_variables, unused_mut)]
         122  +
        let mut builder = Self::builder();
         123  +
        #[allow(
         124  +
            unused_variables,
         125  +
            unreachable_code,
         126  +
            clippy::single_match,
         127  +
            clippy::match_single_binding,
         128  +
            clippy::diverging_sub_expression
         129  +
        )]
         130  +
        deserializer.read_struct(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEINPUT_SCHEMA, &mut |member, deser| {
         131  +
            match member.member_index() {
         132  +
                Some(0) => {
         133  +
                    if deser.is_null() {
         134  +
                        deser.read_null()?;
         135  +
                    } else {
         136  +
                        builder.instance_id = Some(deser.read_string(member)?);
         137  +
                    }
         138  +
                }
         139  +
                Some(1) => {
         140  +
                    if deser.is_null() {
         141  +
                        deser.read_null()?;
         142  +
                    } else {
         143  +
                        builder.snapshot_id = Some(deser.read_string(member)?);
         144  +
                    }
         145  +
                }
         146  +
                Some(2) => {
         147  +
                    if deser.is_null() {
         148  +
                        deser.read_null()?;
         149  +
                    } else {
         150  +
                        builder.baseline_override = Some(crate::types::BaselineOverride::deserialize(deser)?);
         151  +
                    }
         152  +
                }
         153  +
                Some(3) => {
         154  +
                    if deser.is_null() {
         155  +
                        deser.read_null()?;
         156  +
                    } else {
         157  +
                        builder.use_s3_dual_stack_endpoint = Some(deser.read_boolean(member)?);
         158  +
                    }
         159  +
                }
         160  +
                _ => {}
         161  +
            }
         162  +
            Ok(())
         163  +
        })?;
         164  +
        builder.instance_id = builder.instance_id.or(Some(String::new()));
         165  +
        builder.snapshot_id = builder.snapshot_id.or(Some(String::new()));
         166  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         167  +
    }
         168  +
}
         169  +
impl GetDeployablePatchSnapshotForInstanceInput {
         170  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         171  +
    pub fn deserialize_with_response(
         172  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         173  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         174  +
        _status: u16,
         175  +
        _body: &[u8],
         176  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         177  +
        Self::deserialize(deserializer)
         178  +
    }
         179  +
}
         180  +
impl GetDeployablePatchSnapshotForInstanceInput {
         181  +
    /// Creates a new builder-style object to manufacture [`GetDeployablePatchSnapshotForInstanceInput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceInput).
         182  +
    pub fn builder() -> crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceInputBuilder {
         183  +
        crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceInputBuilder::default()
         184  +
    }
         185  +
}
         186  +
         187  +
/// A builder for [`GetDeployablePatchSnapshotForInstanceInput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceInput).
         188  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         189  +
#[non_exhaustive]
         190  +
pub struct GetDeployablePatchSnapshotForInstanceInputBuilder {
         191  +
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
         192  +
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
         193  +
    pub(crate) baseline_override: ::std::option::Option<crate::types::BaselineOverride>,
         194  +
    pub(crate) use_s3_dual_stack_endpoint: ::std::option::Option<bool>,
         195  +
}
         196  +
impl GetDeployablePatchSnapshotForInstanceInputBuilder {
         197  +
    /// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
         198  +
    /// This field is required.
         199  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         200  +
        self.instance_id = ::std::option::Option::Some(input.into());
         201  +
        self
         202  +
    }
         203  +
    /// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
         204  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         205  +
        self.instance_id = input;
         206  +
        self
         207  +
    }
         208  +
    /// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
         209  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         210  +
        &self.instance_id
         211  +
    }
         212  +
    /// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
         213  +
    /// This field is required.
         214  +
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         215  +
        self.snapshot_id = ::std::option::Option::Some(input.into());
         216  +
        self
         217  +
    }
         218  +
    /// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
         219  +
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         220  +
        self.snapshot_id = input;
         221  +
        self
         222  +
    }
         223  +
    /// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
         224  +
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
         225  +
        &self.snapshot_id
         226  +
    }
         227  +
    /// <p>Defines the basic information about a patch baseline override.</p>
         228  +
    pub fn baseline_override(mut self, input: crate::types::BaselineOverride) -> Self {
         229  +
        self.baseline_override = ::std::option::Option::Some(input);
         230  +
        self
         231  +
    }
         232  +
    /// <p>Defines the basic information about a patch baseline override.</p>
         233  +
    pub fn set_baseline_override(mut self, input: ::std::option::Option<crate::types::BaselineOverride>) -> Self {
         234  +
        self.baseline_override = input;
         235  +
        self
         236  +
    }
         237  +
    /// <p>Defines the basic information about a patch baseline override.</p>
         238  +
    pub fn get_baseline_override(&self) -> &::std::option::Option<crate::types::BaselineOverride> {
         239  +
        &self.baseline_override
         240  +
    }
         241  +
    /// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
         242  +
    pub fn use_s3_dual_stack_endpoint(mut self, input: bool) -> Self {
         243  +
        self.use_s3_dual_stack_endpoint = ::std::option::Option::Some(input);
         244  +
        self
         245  +
    }
         246  +
    /// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
         247  +
    pub fn set_use_s3_dual_stack_endpoint(mut self, input: ::std::option::Option<bool>) -> Self {
         248  +
        self.use_s3_dual_stack_endpoint = input;
         249  +
        self
         250  +
    }
         251  +
    /// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
         252  +
    pub fn get_use_s3_dual_stack_endpoint(&self) -> &::std::option::Option<bool> {
         253  +
        &self.use_s3_dual_stack_endpoint
         254  +
    }
         255  +
    /// Consumes the builder and constructs a [`GetDeployablePatchSnapshotForInstanceInput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceInput).
         256  +
    pub fn build(
         257  +
        self,
         258  +
    ) -> ::std::result::Result<
         259  +
        crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceInput,
         260  +
        ::aws_smithy_types::error::operation::BuildError,
         261  +
    > {
         262  +
        ::std::result::Result::Ok(
         263  +
            crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceInput {
         264  +
                instance_id: self.instance_id,
         265  +
                snapshot_id: self.snapshot_id,
         266  +
                baseline_override: self.baseline_override,
         267  +
                use_s3_dual_stack_endpoint: self.use_s3_dual_stack_endpoint,
         268  +
            },
         269  +
        )
         270  +
    }
         271  +
}

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

@@ -0,1 +0,326 @@
           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, ::std::fmt::Debug)]
           5  +
pub struct GetDeployablePatchSnapshotForInstanceOutput {
           6  +
    /// <p>The managed node ID.</p>
           7  +
    pub instance_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The user-defined snapshot ID.</p>
           9  +
    pub snapshot_id: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.</p>
          11  +
    pub snapshot_download_url: ::std::option::Option<::std::string::String>,
          12  +
    /// <p>Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.</p>
          13  +
    pub product: ::std::option::Option<::std::string::String>,
          14  +
    _request_id: Option<String>,
          15  +
}
          16  +
impl GetDeployablePatchSnapshotForInstanceOutput {
          17  +
    /// <p>The managed node ID.</p>
          18  +
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
          19  +
        self.instance_id.as_deref()
          20  +
    }
          21  +
    /// <p>The user-defined snapshot ID.</p>
          22  +
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
          23  +
        self.snapshot_id.as_deref()
          24  +
    }
          25  +
    /// <p>A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.</p>
          26  +
    pub fn snapshot_download_url(&self) -> ::std::option::Option<&str> {
          27  +
        self.snapshot_download_url.as_deref()
          28  +
    }
          29  +
    /// <p>Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.</p>
          30  +
    pub fn product(&self) -> ::std::option::Option<&str> {
          31  +
        self.product.as_deref()
          32  +
    }
          33  +
}
          34  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          35  +
    ::aws_smithy_schema::ShapeId::from_parts(
          36  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceOutput$InstanceId",
          37  +
        "com.amazonaws.ssm.synthetic",
          38  +
        "GetDeployablePatchSnapshotForInstanceOutput",
          39  +
    ),
          40  +
    ::aws_smithy_schema::ShapeType::String,
          41  +
    "InstanceId",
          42  +
    0,
          43  +
);
          44  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceOutput$SnapshotId",
          47  +
        "com.amazonaws.ssm.synthetic",
          48  +
        "GetDeployablePatchSnapshotForInstanceOutput",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::String,
          51  +
    "SnapshotId",
          52  +
    1,
          53  +
);
          54  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_DOWNLOAD_URL: ::aws_smithy_schema::Schema<'static> =
          55  +
    ::aws_smithy_schema::Schema::new_member(
          56  +
        ::aws_smithy_schema::ShapeId::from_parts(
          57  +
            "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceOutput$SnapshotDownloadUrl",
          58  +
            "com.amazonaws.ssm.synthetic",
          59  +
            "GetDeployablePatchSnapshotForInstanceOutput",
          60  +
        ),
          61  +
        ::aws_smithy_schema::ShapeType::String,
          62  +
        "SnapshotDownloadUrl",
          63  +
        2,
          64  +
    );
          65  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_PRODUCT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          66  +
    ::aws_smithy_schema::ShapeId::from_parts(
          67  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceOutput$Product",
          68  +
        "com.amazonaws.ssm.synthetic",
          69  +
        "GetDeployablePatchSnapshotForInstanceOutput",
          70  +
    ),
          71  +
    ::aws_smithy_schema::ShapeType::String,
          72  +
    "Product",
          73  +
    3,
          74  +
);
          75  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> =
          76  +
    ::aws_smithy_schema::Schema::new_member(
          77  +
        ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          78  +
        ::aws_smithy_schema::ShapeType::String,
          79  +
        "request_id",
          80  +
        4,
          81  +
    )
          82  +
    .with_http_header("x-amzn-requestid");
          83  +
static GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          84  +
    ::aws_smithy_schema::ShapeId::from_parts(
          85  +
        "com.amazonaws.ssm.synthetic#GetDeployablePatchSnapshotForInstanceOutput",
          86  +
        "com.amazonaws.ssm.synthetic",
          87  +
        "GetDeployablePatchSnapshotForInstanceOutput",
          88  +
    ),
          89  +
    ::aws_smithy_schema::ShapeType::Structure,
          90  +
    &[
          91  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_INSTANCE_ID,
          92  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_ID,
          93  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_DOWNLOAD_URL,
          94  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_PRODUCT,
          95  +
        &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER__REQUEST_ID,
          96  +
    ],
          97  +
)
          98  +
.with_original_name("GetDeployablePatchSnapshotForInstanceResult");
          99  +
impl GetDeployablePatchSnapshotForInstanceOutput {
         100  +
    /// The schema for this shape.
         101  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_SCHEMA;
         102  +
}
         103  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetDeployablePatchSnapshotForInstanceOutput {
         104  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         105  +
    fn serialize_members(
         106  +
        &self,
         107  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         108  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         109  +
        if let Some(ref val) = self.instance_id {
         110  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_INSTANCE_ID, val)?;
         111  +
        }
         112  +
        if let Some(ref val) = self.snapshot_id {
         113  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_ID, val)?;
         114  +
        }
         115  +
        if let Some(ref val) = self.snapshot_download_url {
         116  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_SNAPSHOT_DOWNLOAD_URL, val)?;
         117  +
        }
         118  +
        if let Some(ref val) = self.product {
         119  +
            ser.write_string(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_MEMBER_PRODUCT, val)?;
         120  +
        }
         121  +
        Ok(())
         122  +
    }
         123  +
}
         124  +
impl GetDeployablePatchSnapshotForInstanceOutput {
         125  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         126  +
    pub fn deserialize(
         127  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         128  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         129  +
        #[allow(unused_variables, unused_mut)]
         130  +
        let mut builder = Self::builder();
         131  +
        #[allow(
         132  +
            unused_variables,
         133  +
            unreachable_code,
         134  +
            clippy::single_match,
         135  +
            clippy::match_single_binding,
         136  +
            clippy::diverging_sub_expression
         137  +
        )]
         138  +
        deserializer.read_struct(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_SCHEMA, &mut |member, deser| {
         139  +
            match member.member_index() {
         140  +
                Some(0) => {
         141  +
                    if deser.is_null() {
         142  +
                        deser.read_null()?;
         143  +
                    } else {
         144  +
                        builder.instance_id = Some(deser.read_string(member)?);
         145  +
                    }
         146  +
                }
         147  +
                Some(1) => {
         148  +
                    if deser.is_null() {
         149  +
                        deser.read_null()?;
         150  +
                    } else {
         151  +
                        builder.snapshot_id = Some(deser.read_string(member)?);
         152  +
                    }
         153  +
                }
         154  +
                Some(2) => {
         155  +
                    if deser.is_null() {
         156  +
                        deser.read_null()?;
         157  +
                    } else {
         158  +
                        builder.snapshot_download_url = Some(deser.read_string(member)?);
         159  +
                    }
         160  +
                }
         161  +
                Some(3) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.product = Some(deser.read_string(member)?);
         166  +
                    }
         167  +
                }
         168  +
                Some(4) => {
         169  +
                    builder._request_id = Some(deser.read_string(member)?);
         170  +
                }
         171  +
                _ => {}
         172  +
            }
         173  +
            Ok(())
         174  +
        })?;
         175  +
        Ok(builder.build())
         176  +
    }
         177  +
}
         178  +
impl GetDeployablePatchSnapshotForInstanceOutput {
         179  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         180  +
    /// Header-bound members are read directly from headers, avoiding runtime
         181  +
    /// member iteration overhead. Body members are read via the deserializer.
         182  +
    pub fn deserialize_with_response(
         183  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         184  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         185  +
        _status: u16,
         186  +
        _body: &[u8],
         187  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         188  +
        #[allow(unused_variables, unused_mut)]
         189  +
        let mut builder = Self::builder();
         190  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         191  +
            builder._request_id = Some(val.to_string());
         192  +
        }
         193  +
         194  +
        #[allow(
         195  +
            unused_variables,
         196  +
            unreachable_code,
         197  +
            clippy::single_match,
         198  +
            clippy::match_single_binding,
         199  +
            clippy::diverging_sub_expression
         200  +
        )]
         201  +
        deserializer.read_struct(&GETDEPLOYABLEPATCHSNAPSHOTFORINSTANCEOUTPUT_SCHEMA, &mut |member, deser| {
         202  +
            match member.member_index() {
         203  +
                Some(0) => {
         204  +
                    builder.instance_id = Some(deser.read_string(member)?);
         205  +
                }
         206  +
                Some(1) => {
         207  +
                    builder.snapshot_id = Some(deser.read_string(member)?);
         208  +
                }
         209  +
                Some(2) => {
         210  +
                    builder.snapshot_download_url = Some(deser.read_string(member)?);
         211  +
                }
         212  +
                Some(3) => {
         213  +
                    builder.product = Some(deser.read_string(member)?);
         214  +
                }
         215  +
                _ => {}
         216  +
            }
         217  +
            Ok(())
         218  +
        })?;
         219  +
        Ok(builder.build())
         220  +
    }
         221  +
}
         222  +
impl ::aws_types::request_id::RequestId for GetDeployablePatchSnapshotForInstanceOutput {
         223  +
    fn request_id(&self) -> Option<&str> {
         224  +
        self._request_id.as_deref()
         225  +
    }
         226  +
}
         227  +
impl GetDeployablePatchSnapshotForInstanceOutput {
         228  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         229  +
        self._request_id = request_id;
         230  +
        self
         231  +
    }
         232  +
}
         233  +
impl GetDeployablePatchSnapshotForInstanceOutput {
         234  +
    /// Creates a new builder-style object to manufacture [`GetDeployablePatchSnapshotForInstanceOutput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput).
         235  +
    pub fn builder() -> crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceOutputBuilder {
         236  +
        crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceOutputBuilder::default()
         237  +
    }
         238  +
}
         239  +
         240  +
/// A builder for [`GetDeployablePatchSnapshotForInstanceOutput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput).
         241  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         242  +
#[non_exhaustive]
         243  +
pub struct GetDeployablePatchSnapshotForInstanceOutputBuilder {
         244  +
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
         245  +
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
         246  +
    pub(crate) snapshot_download_url: ::std::option::Option<::std::string::String>,
         247  +
    pub(crate) product: ::std::option::Option<::std::string::String>,
         248  +
    _request_id: Option<String>,
         249  +
}
         250  +
impl GetDeployablePatchSnapshotForInstanceOutputBuilder {
         251  +
    /// <p>The managed node ID.</p>
         252  +
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         253  +
        self.instance_id = ::std::option::Option::Some(input.into());
         254  +
        self
         255  +
    }
         256  +
    /// <p>The managed node ID.</p>
         257  +
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         258  +
        self.instance_id = input;
         259  +
        self
         260  +
    }
         261  +
    /// <p>The managed node ID.</p>
         262  +
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
         263  +
        &self.instance_id
         264  +
    }
         265  +
    /// <p>The user-defined snapshot ID.</p>
         266  +
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         267  +
        self.snapshot_id = ::std::option::Option::Some(input.into());
         268  +
        self
         269  +
    }
         270  +
    /// <p>The user-defined snapshot ID.</p>
         271  +
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         272  +
        self.snapshot_id = input;
         273  +
        self
         274  +
    }
         275  +
    /// <p>The user-defined snapshot ID.</p>
         276  +
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
         277  +
        &self.snapshot_id
         278  +
    }
         279  +
    /// <p>A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.</p>
         280  +
    pub fn snapshot_download_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         281  +
        self.snapshot_download_url = ::std::option::Option::Some(input.into());
         282  +
        self
         283  +
    }
         284  +
    /// <p>A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.</p>
         285  +
    pub fn set_snapshot_download_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         286  +
        self.snapshot_download_url = input;
         287  +
        self
         288  +
    }
         289  +
    /// <p>A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to download the patch snapshot.</p>
         290  +
    pub fn get_snapshot_download_url(&self) -> &::std::option::Option<::std::string::String> {
         291  +
        &self.snapshot_download_url
         292  +
    }
         293  +
    /// <p>Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.</p>
         294  +
    pub fn product(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         295  +
        self.product = ::std::option::Option::Some(input.into());
         296  +
        self
         297  +
    }
         298  +
    /// <p>Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.</p>
         299  +
    pub fn set_product(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         300  +
        self.product = input;
         301  +
        self
         302  +
    }
         303  +
    /// <p>Returns the specific operating system (for example Windows Server 2012 or Amazon Linux 2015.09) on the managed node for the specified patch snapshot.</p>
         304  +
    pub fn get_product(&self) -> &::std::option::Option<::std::string::String> {
         305  +
        &self.product
         306  +
    }
         307  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         308  +
        self._request_id = Some(request_id.into());
         309  +
        self
         310  +
    }
         311  +
         312  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         313  +
        self._request_id = request_id;
         314  +
        self
         315  +
    }
         316  +
    /// Consumes the builder and constructs a [`GetDeployablePatchSnapshotForInstanceOutput`](crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput).
         317  +
    pub fn build(self) -> crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput {
         318  +
        crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput {
         319  +
            instance_id: self.instance_id,
         320  +
            snapshot_id: self.snapshot_id,
         321  +
            snapshot_download_url: self.snapshot_download_url,
         322  +
            product: self.product,
         323  +
            _request_id: self._request_id,
         324  +
        }
         325  +
    }
         326  +
}