AWS SDK

AWS SDK

rev. dc1b11a614d928cff165eac12e20d37ae979d6cc

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/update_bucket_metadata_inventory_table_configuration.rs

@@ -1,0 +459,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Orchestration and serialization glue logic for `UpdateBucketMetadataInventoryTableConfiguration`.
    3         -
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4         -
#[non_exhaustive]
    5         -
pub struct UpdateBucketMetadataInventoryTableConfiguration;
    6         -
impl UpdateBucketMetadataInventoryTableConfiguration {
    7         -
    /// Creates a new `UpdateBucketMetadataInventoryTableConfiguration`
    8         -
    pub fn new() -> Self {
    9         -
        Self
   10         -
    }
   11         -
    pub(crate) async fn orchestrate(
   12         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13         -
        input: crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
   14         -
    ) -> ::std::result::Result<
   15         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
   16         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   17         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
   18         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19         -
        >,
   20         -
    > {
   21         -
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
   22         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   23         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   24         -
        >| {
   25         -
            err.map_service_error(|err| {
   26         -
                                err.downcast::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError>().expect("correct error type")
   27         -
                            })
   28         -
        };
   29         -
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
   30         -
            .await
   31         -
            .map_err(map_err)?;
   32         -
        let output = context.finalize().map_err(map_err)?;
   33         -
        ::std::result::Result::Ok(output.downcast::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput>().expect("correct output type"))
   34         -
    }
   35         -
   36         -
    pub(crate) async fn orchestrate_with_stop_point(
   37         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   38         -
        input: crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
   39         -
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
   40         -
    ) -> ::std::result::Result<
   41         -
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
   42         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   43         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   44         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   45         -
        >,
   46         -
    > {
   47         -
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
   48         -
        use ::tracing::Instrument;
   49         -
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
   50         -
            "S3",
   51         -
            "UpdateBucketMetadataInventoryTableConfiguration",
   52         -
            input,
   53         -
            runtime_plugins,
   54         -
            stop_point,
   55         -
        )
   56         -
        // Create a parent span for the entire operation. Includes a random, internal-only,
   57         -
        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
   58         -
        .instrument(::tracing::debug_span!(
   59         -
            "S3.UpdateBucketMetadataInventoryTableConfiguration",
   60         -
            "rpc.service" = "S3",
   61         -
            "rpc.method" = "UpdateBucketMetadataInventoryTableConfiguration",
   62         -
            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
   63         -
            "rpc.system" = "aws-api",
   64         -
        ))
   65         -
        .await
   66         -
    }
   67         -
   68         -
    pub(crate) fn operation_runtime_plugins(
   69         -
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   70         -
        client_config: &crate::config::Config,
   71         -
        config_override: ::std::option::Option<crate::config::Builder>,
   72         -
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
   73         -
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
   74         -
   75         -
        if let ::std::option::Option::Some(config_override) = config_override {
   76         -
            for plugin in config_override.runtime_plugins.iter().cloned() {
   77         -
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78         -
            }
   79         -
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80         -
                config_override,
   81         -
                client_config.config.clone(),
   82         -
                &client_config.runtime_components,
   83         -
            ));
   84         -
        }
   85         -
        runtime_plugins
   86         -
    }
   87         -
}
   88         -
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateBucketMetadataInventoryTableConfiguration {
   89         -
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90         -
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateBucketMetadataInventoryTableConfiguration");
   91         -
   92         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93         -
            UpdateBucketMetadataInventoryTableConfigurationRequestSerializer,
   94         -
        ));
   95         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96         -
            UpdateBucketMetadataInventoryTableConfigurationResponseDeserializer,
   97         -
        ));
   98         -
   99         -
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100         -
            crate::config::auth::Params::builder()
  101         -
                .operation_name("UpdateBucketMetadataInventoryTableConfiguration")
  102         -
                .build()
  103         -
                .expect("required fields set"),
  104         -
        ));
  105         -
  106         -
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  107         -
            "UpdateBucketMetadataInventoryTableConfiguration",
  108         -
            "S3",
  109         -
        ));
  110         -
        cfg.store_put(crate::s3_express::checksum::provide_default_checksum_algorithm());
  111         -
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
  112         -
        signing_options.double_uri_encode = false;
  113         -
        signing_options.content_sha256_header = true;
  114         -
        signing_options.normalize_uri_path = false;
  115         -
        signing_options.payload_override = None;
  116         -
  117         -
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
  118         -
            signing_options,
  119         -
            ..::std::default::Default::default()
  120         -
        });
  121         -
  122         -
        ::std::option::Option::Some(cfg.freeze())
  123         -
    }
  124         -
  125         -
    fn runtime_components(
  126         -
        &self,
  127         -
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  128         -
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  129         -
        #[allow(unused_mut)]
  130         -
                    let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateBucketMetadataInventoryTableConfiguration")
  131         -
                            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  132         -
.with_interceptor(UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor)
  133         -
.with_interceptor(crate::http_request_checksum::RequestChecksumInterceptor::new(
  134         -
                                |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
  135         -
                                    let input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput = input.downcast_ref().expect("correct type");
  136         -
                                    let checksum_algorithm = input.checksum_algorithm();
  137         -
                                    let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str());
  138         -
                                    (checksum_algorithm.map(|s| s.to_string()), true)
  139         -
                                },
  140         -
                                |request: &mut ::aws_smithy_runtime_api::http::Request, cfg: &::aws_smithy_types::config_bag::ConfigBag| {
  141         -
                                    // We check if the user has set any of the checksum values manually
  142         -
                                    let mut user_set_checksum_value = false;
  143         -
                                    let headers_to_check = request.headers().iter().filter_map(|(name, _val)| {
  144         -
                                        if name.starts_with("x-amz-checksum-") {
  145         -
                                            Some(name)
  146         -
                                        } else {
  147         -
                                            None
  148         -
                                        }
  149         -
                                    });
  150         -
                                    for algo_header in headers_to_check {
  151         -
                                        if request.headers().get(algo_header).is_some() {
  152         -
                                            user_set_checksum_value = true;
  153         -
                                        }
  154         -
                                    }
  155         -
  156         -
                                    // We check if the user set the checksum algo manually
  157         -
                                    let user_set_checksum_algo = request.headers()
  158         -
                                        .get("x-amz-sdk-checksum-algorithm")
  159         -
                                        .is_some();
  160         -
  161         -
                                    // This value is set by the user on the SdkConfig to indicate their preference
  162         -
                                    let request_checksum_calculation = cfg
  163         -
                                        .load::<::aws_smithy_types::checksum_config::RequestChecksumCalculation>()
  164         -
                                        .unwrap_or(&::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported);
  165         -
  166         -
                                    // From the httpChecksum trait
  167         -
                                    let http_checksum_required = true;
  168         -
  169         -
                                    let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
  170         -
  171         -
                                    // If the request is presigned we do not set a default.
  172         -
                                    // If the RequestChecksumCalculation is WhenSupported and the user has not set a checksum value or algo
  173         -
                                    // we set the default. If it is WhenRequired and a checksum is required by the trait and the user has not
  174         -
                                    // set a checksum value or algo we also set the default. In all other cases we do nothing.
  175         -
                                    match (
  176         -
                                        request_checksum_calculation,
  177         -
                                        http_checksum_required,
  178         -
                                        user_set_checksum_value,
  179         -
                                        user_set_checksum_algo,
  180         -
                                        is_presigned_req,
  181         -
                                    ) {
  182         -
                                        (_, _, _, _, true) => {}
  183         -
                                        (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported, _, false, false, _)
  184         -
                                        | (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenRequired, true, false, false, _) => {
  185         -
                                            request.headers_mut().insert("x-amz-sdk-checksum-algorithm", "CRC32");
  186         -
                                        }
  187         -
                                        _ => {},
  188         -
                                    }
  189         -
  190         -
                                    // We return a bool indicating if the user did set the checksum value, if they did
  191         -
                                    // we can short circuit and exit the interceptor early.
  192         -
                                    Ok(user_set_checksum_value)
  193         -
                                }
  194         -
                                ))
  195         -
                            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError>::new())
  196         -
