AWS SDK

AWS SDK

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,140 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::get_ops_item::_get_ops_item_input::GetOpsItemInputBuilder;
           3  +
           4  +
pub use crate::operation::get_ops_item::_get_ops_item_output::GetOpsItemOutputBuilder;
           5  +
           6  +
impl crate::operation::get_ops_item::builders::GetOpsItemInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::get_ops_item::GetOpsItemOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::get_ops_item::GetOpsItemError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.get_ops_item();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `GetOpsItem`.
          24  +
///
          25  +
/// <p>Get information about an OpsItem by using the ID. You must have permission in Identity and Access Management (IAM) to view information about an OpsItem. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html">Set up OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          26  +
/// <p>Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html">Amazon Web Services Systems Manager OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
          27  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          28  +
pub struct GetOpsItemFluentBuilder {
          29  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          30  +
    inner: crate::operation::get_ops_item::builders::GetOpsItemInputBuilder,
          31  +
    config_override: ::std::option::Option<crate::config::Builder>,
          32  +
}
          33  +
impl
          34  +
    crate::client::customize::internal::CustomizableSend<
          35  +
        crate::operation::get_ops_item::GetOpsItemOutput,
          36  +
        crate::operation::get_ops_item::GetOpsItemError,
          37  +
    > for GetOpsItemFluentBuilder
          38  +
{
          39  +
    fn send(
          40  +
        self,
          41  +
        config_override: crate::config::Builder,
          42  +
    ) -> crate::client::customize::internal::BoxFuture<
          43  +
        crate::client::customize::internal::SendResult<
          44  +
            crate::operation::get_ops_item::GetOpsItemOutput,
          45  +
            crate::operation::get_ops_item::GetOpsItemError,
          46  +
        >,
          47  +
    > {
          48  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          49  +
    }
          50  +
}
          51  +
impl GetOpsItemFluentBuilder {
          52  +
    /// Creates a new `GetOpsItemFluentBuilder`.
          53  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          54  +
        Self {
          55  +
            handle,
          56  +
            inner: ::std::default::Default::default(),
          57  +
            config_override: ::std::option::Option::None,
          58  +
        }
          59  +
    }
          60  +
    /// Access the GetOpsItem as a reference.
          61  +
    pub fn as_input(&self) -> &crate::operation::get_ops_item::builders::GetOpsItemInputBuilder {
          62  +
        &self.inner
          63  +
    }
          64  +
    /// Sends the request and returns the response.
          65  +
    ///
          66  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          67  +
    /// can be matched against.
          68  +
    ///
          69  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          70  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          71  +
    /// set when configuring the client.
          72  +
    pub async fn send(
          73  +
        self,
          74  +
    ) -> ::std::result::Result<
          75  +
        crate::operation::get_ops_item::GetOpsItemOutput,
          76  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          77  +
            crate::operation::get_ops_item::GetOpsItemError,
          78  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          79  +
        >,
          80  +
    > {
          81  +
        let input = self
          82  +
            .inner
          83  +
            .build()
          84  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          85  +
        let runtime_plugins = crate::operation::get_ops_item::GetOpsItem::operation_runtime_plugins(
          86  +
            self.handle.runtime_plugins.clone(),
          87  +
            &self.handle.conf,
          88  +
            self.config_override,
          89  +
        );
          90  +
        crate::operation::get_ops_item::GetOpsItem::orchestrate(&runtime_plugins, input).await
          91  +
    }
          92  +
          93  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          94  +
    pub fn customize(
          95  +
        self,
          96  +
    ) -> crate::client::customize::CustomizableOperation<
          97  +
        crate::operation::get_ops_item::GetOpsItemOutput,
          98  +
        crate::operation::get_ops_item::GetOpsItemError,
          99  +
        Self,
         100  +
    > {
         101  +
        crate::client::customize::CustomizableOperation::new(self)
         102  +
    }
         103  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         104  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         105  +
        self
         106  +
    }
         107  +
         108  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         109  +
        self.config_override = config_override;
         110  +
        self
         111  +
    }
         112  +
    /// <p>The ID of the OpsItem that you want to get.</p>
         113  +
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        self.inner = self.inner.ops_item_id(input.into());
         115  +
        self
         116  +
    }
         117  +
    /// <p>The ID of the OpsItem that you want to get.</p>
         118  +
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.set_ops_item_id(input);
         120  +
        self
         121  +
    }
         122  +
    /// <p>The ID of the OpsItem that you want to get.</p>
         123  +
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
         124  +
        self.inner.get_ops_item_id()
         125  +
    }
         126  +
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
         127  +
    pub fn ops_item_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         128  +
        self.inner = self.inner.ops_item_arn(input.into());
         129  +
        self
         130  +
    }
         131  +
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
         132  +
    pub fn set_ops_item_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        self.inner = self.inner.set_ops_item_arn(input);
         134  +
        self
         135  +
    }
         136  +
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
         137  +
    pub fn get_ops_item_arn(&self) -> &::std::option::Option<::std::string::String> {
         138  +
        self.inner.get_ops_item_arn()
         139  +
    }
         140  +
}

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

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

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