.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError>::new())
  197         -
.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError>::builder().transient_errors({
  198         -
                                            let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
  199         -
                                            transient_errors.push("InternalError");
  200         -
                                            ::std::borrow::Cow::Owned(transient_errors)
  201         -
                                            }).build());
  202         -
  203         -
        ::std::borrow::Cow::Owned(rcb)
  204         -
    }
  205         -
}
  206         -
  207         -
#[derive(Debug)]
  208         -
struct UpdateBucketMetadataInventoryTableConfigurationResponseDeserializer;
  209         -
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateBucketMetadataInventoryTableConfigurationResponseDeserializer {
  210         -
    fn deserialize_nonstreaming(
  211         -
        &self,
  212         -
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  213         -
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  214         -
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  215         -
        let headers = response.headers();
  216         -
        let body = response.body().bytes().expect("body loaded");
  217         -
        #[allow(unused_mut)]
  218         -
        let mut force_error = false;
  219         -
        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
  220         -
        if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
  221         -
            force_error = true;
  222         -
        }
  223         -
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  224         -
        let parse_result = if !success && status != 200 || force_error {
  225         -
            crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration::de_update_bucket_metadata_inventory_table_configuration_http_error(status, headers, body)
  226         -
        } else {
  227         -
            crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration::de_update_bucket_metadata_inventory_table_configuration_http_response(status, headers, body)
  228         -
        };
  229         -
        crate::protocol_serde::type_erase_result(parse_result)
  230         -
    }
  231         -
}
  232         -
#[derive(Debug)]
  233         -
struct UpdateBucketMetadataInventoryTableConfigurationRequestSerializer;
  234         -
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateBucketMetadataInventoryTableConfigurationRequestSerializer {
  235         -
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  236         -
    fn serialize_input(
  237         -
        &self,
  238         -
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  239         -
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  240         -
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  241         -
        let input = input
  242         -
            .downcast::<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput>(
  243         -
            )
  244         -
            .expect("correct type");
  245         -
        let _header_serialization_settings = _cfg
  246         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  247         -
            .cloned()
  248         -
            .unwrap_or_default();
  249         -
        let mut request_builder = {
  250         -
            #[allow(clippy::uninlined_format_args)]
  251         -
            fn uri_base(
  252         -
                _input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
  253         -
                output: &mut ::std::string::String,
  254         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  255         -
                use ::std::fmt::Write as _;
  256         -
                ::std::write!(output, "/").expect("formatting should succeed");
  257         -
                ::std::result::Result::Ok(())
  258         -
            }
  259         -
            fn uri_query(
  260         -
                _input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
  261         -
                mut output: &mut ::std::string::String,
  262         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  263         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  264         -
                query.push_v("metadataInventoryTable");
  265         -
                ::std::result::Result::Ok(())
  266         -
            }
  267         -
            #[allow(clippy::unnecessary_wraps)]
  268         -
            fn update_http_builder(
  269         -
                input: &crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
  270         -
                builder: ::http::request::Builder,
  271         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  272         -
                let mut uri = ::std::string::String::new();
  273         -
                uri_base(input, &mut uri)?;
  274         -
                uri_query(input, &mut uri)?;
  275         -
                let builder = crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration::ser_update_bucket_metadata_inventory_table_configuration_headers(input, builder)?;
  276         -
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  277         -
            }
  278         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  279         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  280         -
            builder
  281         -
        };
  282         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  283         -
            crate::protocol_serde::shape_update_bucket_metadata_inventory_table_configuration_input::ser_inventory_table_configuration_http_payload(
  284         -
                &input.inventory_table_configuration,
  285         -
            )?,
  286         -
        );
  287         -
        if let Some(content_length) = body.content_length() {
  288         -
            let content_length = content_length.to_string();
  289         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  290         -
        }
  291         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  292         -
    }
  293         -
}
  294         -
#[derive(Debug)]
  295         -
struct UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor;
  296         -
  297         -
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor {
  298         -
    fn name(&self) -> &'static str {
  299         -
        "UpdateBucketMetadataInventoryTableConfigurationEndpointParamsInterceptor"
  300         -
    }
  301         -
  302         -
    fn read_before_execution(
  303         -
        &self,
  304         -
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  305         -
            '_,
  306         -
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  307         -
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  308         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  309         -
        >,
  310         -
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  311         -
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  312         -
        let _input = context
  313         -
            .input()
  314         -
            .downcast_ref::<UpdateBucketMetadataInventoryTableConfigurationInput>()
  315         -
            .ok_or("failed to downcast to UpdateBucketMetadataInventoryTableConfigurationInput")?;
  316         -
  317         -
        let params = crate::config::endpoint::Params::builder()
  318         -
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
  319         -
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
  320         -
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
  321         -
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
  322         -
            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
  323         -
            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
  324         -
            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
  325         -
            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
  326         -
            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
  327         -
            .set_use_s3_express_control_endpoint(Some(true))
  328         -
            .set_bucket(Some(
  329         -
                _input
  330         -
                    .bucket
  331         -
                    .clone()
  332         -
                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
  333         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
  334         -
            ))
  335         -
            .build()
  336         -
            .map_err(|err| {
  337         -
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  338         -
            })?;
  339         -
        cfg.interceptor_state()
  340         -
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  341         -
        ::std::result::Result::Ok(())
  342         -
    }
  343         -
}
  344         -
  345         -