@@ -0,1 +0,219 @@
           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 GetOpsMetadataInput {
           6  +
    /// <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</p>
           7  +
    pub ops_metadata_arn: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
           9  +
    pub max_results: ::std::option::Option<i32>,
          10  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
          11  +
    pub next_token: ::std::option::Option<::std::string::String>,
          12  +
}
          13  +
impl GetOpsMetadataInput {
          14  +
    /// <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</p>
          15  +
    pub fn ops_metadata_arn(&self) -> ::std::option::Option<&str> {
          16  +
        self.ops_metadata_arn.as_deref()
          17  +
    }
          18  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
          19  +
    pub fn max_results(&self) -> ::std::option::Option<i32> {
          20  +
        self.max_results
          21  +
    }
          22  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
          23  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          24  +
        self.next_token.as_deref()
          25  +
    }
          26  +
}
          27  +
static GETOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          28  +
    ::aws_smithy_schema::ShapeId::from_parts(
          29  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataInput$OpsMetadataArn",
          30  +
        "com.amazonaws.ssm.synthetic",
          31  +
        "GetOpsMetadataInput",
          32  +
    ),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "OpsMetadataArn",
          35  +
    0,
          36  +
);
          37  +
static GETOPSMETADATAINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          38  +
    ::aws_smithy_schema::ShapeId::from_parts(
          39  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataInput$MaxResults",
          40  +
        "com.amazonaws.ssm.synthetic",
          41  +
        "GetOpsMetadataInput",
          42  +
    ),
          43  +
    ::aws_smithy_schema::ShapeType::Integer,
          44  +
    "MaxResults",
          45  +
    1,
          46  +
);
          47  +
static GETOPSMETADATAINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          48  +
    ::aws_smithy_schema::ShapeId::from_parts(
          49  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataInput$NextToken",
          50  +
        "com.amazonaws.ssm.synthetic",
          51  +
        "GetOpsMetadataInput",
          52  +
    ),
          53  +
    ::aws_smithy_schema::ShapeType::String,
          54  +
    "NextToken",
          55  +
    2,
          56  +
);
          57  +
static GETOPSMETADATAINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          58  +
    ::aws_smithy_schema::ShapeId::from_parts(
          59  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataInput",
          60  +
        "com.amazonaws.ssm.synthetic",
          61  +
        "GetOpsMetadataInput",
          62  +
    ),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    &[
          65  +
        &GETOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN,
          66  +
        &GETOPSMETADATAINPUT_MEMBER_MAX_RESULTS,
          67  +
        &GETOPSMETADATAINPUT_MEMBER_NEXT_TOKEN,
          68  +
    ],
          69  +
)
          70  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          71  +
.with_original_name("GetOpsMetadataRequest");
          72  +