// The get_* functions below are generated from JMESPath expressions in the
  346         -
// operationContextParams trait. They target the operation's input shape.
  347         -
  348         -
/// Error type for the `UpdateBucketMetadataInventoryTableConfigurationError` operation.
  349         -
#[non_exhaustive]
  350         -
#[derive(::std::fmt::Debug)]
  351         -
pub enum UpdateBucketMetadataInventoryTableConfigurationError {
  352         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  353         -
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  354         -
    variable wildcard pattern and check `.code()`:
  355         -
     \
  356         -
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  357         -
     \
  358         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateBucketMetadataInventoryTableConfigurationError) for what information is available for the error.")]
  359         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  360         -
}
  361         -
impl UpdateBucketMetadataInventoryTableConfigurationError {
  362         -
    /// Creates the `UpdateBucketMetadataInventoryTableConfigurationError::Unhandled` variant from any error type.
  363         -
    pub fn unhandled(
  364         -
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  365         -
    ) -> Self {
  366         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  367         -
            source: err.into(),
  368         -
            meta: ::std::default::Default::default(),
  369         -
        })
  370         -
    }
  371         -
  372         -
    /// Creates the `UpdateBucketMetadataInventoryTableConfigurationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  373         -
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  374         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  375         -
            source: err.clone().into(),
  376         -
            meta: err,
  377         -
        })
  378         -
    }
  379         -
    ///
  380         -
    /// Returns error metadata, which includes the error code, message,
  381         -
    /// request ID, and potentially additional information.
  382         -
    ///
  383         -
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  384         -
        match self {
  385         -
            Self::Unhandled(e) => &e.meta,
  386         -
        }
  387         -
    }
  388         -
}
  389         -
impl ::std::error::Error for UpdateBucketMetadataInventoryTableConfigurationError {
  390         -
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  391         -
        match self {
  392         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  393         -
        }
  394         -
    }
  395         -
}
  396         -
impl ::std::fmt::Display for UpdateBucketMetadataInventoryTableConfigurationError {
  397         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  398         -
        match self {
  399         -
            Self::Unhandled(_inner) => {
  400         -
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  401         -
                    write!(f, "unhandled error ({code})")
  402         -
                } else {
  403         -
                    f.write_str("unhandled error")
  404         -
                }
  405         -
            }
  406         -
        }
  407         -
    }
  408         -
}
  409         -
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateBucketMetadataInventoryTableConfigurationError {
  410         -
    fn code(&self) -> ::std::option::Option<&str> {
  411         -
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  412         -
    }
  413         -
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  414         -
        ::std::option::Option::None
  415         -
    }
  416         -
}
  417         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateBucketMetadataInventoryTableConfigurationError {
  418         -
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  419         -
        match self {
  420         -
            Self::Unhandled(_inner) => &_inner.meta,
  421         -
        }
  422         -
    }
  423         -
}
  424         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateBucketMetadataInventoryTableConfigurationError {
  425         -
    fn create_unhandled_error(
  426         -
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  427         -
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  428         -
    ) -> Self {
  429         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  430         -
            source,
  431         -
            meta: meta.unwrap_or_default(),
  432         -
        })
  433         -
    }
  434         -
}
  435         -
impl crate::s3_request_id::RequestIdExt
  436         -
    for crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError
  437         -
{
  438         -
    fn extended_request_id(&self) -> Option<&str> {
  439         -
        self.meta().extended_request_id()
  440         -
    }
  441         -
}
  442         -
impl ::aws_types::request_id::RequestId
  443         -
    for crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError
  444         -
{
  445         -
    fn request_id(&self) -> Option<&str> {
  446         -
        self.meta().request_id()
  447         -
    }
  448         -
}
  449         -
  450         -
pub use crate::operation::update_bucket_metadata_inventory_table_configuration::_update_bucket_metadata_inventory_table_configuration_output::UpdateBucketMetadataInventoryTableConfigurationOutput;
  451         -
  452         -
pub use crate::operation::update_bucket_metadata_inventory_table_configuration::_update_bucket_metadata_inventory_table_configuration_input::UpdateBucketMetadataInventoryTableConfigurationInput;
  453         -
  454         -
mod _update_bucket_metadata_inventory_table_configuration_input;
  455         -
  456         -
mod _update_bucket_metadata_inventory_table_configuration_output;
  457         -
  458         -
/// Builders
  459         -
pub mod builders;

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/update_bucket_metadata_inventory_table_configuration/_update_bucket_metadata_inventory_table_configuration_input.rs

@@ -1,0 +148,0 @@
    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 UpdateBucketMetadataInventoryTableConfigurationInput {
    6         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
    7         -
    pub bucket: ::std::option::Option<::std::string::String>,
    8         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
    9         -
    pub content_md5: ::std::option::Option<::std::string::String>,
   10         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
   11         -
    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
   12         -
    /// <p>The contents of your inventory table configuration.</p>
   13         -
    pub inventory_table_configuration: ::std::option::Option<crate::types::InventoryTableConfigurationUpdates>,
   14         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
   15         -
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
   16         -
}
   17         -
impl UpdateBucketMetadataInventoryTableConfigurationInput {
   18         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
   19         -
    pub fn bucket(&self) -> ::std::option::Option<&str> {
   20         -
        self.bucket.as_deref()
   21         -
    }
   22         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
   23         -
    pub fn content_md5(&self) -> ::std::option::Option<&str> {
   24         -
        self.content_md5.as_deref()
   25         -
    }
   26         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
   27         -
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
   28         -
        self.checksum_algorithm.as_ref()
   29         -
    }
   30         -
    /// <p>The contents of your inventory table configuration.</p>
   31         -
    pub fn inventory_table_configuration(&self) -> ::std::option::Option<&crate::types::InventoryTableConfigurationUpdates> {
   32         -
        self.inventory_table_configuration.as_ref()
   33         -
    }
   34         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
   35         -
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
   36         -
        self.expected_bucket_owner.as_deref()
   37         -
    }
   38         -
}
   39         -
impl UpdateBucketMetadataInventoryTableConfigurationInput {
   40         -
    /// Creates a new builder-style object to manufacture [`UpdateBucketMetadataInventoryTableConfigurationInput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput).
   41         -
    pub fn builder(
   42         -
    ) -> crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationInputBuilder
   43         -
    {
   44         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationInputBuilder::default()
   45         -
    }
   46         -
}
   47         -
   48         -
/// A builder for [`UpdateBucketMetadataInventoryTableConfigurationInput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput).
   49         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   50         -
#[non_exhaustive]
   51         -
pub struct UpdateBucketMetadataInventoryTableConfigurationInputBuilder {
   52         -
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
   53         -
    pub(crate) content_md5: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
   55         -
    pub(crate) inventory_table_configuration: ::std::option::Option<crate::types::InventoryTableConfigurationUpdates>,
   56         -
    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
   57         -
}
   58         -
impl UpdateBucketMetadataInventoryTableConfigurationInputBuilder {
   59         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
   60         -
    /// This field is required.
   61         -
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
   62         -
        self.bucket = ::std::option::Option::Some(input.into());
   63         -
        self
   64         -
    }
   65         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
   66         -
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
   67         -
        self.bucket = input;
   68         -
        self
   69         -
    }
   70         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
   71         -
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
   72         -
        &self.bucket
   73         -
    }
   74         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
   75         -
    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
   76         -
        self.content_md5 = ::std::option::Option::Some(input.into());
   77         -
        self
   78         -
    }
   79         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
   80         -
    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
   81         -
        self.content_md5 = input;
   82         -
        self
   83         -
    }
   84         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
   85         -
    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
   86         -
        &self.content_md5
   87         -
    }
   88         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
   89         -
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
   90         -
        self.checksum_algorithm = ::std::option::Option::Some(input);
   91         -
        self
   92         -
    }
   93         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
   94         -
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
   95         -
        self.checksum_algorithm = input;
   96         -
        self
   97         -
    }
   98         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
   99         -
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
  100         -
        &self.checksum_algorithm
  101         -
    }
  102         -
    /// <p>The contents of your inventory table configuration.</p>
  103         -
    /// This field is required.
  104         -
    pub fn inventory_table_configuration(mut self, input: crate::types::InventoryTableConfigurationUpdates) -> Self {
  105         -
        self.inventory_table_configuration = ::std::option::Option::Some(input);
  106         -
        self
  107         -
    }
  108         -
    /// <p>The contents of your inventory table configuration.</p>
  109         -
    pub fn set_inventory_table_configuration(mut self, input: ::std::option::Option<crate::types::InventoryTableConfigurationUpdates>) -> Self {
  110         -
        self.inventory_table_configuration = input;
  111         -
        self
  112         -
    }
  113         -
    /// <p>The contents of your inventory table configuration.</p>
  114         -
    pub fn get_inventory_table_configuration(&self) -> &::std::option::Option<crate::types::InventoryTableConfigurationUpdates> {
  115         -
        &self.inventory_table_configuration
  116         -
    }
  117         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  118         -
    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  119         -
        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
  120         -
        self
  121         -
    }
  122         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  123         -
    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  124         -
        self.expected_bucket_owner = input;
  125         -
        self
  126         -
    }
  127         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  128         -
    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
  129         -
        &self.expected_bucket_owner
  130         -
    }
  131         -
    /// Consumes the builder and constructs a [`UpdateBucketMetadataInventoryTableConfigurationInput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput).
  132         -
    pub fn build(
  133         -
        self,
  134         -
    ) -> ::std::result::Result<
  135         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput,
  136         -
        ::aws_smithy_types::error::operation::BuildError,
  137         -
    > {
  138         -
        ::std::result::Result::Ok(
  139         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationInput {
  140         -
                bucket: self.bucket,
  141         -
                content_md5: self.content_md5,
  142         -
                checksum_algorithm: self.checksum_algorithm,
  143         -
                inventory_table_configuration: self.inventory_table_configuration,
  144         -
                expected_bucket_owner: self.expected_bucket_owner,
  145         -
            },
  146         -
        )
  147         -
    }
  148         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/update_bucket_metadata_inventory_table_configuration/_update_bucket_metadata_inventory_table_configuration_output.rs

@@ -1,0 +63,0 @@
    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 UpdateBucketMetadataInventoryTableConfigurationOutput {
    6         -
    _extended_request_id: Option<String>,
    7         -
    _request_id: Option<String>,
    8         -
}
    9         -
impl crate::s3_request_id::RequestIdExt for UpdateBucketMetadataInventoryTableConfigurationOutput {
   10         -
    fn extended_request_id(&self) -> Option<&str> {
   11         -
        self._extended_request_id.as_deref()
   12         -
    }
   13         -
}
   14         -
impl ::aws_types::request_id::RequestId for UpdateBucketMetadataInventoryTableConfigurationOutput {
   15         -
    fn request_id(&self) -> Option<&str> {
   16         -
        self._request_id.as_deref()
   17         -
    }
   18         -
}
   19         -
impl UpdateBucketMetadataInventoryTableConfigurationOutput {
   20         -
    /// Creates a new builder-style object to manufacture [`UpdateBucketMetadataInventoryTableConfigurationOutput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput).
   21         -
    pub fn builder(
   22         -
    ) -> crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationOutputBuilder
   23         -
    {
   24         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationOutputBuilder::default()
   25         -
    }
   26         -
}
   27         -
   28         -
/// A builder for [`UpdateBucketMetadataInventoryTableConfigurationOutput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput).
   29         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   30         -
#[non_exhaustive]
   31         -
pub struct UpdateBucketMetadataInventoryTableConfigurationOutputBuilder {
   32         -
    _extended_request_id: Option<String>,
   33         -
    _request_id: Option<String>,
   34         -
}
   35         -
impl UpdateBucketMetadataInventoryTableConfigurationOutputBuilder {
   36         -
    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
   37         -
        self._extended_request_id = Some(extended_request_id.into());
   38         -
        self
   39         -
    }
   40         -
   41         -
    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
   42         -
        self._extended_request_id = extended_request_id;
   43         -
        self
   44         -
    }
   45         -
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
   46         -
        self._request_id = Some(request_id.into());
   47         -
        self
   48         -
    }
   49         -
   50         -
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
   51         -
        self._request_id = request_id;
   52         -
        self
   53         -
    }
   54         -
    /// Consumes the builder and constructs a [`UpdateBucketMetadataInventoryTableConfigurationOutput`](crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput).
   55         -
    pub fn build(
   56         -
        self,
   57         -
    ) -> crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput {
   58         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput {
   59         -
            _extended_request_id: self._extended_request_id,
   60         -
            _request_id: self._request_id,
   61         -
        }
   62         -
    }
   63         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/update_bucket_metadata_inventory_table_configuration/builders.rs

@@ -1,0 +227,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::update_bucket_metadata_inventory_table_configuration::_update_bucket_metadata_inventory_table_configuration_output::UpdateBucketMetadataInventoryTableConfigurationOutputBuilder;
    3         -
    4         -