impl GetOpsMetadataInput {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETOPSMETADATAINPUT_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetOpsMetadataInput {
          77  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          78  +
    fn serialize_members(
          79  +
        &self,
          80  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          81  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          82  +
        if let Some(ref val) = self.ops_metadata_arn {
          83  +
            ser.write_string(&GETOPSMETADATAINPUT_MEMBER_OPS_METADATA_ARN, val)?;
          84  +
        }
          85  +
        if let Some(ref val) = self.max_results {
          86  +
            ser.write_integer(&GETOPSMETADATAINPUT_MEMBER_MAX_RESULTS, *val)?;
          87  +
        }
          88  +
        if let Some(ref val) = self.next_token {
          89  +
            ser.write_string(&GETOPSMETADATAINPUT_MEMBER_NEXT_TOKEN, val)?;
          90  +
        }
          91  +
        Ok(())
          92  +
    }
          93  +
}
          94  +
impl GetOpsMetadataInput {
          95  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          96  +
    pub fn deserialize(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          98  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          99  +
        #[allow(unused_variables, unused_mut)]
         100  +
        let mut builder = Self::builder();
         101  +
        #[allow(
         102  +
            unused_variables,
         103  +
            unreachable_code,
         104  +
            clippy::single_match,
         105  +
            clippy::match_single_binding,
         106  +
            clippy::diverging_sub_expression
         107  +
        )]
         108  +
        deserializer.read_struct(&GETOPSMETADATAINPUT_SCHEMA, &mut |member, deser| {
         109  +
            match member.member_index() {
         110  +
                Some(0) => {
         111  +
                    if deser.is_null() {
         112  +
                        deser.read_null()?;
         113  +
                    } else {
         114  +
                        builder.ops_metadata_arn = Some(deser.read_string(member)?);
         115  +
                    }
         116  +
                }
         117  +
                Some(1) => {
         118  +
                    if deser.is_null() {
         119  +
                        deser.read_null()?;
         120  +
                    } else {
         121  +
                        builder.max_results = Some(deser.read_integer(member)?);
         122  +
                    }
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    if deser.is_null() {
         126  +
                        deser.read_null()?;
         127  +
                    } else {
         128  +
                        builder.next_token = Some(deser.read_string(member)?);
         129  +
                    }
         130  +
                }
         131  +
                _ => {}
         132  +
            }
         133  +
            Ok(())
         134  +
        })?;
         135  +
        builder.ops_metadata_arn = builder.ops_metadata_arn.or(Some(String::new()));
         136  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         137  +
    }
         138  +
}
         139  +
impl GetOpsMetadataInput {
         140  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        Self::deserialize(deserializer)
         148  +
    }
         149  +
}
         150  +
impl GetOpsMetadataInput {
         151  +
    /// Creates a new builder-style object to manufacture [`GetOpsMetadataInput`](crate::operation::get_ops_metadata::GetOpsMetadataInput).
         152  +
    pub fn builder() -> crate::operation::get_ops_metadata::builders::GetOpsMetadataInputBuilder {
         153  +
        crate::operation::get_ops_metadata::builders::GetOpsMetadataInputBuilder::default()
         154  +
    }
         155  +
}
         156  +
         157  +
/// A builder for [`GetOpsMetadataInput`](crate::operation::get_ops_metadata::GetOpsMetadataInput).
         158  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         159  +
#[non_exhaustive]
         160  +
pub struct GetOpsMetadataInputBuilder {
         161  +
    pub(crate) ops_metadata_arn: ::std::option::Option<::std::string::String>,
         162  +
    pub(crate) max_results: ::std::option::Option<i32>,
         163  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         164  +
}
         165  +
impl GetOpsMetadataInputBuilder {
         166  +
    /// <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</p>
         167  +
    /// This field is required.
         168  +
    pub fn ops_metadata_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         169  +
        self.ops_metadata_arn = ::std::option::Option::Some(input.into());
         170  +
        self
         171  +
    }
         172  +
    /// <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</p>
         173  +
    pub fn set_ops_metadata_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         174  +
        self.ops_metadata_arn = input;
         175  +
        self
         176  +
    }
         177  +
    /// <p>The Amazon Resource Name (ARN) of an OpsMetadata Object to view.</p>
         178  +
    pub fn get_ops_metadata_arn(&self) -> &::std::option::Option<::std::string::String> {
         179  +
        &self.ops_metadata_arn
         180  +
    }
         181  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         182  +
    pub fn max_results(mut self, input: i32) -> Self {
         183  +
        self.max_results = ::std::option::Option::Some(input);
         184  +
        self
         185  +
    }
         186  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         187  +
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
         188  +
        self.max_results = input;
         189  +
        self
         190  +
    }
         191  +
    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
         192  +
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
         193  +
        &self.max_results
         194  +
    }
         195  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         196  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         197  +
        self.next_token = ::std::option::Option::Some(input.into());
         198  +
        self
         199  +
    }
         200  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         201  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         202  +
        self.next_token = input;
         203  +
        self
         204  +
    }
         205  +
    /// <p>A token to start the list. Use this token to get the next set of results.</p>
         206  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         207  +
        &self.next_token
         208  +
    }
         209  +
    /// Consumes the builder and constructs a [`GetOpsMetadataInput`](crate::operation::get_ops_metadata::GetOpsMetadataInput).
         210  +
    pub fn build(
         211  +
        self,
         212  +
    ) -> ::std::result::Result<crate::operation::get_ops_metadata::GetOpsMetadataInput, ::aws_smithy_types::error::operation::BuildError> {
         213  +
        ::std::result::Result::Ok(crate::operation::get_ops_metadata::GetOpsMetadataInput {
         214  +
            ops_metadata_arn: self.ops_metadata_arn,
         215  +
            max_results: self.max_results,
         216  +
            next_token: self.next_token,
         217  +
        })
         218  +
    }
         219  +
}

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