pub use crate::operation::update_bucket_metadata_inventory_table_configuration::_update_bucket_metadata_inventory_table_configuration_input::UpdateBucketMetadataInventoryTableConfigurationInputBuilder;
    5         -
    6         -
impl crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationInputBuilder {
    7         -
    /// Sends a request with this input using the given client.
    8         -
    pub async fn send_with(
    9         -
        self,
   10         -
        client: &crate::Client,
   11         -
    ) -> ::std::result::Result<
   12         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
   13         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   14         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
   15         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16         -
        >,
   17         -
    > {
   18         -
        let mut fluent_builder = client.update_bucket_metadata_inventory_table_configuration();
   19         -
        fluent_builder.inner = self;
   20         -
        fluent_builder.send().await
   21         -
    }
   22         -
}
   23         -
/// Fluent builder constructing a request to `UpdateBucketMetadataInventoryTableConfiguration`.
   24         -
///
   25         -
/// <p>Enables or disables a live inventory table for an S3 Metadata configuration on a general purpose bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html">Accelerating data discovery with S3 Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
   26         -
/// <dl>
   27         -
/// <dt>
   28         -
/// Permissions
   29         -
/// </dt>
   30         -
/// <dd>
   31         -
/// <p>To use this operation, you must have the following permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html">Setting up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>.</p>
   32         -
/// <p>If you want to encrypt your inventory table with server-side encryption with Key Management Service (KMS) keys (SSE-KMS), you need additional permissions in your KMS key policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html"> Setting up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>.</p>
   33         -
/// <ul>
   34         -
/// <li>
   35         -
/// <p><code>s3:UpdateBucketMetadataInventoryTableConfiguration</code></p></li>
   36         -
/// <li>
   37         -
/// <p><code>s3tables:CreateTableBucket</code></p></li>
   38         -
/// <li>
   39         -
/// <p><code>s3tables:CreateNamespace</code></p></li>
   40         -
/// <li>
   41         -
/// <p><code>s3tables:GetTable</code></p></li>
   42         -
/// <li>
   43         -
/// <p><code>s3tables:CreateTable</code></p></li>
   44         -
/// <li>
   45         -
/// <p><code>s3tables:PutTablePolicy</code></p></li>
   46         -
/// <li>
   47         -
/// <p><code>s3tables:PutTableEncryption</code></p></li>
   48         -
/// <li>
   49         -
/// <p><code>kms:DescribeKey</code></p></li>
   50         -
/// </ul>
   51         -
/// </dd>
   52         -
/// </dl>
   53         -
/// <p>The following operations are related to <code>UpdateBucketMetadataInventoryTableConfiguration</code>:</p>
   54         -
/// <ul>
   55         -
/// <li>
   56         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a></p></li>
   57         -
/// <li>
   58         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html">DeleteBucketMetadataConfiguration</a></p></li>
   59         -
/// <li>
   60         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataConfiguration.html">GetBucketMetadataConfiguration</a></p></li>
   61         -
/// <li>
   62         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UpdateBucketMetadataJournalTableConfiguration.html">UpdateBucketMetadataJournalTableConfiguration</a></p></li>
   63         -
/// </ul>
   64         -
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   65         -
pub struct UpdateBucketMetadataInventoryTableConfigurationFluentBuilder {
   66         -
    handle: ::std::sync::Arc<crate::client::Handle>,
   67         -
    inner:
   68         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationInputBuilder,
   69         -
    config_override: ::std::option::Option<crate::config::Builder>,
   70         -
}
   71         -
impl
   72         -
    crate::client::customize::internal::CustomizableSend<
   73         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
   74         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
   75         -
    > for UpdateBucketMetadataInventoryTableConfigurationFluentBuilder
   76         -
{
   77         -
    fn send(
   78         -
        self,
   79         -
        config_override: crate::config::Builder,
   80         -
    ) -> crate::client::customize::internal::BoxFuture<
   81         -
        crate::client::customize::internal::SendResult<
   82         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
   83         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
   84         -
        >,
   85         -
    > {
   86         -
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   87         -
    }
   88         -
}
   89         -
impl UpdateBucketMetadataInventoryTableConfigurationFluentBuilder {
   90         -
    /// Creates a new `UpdateBucketMetadataInventoryTableConfigurationFluentBuilder`.
   91         -
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   92         -
        Self {
   93         -
            handle,
   94         -
            inner: ::std::default::Default::default(),
   95         -
            config_override: ::std::option::Option::None,
   96         -
        }
   97         -
    }
   98         -
    /// Access the UpdateBucketMetadataInventoryTableConfiguration as a reference.
   99         -
    pub fn as_input(
  100         -
        &self,
  101         -
    ) -> &crate::operation::update_bucket_metadata_inventory_table_configuration::builders::UpdateBucketMetadataInventoryTableConfigurationInputBuilder
  102         -
    {
  103         -
        &self.inner
  104         -
    }
  105         -
    /// Sends the request and returns the response.
  106         -
    ///
  107         -
    /// If an error occurs, an `SdkError` will be returned with additional details that
  108         -
    /// can be matched against.
  109         -
    ///
  110         -
    /// By default, any retryable failures will be retried twice. Retry behavior
  111         -
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
  112         -
    /// set when configuring the client.
  113         -
    pub async fn send(
  114         -
        self,
  115         -
    ) -> ::std::result::Result<
  116         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
  117         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  118         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
  119         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  120         -
        >,
  121         -
    > {
  122         -
        let input = self
  123         -
            .inner
  124         -
            .build()
  125         -
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  126         -
        let runtime_plugins = crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfiguration::operation_runtime_plugins(
  127         -
                            self.handle.runtime_plugins.clone(),
  128         -
                            &self.handle.conf,
  129         -
                            self.config_override,
  130         -
                        );
  131         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfiguration::orchestrate(
  132         -
            &runtime_plugins,
  133         -
            input,
  134         -
        )
  135         -
        .await
  136         -
    }
  137         -
  138         -
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  139         -
    pub fn customize(
  140         -
        self,
  141         -
    ) -> crate::client::customize::CustomizableOperation<
  142         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationOutput,
  143         -
        crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
  144         -
        Self,
  145         -
    > {
  146         -
        crate::client::customize::CustomizableOperation::new(self)
  147         -
    }
  148         -
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  149         -
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  150         -
        self
  151         -
    }
  152         -
  153         -
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  154         -
        self.config_override = config_override;
  155         -
        self
  156         -
    }
  157         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
  158         -
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  159         -
        self.inner = self.inner.bucket(input.into());
  160         -
        self
  161         -
    }
  162         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
  163         -
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  164         -
        self.inner = self.inner.set_bucket(input);
  165         -
        self
  166         -
    }
  167         -
    /// <p>The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable an inventory table for.</p>
  168         -
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
  169         -
        self.inner.get_bucket()
  170         -
    }
  171         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
  172         -
    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  173         -
        self.inner = self.inner.content_md5(input.into());
  174         -
        self
  175         -
    }
  176         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
  177         -
    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  178         -
        self.inner = self.inner.set_content_md5(input);
  179         -
        self
  180         -
    }
  181         -
    /// <p>The <code>Content-MD5</code> header for the inventory table configuration.</p>
  182         -
    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
  183         -
        self.inner.get_content_md5()
  184         -
    }
  185         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
  186         -
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
  187         -
        self.inner = self.inner.checksum_algorithm(input);
  188         -
        self
  189         -
    }
  190         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
  191         -
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
  192         -
        self.inner = self.inner.set_checksum_algorithm(input);
  193         -
        self
  194         -
    }
  195         -
    /// <p>The checksum algorithm to use with your inventory table configuration.</p>
  196         -
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
  197         -
        self.inner.get_checksum_algorithm()
  198         -
    }
  199         -
    /// <p>The contents of your inventory table configuration.</p>
  200         -
    pub fn inventory_table_configuration(mut self, input: crate::types::InventoryTableConfigurationUpdates) -> Self {
  201         -
        self.inner = self.inner.inventory_table_configuration(input);
  202         -
        self
  203         -
    }
  204         -
    /// <p>The contents of your inventory table configuration.</p>
  205         -
    pub fn set_inventory_table_configuration(mut self, input: ::std::option::Option<crate::types::InventoryTableConfigurationUpdates>) -> Self {
  206         -
        self.inner = self.inner.set_inventory_table_configuration(input);
  207         -
        self
  208         -
    }
  209         -
    /// <p>The contents of your inventory table configuration.</p>
  210         -
    pub fn get_inventory_table_configuration(&self) -> &::std::option::Option<crate::types::InventoryTableConfigurationUpdates> {
  211         -
        self.inner.get_inventory_table_configuration()
  212         -
    }
  213         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  214         -
    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  215         -
        self.inner = self.inner.expected_bucket_owner(input.into());
  216         -
        self
  217         -
    }
  218         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  219         -
    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  220         -
        self.inner = self.inner.set_expected_bucket_owner(input);
  221         -
        self
  222         -
    }
  223         -
    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable an inventory table for.</p>
  224         -
    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
  225         -
        self.inner.get_expected_bucket_owner()
  226         -
    }
  227         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/update_bucket_metadata_journal_table_configuration.rs

@@ -1,0 +467,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Orchestration and serialization glue logic for `UpdateBucketMetadataJournalTableConfiguration`.
    3         -
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4         -
#[non_exhaustive]
    5         -
pub struct UpdateBucketMetadataJournalTableConfiguration;
    6         -
impl UpdateBucketMetadataJournalTableConfiguration {
    7         -
    /// Creates a new `UpdateBucketMetadataJournalTableConfiguration`
    8         -
    pub fn new() -> Self {
    9         -
        Self
   10         -
    }
   11         -
    pub(crate) async fn orchestrate(
   12         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13         -
        input: crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
   14         -
    ) -> ::std::result::Result<
   15         -
        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
   16         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   17         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
   18         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19         -
        >,
   20         -
    > {
   21         -
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
   22         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   23         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   24         -
        >| {
   25         -
            err.map_service_error(|err| {
   26         -
                                err.downcast::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError>().expect("correct error type")
   27         -
                            })
   28         -
        };
   29         -
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
   30         -
            .await
   31         -
            .map_err(map_err)?;
   32         -
        let output = context.finalize().map_err(map_err)?;
   33         -
        ::std::result::Result::Ok(output.downcast::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput>().expect("correct output type"))
   34         -
    }
   35         -
   36         -
    pub(crate) async fn orchestrate_with_stop_point(
   37         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   38         -
        input: crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
   39         -
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
   40         -
    ) -> ::std::result::Result<
   41         -
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
   42         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   43         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   44         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   45         -
        >,
   46         -
    > {
   47         -
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
   48         -
        use ::tracing::Instrument;
   49         -
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
   50         -
            "S3",
   51         -
            "UpdateBucketMetadataJournalTableConfiguration",
   52         -
            input,
   53         -
            runtime_plugins,
   54         -
            stop_point,
   55         -
        )
   56         -
        // Create a parent span for the entire operation. Includes a random, internal-only,
   57         -
        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
   58         -
        .instrument(::tracing::debug_span!(
   59         -
            "S3.UpdateBucketMetadataJournalTableConfiguration",
   60         -
            "rpc.service" = "S3",
   61         -
            "rpc.method" = "UpdateBucketMetadataJournalTableConfiguration",
   62         -
            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
   63         -
            "rpc.system" = "aws-api",
   64         -
        ))
   65         -
        .await
   66         -
    }
   67         -
   68         -
    pub(crate) fn operation_runtime_plugins(
   69         -
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   70         -
        client_config: &crate::config::Config,
   71         -
        config_override: ::std::option::Option<crate::config::Builder>,
   72         -
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
   73         -
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
   74         -
   75         -
        if let ::std::option::Option::Some(config_override) = config_override {
   76         -
            for plugin in config_override.runtime_plugins.iter().cloned() {
   77         -
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78         -
            }
   79         -
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80         -
                config_override,
   81         -
                client_config.config.clone(),
   82         -
                &client_config.runtime_components,
   83         -
            ));
   84         -
        }
   85         -
        runtime_plugins
   86         -
    }
   87         -
}
   88         -
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateBucketMetadataJournalTableConfiguration {
   89         -
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90         -
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateBucketMetadataJournalTableConfiguration");
   91         -
   92         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93         -
            UpdateBucketMetadataJournalTableConfigurationRequestSerializer,
   94         -
        ));
   95         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96         -
            UpdateBucketMetadataJournalTableConfigurationResponseDeserializer,
   97         -
        ));
   98         -
   99         -
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100         -
            crate::config::auth::Params::builder()
  101         -
                .operation_name("UpdateBucketMetadataJournalTableConfiguration")
  102         -
                .build()
  103         -
                .expect("required fields set"),
  104         -
        ));
  105         -
  106         -
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  107         -
            "UpdateBucketMetadataJournalTableConfiguration",
  108         -
            "S3",
  109         -
        ));
  110         -
        cfg.store_put(crate::s3_express::checksum::provide_default_checksum_algorithm());
  111         -
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
  112         -
        signing_options.double_uri_encode = false;
  113         -
        signing_options.content_sha256_header = true;
  114         -
        signing_options.normalize_uri_path = false;
  115         -
        signing_options.payload_override = None;
  116         -
  117         -
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
  118         -
            signing_options,
  119         -
            ..::std::default::Default::default()
  120         -
        });
  121         -
  122         -
        ::std::option::Option::Some(cfg.freeze())
  123         -
    }
  124         -
  125         -
    fn runtime_components(
  126         -
        &self,
  127         -
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  128         -
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  129         -
        #[allow(unused_mut)]
  130         -
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new(
  131         -
            "UpdateBucketMetadataJournalTableConfiguration",
  132         -
        )
  133         -
        .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  134         -
        .with_interceptor(UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor)
  135         -
        .with_interceptor(crate::http_request_checksum::RequestChecksumInterceptor::new(
  136         -
            |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
  137         -
                let input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput =
  138         -
                    input.downcast_ref().expect("correct type");
  139         -
                let checksum_algorithm = input.checksum_algorithm();
  140         -
                let checksum_algorithm = checksum_algorithm.map(|algorithm| algorithm.as_str());
  141         -
                (checksum_algorithm.map(|s| s.to_string()), true)
  142         -
            },
  143         -
            |request: &mut ::aws_smithy_runtime_api::http::Request, cfg: &::aws_smithy_types::config_bag::ConfigBag| {
  144         -
                // We check if the user has set any of the checksum values manually
  145         -
                let mut user_set_checksum_value = false;
  146         -
                let headers_to_check =
  147         -
                    request
  148         -
                        .headers()
  149         -
                        .iter()
  150         -
                        .filter_map(|(name, _val)| if name.starts_with("x-amz-checksum-") { Some(name) } else { None });
  151         -
                for algo_header in headers_to_check {
  152         -
                    if request.headers().get(algo_header).is_some() {
  153         -
                        user_set_checksum_value = true;
  154         -
                    }
  155         -
                }
  156         -
  157         -
                // We check if the user set the checksum algo manually
  158         -
                let user_set_checksum_algo = request.headers().get("x-amz-sdk-checksum-algorithm").is_some();
  159         -
  160         -
                // This value is set by the user on the SdkConfig to indicate their preference
  161         -
                let request_checksum_calculation = cfg
  162         -
                    .load::<::aws_smithy_types::checksum_config::RequestChecksumCalculation>()
  163         -
                    .unwrap_or(&::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported);
  164         -
  165         -
                // From the httpChecksum trait
  166         -
                let http_checksum_required = true;
  167         -
  168         -
                let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
  169         -
  170         -
                // If the request is presigned we do not set a default.
  171         -
                // If the RequestChecksumCalculation is WhenSupported and the user has not set a checksum value or algo
  172         -
                // we set the default. If it is WhenRequired and a checksum is required by the trait and the user has not
  173         -
                // set a checksum value or algo we also set the default. In all other cases we do nothing.
  174         -
                match (
  175         -
                    request_checksum_calculation,
  176         -
                    http_checksum_required,
  177         -
                    user_set_checksum_value,
  178         -
                    user_set_checksum_algo,
  179         -
                    is_presigned_req,
  180         -
                ) {
  181         -
                    (_, _, _, _, true) => {}
  182         -
                    (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenSupported, _, false, false, _)
  183         -
                    | (::aws_smithy_types::checksum_config::RequestChecksumCalculation::WhenRequired, true, false, false, _) => {
  184         -
                        request.headers_mut().insert("x-amz-sdk-checksum-algorithm", "CRC32");
  185         -
                    }
  186         -
                    _ => {}
  187         -
                }
  188         -
  189         -
                // We return a bool indicating if the user did set the checksum value, if they did
  190         -
                // we can short circuit and exit the interceptor early.
  191         -
                Ok(user_set_checksum_value)
  192         -
            },
  193         -
        ))
  194         -
        .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  195         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
  196         -
        >::new())
  197         -
        .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  198         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
  199         -
        >::new())
  200         -
        .with_retry_classifier(
  201         -
            ::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
  202         -
                crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
  203         -
            >::builder()
  204         -
            .transient_errors({
  205         -
                let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
  206         -
                transient_errors.push("InternalError");
  207         -
                ::std::borrow::Cow::Owned(transient_errors)
  208         -
            })
  209         -
            .build(),
  210         -
        );
  211         -
  212         -
        ::std::borrow::Cow::Owned(rcb)
  213         -
    }
  214         -
}
  215         -
  216         -