@@ -0,1 +0,323 @@
           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 GetOpsMetadataOutput {
           6  +
    /// <p>The resource ID of the Application Manager application.</p>
           7  +
    pub resource_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>OpsMetadata for an Application Manager application.</p>
           9  +
    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
          10  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
          11  +
    pub next_token: ::std::option::Option<::std::string::String>,
          12  +
    _request_id: Option<String>,
          13  +
}
          14  +
impl GetOpsMetadataOutput {
          15  +
    /// <p>The resource ID of the Application Manager application.</p>
          16  +
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
          17  +
        self.resource_id.as_deref()
          18  +
    }
          19  +
    /// <p>OpsMetadata for an Application Manager application.</p>
          20  +
    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>> {
          21  +
        self.metadata.as_ref()
          22  +
    }
          23  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
          24  +
    pub fn next_token(&self) -> ::std::option::Option<&str> {
          25  +
        self.next_token.as_deref()
          26  +
    }
          27  +
}
          28  +
static GETOPSMETADATAOUTPUT_MEMBER_RESOURCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts(
          30  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataOutput$ResourceId",
          31  +
        "com.amazonaws.ssm.synthetic",
          32  +
        "GetOpsMetadataOutput",
          33  +
    ),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "ResourceId",
          36  +
    0,
          37  +
);
          38  +
static GETOPSMETADATAOUTPUT_MEMBER_METADATA_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataMap$key", "com.amazonaws.ssm", "MetadataMap"),
          40  +
    ::aws_smithy_schema::ShapeType::String,
          41  +
    "key",
          42  +
    0,
          43  +
);
          44  +
static GETOPSMETADATAOUTPUT_MEMBER_METADATA_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#MetadataMap$value", "com.amazonaws.ssm", "MetadataMap"),
          46  +
    ::aws_smithy_schema::ShapeType::Structure,
          47  +
    "value",
          48  +
    1,
          49  +
);
          50  +
static GETOPSMETADATAOUTPUT_MEMBER_METADATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          51  +
    ::aws_smithy_schema::ShapeId::from_parts(
          52  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataOutput$Metadata",
          53  +
        "com.amazonaws.ssm.synthetic",
          54  +
        "GetOpsMetadataOutput",
          55  +
    ),
          56  +
    ::aws_smithy_schema::ShapeType::Map,
          57  +
    "Metadata",
          58  +
    1,
          59  +
)
          60  +
.with_map_members(&GETOPSMETADATAOUTPUT_MEMBER_METADATA_KEY, &GETOPSMETADATAOUTPUT_MEMBER_METADATA_VALUE);
          61  +
static GETOPSMETADATAOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          62  +
    ::aws_smithy_schema::ShapeId::from_parts(
          63  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataOutput$NextToken",
          64  +
        "com.amazonaws.ssm.synthetic",
          65  +
        "GetOpsMetadataOutput",
          66  +
    ),
          67  +
    ::aws_smithy_schema::ShapeType::String,
          68  +
    "NextToken",
          69  +
    2,
          70  +
);
          71  +
static GETOPSMETADATAOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          72  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          73  +
    ::aws_smithy_schema::ShapeType::String,
          74  +
    "request_id",
          75  +
    3,
          76  +
)
          77  +
.with_http_header("x-amzn-requestid");
          78  +
static GETOPSMETADATAOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          79  +
    ::aws_smithy_schema::ShapeId::from_parts(
          80  +
        "com.amazonaws.ssm.synthetic#GetOpsMetadataOutput",
          81  +
        "com.amazonaws.ssm.synthetic",
          82  +
        "GetOpsMetadataOutput",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::Structure,
          85  +
    &[
          86  +
        &GETOPSMETADATAOUTPUT_MEMBER_RESOURCE_ID,
          87  +
        &GETOPSMETADATAOUTPUT_MEMBER_METADATA,
          88  +
        &GETOPSMETADATAOUTPUT_MEMBER_NEXT_TOKEN,
          89  +
        &GETOPSMETADATAOUTPUT_MEMBER__REQUEST_ID,
          90  +
    ],
          91  +
)
          92  +
.with_original_name("GetOpsMetadataResult");
          93  +
impl GetOpsMetadataOutput {
          94  +
    /// The schema for this shape.
          95  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &GETOPSMETADATAOUTPUT_SCHEMA;
          96  +
}
          97  +
impl ::aws_smithy_schema::serde::SerializableStruct for GetOpsMetadataOutput {
          98  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          99  +
    fn serialize_members(
         100  +
        &self,
         101  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         102  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         103  +
        if let Some(ref val) = self.resource_id {
         104  +
            ser.write_string(&GETOPSMETADATAOUTPUT_MEMBER_RESOURCE_ID, val)?;
         105  +
        }
         106  +
        if let Some(ref val) = self.metadata {
         107  +
            ser.write_map(
         108  +
                &GETOPSMETADATAOUTPUT_MEMBER_METADATA,
         109  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         110  +
                    for (key, value) in val {
         111  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         112  +
                        ser.write_struct(crate::types::MetadataValue::SCHEMA, value)?;
         113  +
                    }
         114  +
                    Ok(())
         115  +
                },
         116  +
            )?;
         117  +
        }
         118  +
        if let Some(ref val) = self.next_token {
         119  +
            ser.write_string(&GETOPSMETADATAOUTPUT_MEMBER_NEXT_TOKEN, val)?;
         120  +
        }
         121  +
        Ok(())
         122  +
    }
         123  +
}
         124  +
impl GetOpsMetadataOutput {
         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(&GETOPSMETADATAOUTPUT_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.resource_id = Some(deser.read_string(member)?);
         145  +
                    }
         146  +
                }
         147  +
                Some(1) => {
         148  +
                    if deser.is_null() {
         149  +
                        deser.read_null()?;
         150  +
                    } else {
         151  +
                        builder.metadata = Some({
         152  +
                            let mut container = std::collections::HashMap::new();
         153  +
                            deser.read_map(member, &mut |key, deser| {
         154  +
                                container.insert(key, crate::types::MetadataValue::deserialize(deser)?);
         155  +
                                Ok(())
         156  +
                            })?;
         157  +
                            container
         158  +
                        });
         159  +
                    }
         160  +
                }
         161  +
                Some(2) => {
         162  +
                    if deser.is_null() {
         163  +
                        deser.read_null()?;
         164  +
                    } else {
         165  +
                        builder.next_token = Some(deser.read_string(member)?);
         166  +
                    }
         167  +
                }
         168  +
                Some(3) => {
         169  +
                    builder._request_id = Some(deser.read_string(member)?);
         170  +
                }
         171  +
                _ => {}
         172  +
            }
         173  +
            Ok(())
         174  +
        })?;
         175  +
        Ok(builder.build())
         176  +
    }
         177  +
}
         178  +
impl GetOpsMetadataOutput {
         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(&GETOPSMETADATAOUTPUT_SCHEMA, &mut |member, deser| {
         202  +
            match member.member_index() {
         203  +
                Some(0) => {
         204  +
                    builder.resource_id = Some(deser.read_string(member)?);
         205  +
                }
         206  +
                Some(1) => {
         207  +
                    builder.metadata = Some({
         208  +
                        let mut container = std::collections::HashMap::new();
         209  +
                        deser.read_map(member, &mut |key, deser| {
         210  +
                            container.insert(key, crate::types::MetadataValue::deserialize(deser)?);
         211  +
                            Ok(())
         212  +
                        })?;
         213  +
                        container
         214  +
                    });
         215  +
                }
         216  +
                Some(2) => {
         217  +
                    builder.next_token = Some(deser.read_string(member)?);
         218  +
                }
         219  +
                _ => {}
         220  +
            }
         221  +
            Ok(())
         222  +
        })?;
         223  +
        Ok(builder.build())
         224  +
    }
         225  +
}
         226  +