#[derive(Debug)]
  217         -
struct UpdateBucketMetadataJournalTableConfigurationResponseDeserializer;
  218         -
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateBucketMetadataJournalTableConfigurationResponseDeserializer {
  219         -
    fn deserialize_nonstreaming(
  220         -
        &self,
  221         -
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  222         -
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  223         -
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  224         -
        let headers = response.headers();
  225         -
        let body = response.body().bytes().expect("body loaded");
  226         -
        #[allow(unused_mut)]
  227         -
        let mut force_error = false;
  228         -
        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
  229         -
        if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
  230         -
            force_error = true;
  231         -
        }
  232         -
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  233         -
        let parse_result = if !success && status != 200 || force_error {
  234         -
            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::de_update_bucket_metadata_journal_table_configuration_http_error(status, headers, body)
  235         -
        } else {
  236         -
            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::de_update_bucket_metadata_journal_table_configuration_http_response(status, headers, body)
  237         -
        };
  238         -
        crate::protocol_serde::type_erase_result(parse_result)
  239         -
    }
  240         -
}
  241         -
#[derive(Debug)]
  242         -
struct UpdateBucketMetadataJournalTableConfigurationRequestSerializer;
  243         -
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateBucketMetadataJournalTableConfigurationRequestSerializer {
  244         -
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  245         -
    fn serialize_input(
  246         -
        &self,
  247         -
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  248         -
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  249         -
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  250         -
        let input = input
  251         -
            .downcast::<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput>()
  252         -
            .expect("correct type");
  253         -
        let _header_serialization_settings = _cfg
  254         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  255         -
            .cloned()
  256         -
            .unwrap_or_default();
  257         -
        let mut request_builder = {
  258         -
            #[allow(clippy::uninlined_format_args)]
  259         -
            fn uri_base(
  260         -
                _input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
  261         -
                output: &mut ::std::string::String,
  262         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  263         -
                use ::std::fmt::Write as _;
  264         -
                ::std::write!(output, "/").expect("formatting should succeed");
  265         -
                ::std::result::Result::Ok(())
  266         -
            }
  267         -
            fn uri_query(
  268         -
                _input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
  269         -
                mut output: &mut ::std::string::String,
  270         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  271         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  272         -
                query.push_v("metadataJournalTable");
  273         -
                ::std::result::Result::Ok(())
  274         -
            }
  275         -
            #[allow(clippy::unnecessary_wraps)]
  276         -
            fn update_http_builder(
  277         -
                input: &crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationInput,
  278         -
                builder: ::http::request::Builder,
  279         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  280         -
                let mut uri = ::std::string::String::new();
  281         -
                uri_base(input, &mut uri)?;
  282         -
                uri_query(input, &mut uri)?;
  283         -
                let builder = crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration::ser_update_bucket_metadata_journal_table_configuration_headers(input, builder)?;
  284         -
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  285         -
            }
  286         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  287         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  288         -
            builder
  289         -
        };
  290         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  291         -
            crate::protocol_serde::shape_update_bucket_metadata_journal_table_configuration_input::ser_journal_table_configuration_http_payload(
  292         -
                &input.journal_table_configuration,
  293         -
            )?,
  294         -
        );
  295         -
        if let Some(content_length) = body.content_length() {
  296         -
            let content_length = content_length.to_string();
  297         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  298         -
        }
  299         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  300         -
    }
  301         -
}
  302         -
#[derive(Debug)]
  303         -
struct UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor;
  304         -
  305         -
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor {
  306         -
    fn name(&self) -> &'static str {
  307         -
        "UpdateBucketMetadataJournalTableConfigurationEndpointParamsInterceptor"
  308         -
    }
  309         -
  310         -
    fn read_before_execution(
  311         -
        &self,
  312         -
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  313         -
            '_,
  314         -
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  315         -
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  316         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  317         -
        >,
  318         -
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  319         -
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  320         -
        let _input = context
  321         -
            .input()
  322         -
            .downcast_ref::<UpdateBucketMetadataJournalTableConfigurationInput>()
  323         -
            .ok_or("failed to downcast to UpdateBucketMetadataJournalTableConfigurationInput")?;
  324         -
  325         -
        let params = crate::config::endpoint::Params::builder()
  326         -
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
  327         -
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
  328         -
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
  329         -
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
  330         -
            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
  331         -
            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
  332         -
            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
  333         -
            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
  334         -
            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
  335         -
            .set_use_s3_express_control_endpoint(Some(true))
  336         -
            .set_bucket(Some(
  337         -
                _input
  338         -
                    .bucket
  339         -
                    .clone()
  340         -
                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
  341         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
  342         -
            ))
  343         -
            .build()
  344         -
            .map_err(|err| {
  345         -
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  346         -
            })?;
  347         -
        cfg.interceptor_state()
  348         -
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  349         -
        ::std::result::Result::Ok(())
  350         -
    }
  351         -
}
  352         -
  353         -
// The get_* functions below are generated from JMESPath expressions in the
  354         -
// operationContextParams trait. They target the operation's input shape.
  355         -
  356         -
/// Error type for the `UpdateBucketMetadataJournalTableConfigurationError` operation.
  357         -
#[non_exhaustive]
  358         -
#[derive(::std::fmt::Debug)]
  359         -
pub enum UpdateBucketMetadataJournalTableConfigurationError {
  360         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  361         -
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  362         -
    variable wildcard pattern and check `.code()`:
  363         -
     \
  364         -
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  365         -
     \
  366         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateBucketMetadataJournalTableConfigurationError) for what information is available for the error.")]
  367         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  368         -
}
  369         -
impl UpdateBucketMetadataJournalTableConfigurationError {
  370         -
    /// Creates the `UpdateBucketMetadataJournalTableConfigurationError::Unhandled` variant from any error type.
  371         -
    pub fn unhandled(
  372         -
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  373         -
    ) -> Self {
  374         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  375         -
            source: err.into(),
  376         -
            meta: ::std::default::Default::default(),
  377         -
        })
  378         -
    }
  379         -
  380         -
    /// Creates the `UpdateBucketMetadataJournalTableConfigurationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  381         -
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  382         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  383         -
            source: err.clone().into(),
  384         -
            meta: err,
  385         -
        })
  386         -
    }
  387         -
    ///
  388         -
    /// Returns error metadata, which includes the error code, message,
  389         -
    /// request ID, and potentially additional information.
  390         -
    ///
  391         -
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  392         -
        match self {
  393         -
            Self::Unhandled(e) => &e.meta,
  394         -
        }
  395         -
    }
  396         -
}
  397         -
impl ::std::error::Error for UpdateBucketMetadataJournalTableConfigurationError {
  398         -
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  399         -
        match self {
  400         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  401         -
        }
  402         -
    }
  403         -
}
  404         -
impl ::std::fmt::Display for UpdateBucketMetadataJournalTableConfigurationError {
  405         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  406         -
        match self {
  407         -
            Self::Unhandled(_inner) => {
  408         -
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  409         -
                    write!(f, "unhandled error ({code})")
  410         -
                } else {
  411         -
                    f.write_str("unhandled error")
  412         -
                }
  413         -
            }
  414         -
        }
  415         -
    }
  416         -
}
  417         -
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateBucketMetadataJournalTableConfigurationError {
  418         -
    fn code(&self) -> ::std::option::Option<&str> {
  419         -
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  420         -
    }
  421         -
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  422         -
        ::std::option::Option::None
  423         -
    }
  424         -
}
  425         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateBucketMetadataJournalTableConfigurationError {
  426         -
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  427         -
        match self {
  428         -
            Self::Unhandled(_inner) => &_inner.meta,
  429         -
        }
  430         -
    }
  431         -
}
  432         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateBucketMetadataJournalTableConfigurationError {
  433         -
    fn create_unhandled_error(
  434         -
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  435         -
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  436         -
    ) -> Self {
  437         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  438         -
            source,
  439         -
            meta: meta.unwrap_or_default(),
  440         -
        })
  441         -
    }
  442         -
}
  443         -
impl crate::s3_request_id::RequestIdExt
  444         -
    for crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError
  445         -
{
  446         -
    fn extended_request_id(&self) -> Option<&str> {
  447         -
        self.meta().extended_request_id()
  448         -
    }
  449         -
}
  450         -
impl ::aws_types::request_id::RequestId
  451         -
    for crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError
  452         -
{
  453         -
    fn request_id(&self) -> Option<&str> {
  454         -
        self.meta().request_id()
  455         -
    }
  456         -
}
  457         -
  458         -
pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_output::UpdateBucketMetadataJournalTableConfigurationOutput;
  459         -
  460         -
pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_input::UpdateBucketMetadataJournalTableConfigurationInput;
  461         -
  462         -
mod _update_bucket_metadata_journal_table_configuration_input;
  463         -
  464         -
mod _update_bucket_metadata_journal_table_configuration_output;
  465         -
  466         -
/// Builders
  467         -
pub mod builders;