impl ::aws_types::request_id::RequestId for GetOpsMetadataOutput {
         227  +
    fn request_id(&self) -> Option<&str> {
         228  +
        self._request_id.as_deref()
         229  +
    }
         230  +
}
         231  +
impl GetOpsMetadataOutput {
         232  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         233  +
        self._request_id = request_id;
         234  +
        self
         235  +
    }
         236  +
}
         237  +
impl GetOpsMetadataOutput {
         238  +
    /// Creates a new builder-style object to manufacture [`GetOpsMetadataOutput`](crate::operation::get_ops_metadata::GetOpsMetadataOutput).
         239  +
    pub fn builder() -> crate::operation::get_ops_metadata::builders::GetOpsMetadataOutputBuilder {
         240  +
        crate::operation::get_ops_metadata::builders::GetOpsMetadataOutputBuilder::default()
         241  +
    }
         242  +
}
         243  +
         244  +
/// A builder for [`GetOpsMetadataOutput`](crate::operation::get_ops_metadata::GetOpsMetadataOutput).
         245  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         246  +
#[non_exhaustive]
         247  +
pub struct GetOpsMetadataOutputBuilder {
         248  +
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
         249  +
    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
         250  +
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
         251  +
    _request_id: Option<String>,
         252  +
}
         253  +
impl GetOpsMetadataOutputBuilder {
         254  +
    /// <p>The resource ID of the Application Manager application.</p>
         255  +
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         256  +
        self.resource_id = ::std::option::Option::Some(input.into());
         257  +
        self
         258  +
    }
         259  +
    /// <p>The resource ID of the Application Manager application.</p>
         260  +
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         261  +
        self.resource_id = input;
         262  +
        self
         263  +
    }
         264  +
    /// <p>The resource ID of the Application Manager application.</p>
         265  +
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
         266  +
        &self.resource_id
         267  +
    }
         268  +
    /// Adds a key-value pair to `metadata`.
         269  +
    ///
         270  +
    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
         271  +
    ///
         272  +
    /// <p>OpsMetadata for an Application Manager application.</p>
         273  +
    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::MetadataValue) -> Self {
         274  +
        let mut hash_map = self.metadata.unwrap_or_default();
         275  +
        hash_map.insert(k.into(), v);
         276  +
        self.metadata = ::std::option::Option::Some(hash_map);
         277  +
        self
         278  +
    }
         279  +
    /// <p>OpsMetadata for an Application Manager application.</p>
         280  +
    pub fn set_metadata(
         281  +
        mut self,
         282  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>>,
         283  +
    ) -> Self {
         284  +
        self.metadata = input;
         285  +
        self
         286  +
    }
         287  +
    /// <p>OpsMetadata for an Application Manager application.</p>
         288  +
    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MetadataValue>> {
         289  +
        &self.metadata
         290  +
    }
         291  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         292  +
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         293  +
        self.next_token = ::std::option::Option::Some(input.into());
         294  +
        self
         295  +
    }
         296  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         297  +
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         298  +
        self.next_token = input;
         299  +
        self
         300  +
    }
         301  +
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
         302  +
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
         303  +
        &self.next_token
         304  +
    }
         305  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         306  +
        self._request_id = Some(request_id.into());
         307  +
        self
         308  +
    }
         309  +
         310  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         311  +
        self._request_id = request_id;
         312  +
        self
         313  +
    }
         314  +
    /// Consumes the builder and constructs a [`GetOpsMetadataOutput`](crate::operation::get_ops_metadata::GetOpsMetadataOutput).
         315  +
    pub fn build(self) -> crate::operation::get_ops_metadata::GetOpsMetadataOutput {
         316  +
        crate::operation::get_ops_metadata::GetOpsMetadataOutput {
         317  +
            resource_id: self.resource_id,
         318  +
            metadata: self.metadata,
         319  +
            next_token: self.next_token,
         320  +
            _request_id: self._request_id,
         321  +
        }
         322  +
    }
         323  +
}