AWS SDK

AWS SDK

rev. dc1b11a614d928cff165eac12e20d37ae979d6cc

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib.rs

@@ -1,1 +32,36 @@
    8      8   
            let partition_dot_json = std::fs::read_to_string(partitions).expect("should be able to read a custom partition JSON");
    9      9   
            crate::endpoint_lib::partition::PartitionResolver::new_from_json(partition_dot_json.as_bytes()).expect("valid JSON")
   10     10   
        }
   11     11   
        _ => {
   12     12   
            ::tracing::debug!("loading default partitions");
   13     13   
            crate::endpoint_lib::partition::PartitionResolver::new_from_json(b"{\"partitions\":[{\"id\":\"aws\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com\",\"dualStackDnsSuffix\":\"api.aws\",\"implicitGlobalRegion\":\"us-east-1\",\"name\":\"aws\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"af-south-1\":{\"description\":\"Africa (Cape Town)\"},\"ap-east-1\":{\"description\":\"Asia Pacific (Hong Kong)\"},\"ap-east-2\":{\"description\":\"Asia Pacific (Taipei)\"},\"ap-northeast-1\":{\"description\":\"Asia Pacific (Tokyo)\"},\"ap-northeast-2\":{\"description\":\"Asia Pacific (Seoul)\"},\"ap-northeast-3\":{\"description\":\"Asia Pacific (Osaka)\"},\"ap-south-1\":{\"description\":\"Asia Pacific (Mumbai)\"},\"ap-south-2\":{\"description\":\"Asia Pacific (Hyderabad)\"},\"ap-southeast-1\":{\"description\":\"Asia Pacific (Singapore)\"},\"ap-southeast-2\":{\"description\":\"Asia Pacific (Sydney)\"},\"ap-southeast-3\":{\"description\":\"Asia Pacific (Jakarta)\"},\"ap-southeast-4\":{\"description\":\"Asia Pacific (Melbourne)\"},\"ap-southeast-5\":{\"description\":\"Asia Pacific (Malaysia)\"},\"ap-southeast-6\":{\"description\":\"Asia Pacific (New Zealand)\"},\"ap-southeast-7\":{\"description\":\"Asia Pacific (Thailand)\"},\"aws-global\":{\"description\":\"aws global region\"},\"ca-central-1\":{\"description\":\"Canada (Central)\"},\"ca-west-1\":{\"description\":\"Canada West (Calgary)\"},\"eu-central-1\":{\"description\":\"Europe (Frankfurt)\"},\"eu-central-2\":{\"description\":\"Europe (Zurich)\"},\"eu-north-1\":{\"description\":\"Europe (Stockholm)\"},\"eu-south-1\":{\"description\":\"Europe (Milan)\"},\"eu-south-2\":{\"description\":\"Europe (Spain)\"},\"eu-west-1\":{\"description\":\"Europe (Ireland)\"},\"eu-west-2\":{\"description\":\"Europe (London)\"},\"eu-west-3\":{\"description\":\"Europe (Paris)\"},\"il-central-1\":{\"description\":\"Israel (Tel Aviv)\"},\"me-central-1\":{\"description\":\"Middle East (UAE)\"},\"me-south-1\":{\"description\":\"Middle East (Bahrain)\"},\"mx-central-1\":{\"description\":\"Mexico (Central)\"},\"sa-east-1\":{\"description\":\"South America (Sao Paulo)\"},\"us-east-1\":{\"description\":\"US East (N. Virginia)\"},\"us-east-2\":{\"description\":\"US East (Ohio)\"},\"us-west-1\":{\"description\":\"US West (N. California)\"},\"us-west-2\":{\"description\":\"US West (Oregon)\"}}},{\"id\":\"aws-cn\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com.cn\",\"dualStackDnsSuffix\":\"api.amazonwebservices.com.cn\",\"implicitGlobalRegion\":\"cn-northwest-1\",\"name\":\"aws-cn\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-cn-global\":{\"description\":\"aws-cn global region\"},\"cn-north-1\":{\"description\":\"China (Beijing)\"},\"cn-northwest-1\":{\"description\":\"China (Ningxia)\"}}},{\"id\":\"aws-eusc\",\"outputs\":{\"dnsSuffix\":\"amazonaws.eu\",\"dualStackDnsSuffix\":\"api.amazonwebservices.eu\",\"implicitGlobalRegion\":\"eusc-de-east-1\",\"name\":\"aws-eusc\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"eusc-de-east-1\":{\"description\":\"EU (Germany)\"}}},{\"id\":\"aws-iso\",\"outputs\":{\"dnsSuffix\":\"c2s.ic.gov\",\"dualStackDnsSuffix\":\"api.aws.ic.gov\",\"implicitGlobalRegion\":\"us-iso-east-1\",\"name\":\"aws-iso\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-global\":{\"description\":\"aws-iso global region\"},\"us-iso-east-1\":{\"description\":\"US ISO East\"},\"us-iso-west-1\":{\"description\":\"US ISO WEST\"}}},{\"id\":\"aws-iso-b\",\"outputs\":{\"dnsSuffix\":\"sc2s.sgov.gov\",\"dualStackDnsSuffix\":\"api.aws.scloud\",\"implicitGlobalRegion\":\"us-isob-east-1\",\"name\":\"aws-iso-b\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-b-global\":{\"description\":\"aws-iso-b global region\"},\"us-isob-east-1\":{\"description\":\"US ISOB East (Ohio)\"}}},{\"id\":\"aws-iso-e\",\"outputs\":{\"dnsSuffix\":\"cloud.adc-e.uk\",\"dualStackDnsSuffix\":\"api.cloud-aws.adc-e.uk\",\"implicitGlobalRegion\":\"eu-isoe-west-1\",\"name\":\"aws-iso-e\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-e-global\":{\"description\":\"aws-iso-e global region\"},\"eu-isoe-west-1\":{\"description\":\"EU ISOE West\"}}},{\"id\":\"aws-iso-f\",\"outputs\":{\"dnsSuffix\":\"csp.hci.ic.gov\",\"dualStackDnsSuffix\":\"api.aws.hci.ic.gov\",\"implicitGlobalRegion\":\"us-isof-south-1\",\"name\":\"aws-iso-f\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-iso-f-global\":{\"description\":\"aws-iso-f global region\"},\"us-isof-east-1\":{\"description\":\"US ISOF EAST\"},\"us-isof-south-1\":{\"description\":\"US ISOF SOUTH\"}}},{\"id\":\"aws-us-gov\",\"outputs\":{\"dnsSuffix\":\"amazonaws.com\",\"dualStackDnsSuffix\":\"api.aws\",\"implicitGlobalRegion\":\"us-gov-west-1\",\"name\":\"aws-us-gov\",\"supportsDualStack\":true,\"supportsFIPS\":true},\"regionRegex\":\"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\"regions\":{\"aws-us-gov-global\":{\"description\":\"aws-us-gov global region\"},\"us-gov-east-1\":{\"description\":\"AWS GovCloud (US-East)\"},\"us-gov-west-1\":{\"description\":\"AWS GovCloud (US-West)\"}}}],\"version\":\"1.1\"}").expect("valid JSON")
   14     14   
        }
   15     15   
    },
   16     16   
);
   17     17   
   18         -
pub(crate) mod diagnostic;
          18  +
pub(crate) mod arn;
   19     19   
   20         -
pub(crate) mod partition;
          20  +
pub(crate) mod bdd_interpreter;
   21     21   
   22         -
pub(crate) mod arn;
          22  +
pub(crate) mod coalesce;
          23  +
          24  +
pub(crate) mod diagnostic;
   23     25   
   24     26   
pub(crate) mod host;
   25     27   
   26     28   
pub(crate) mod parse_url;
   27     29   
          30  +
pub(crate) mod partition;
          31  +
   28     32   
pub(crate) mod s3;
   29     33   
   30     34   
pub(crate) mod substring;
   31     35   
   32     36   
pub(crate) mod uri_encode;

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/arn.rs

@@ -1,1 +42,42 @@
    2      2   
/*
    3      3   
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
 *  SPDX-License-Identifier: Apache-2.0
    5      5   
 */
    6      6   
    7      7   
use crate::endpoint_lib::diagnostic::DiagnosticCollector;
    8      8   
use std::borrow::Cow;
    9      9   
use std::error::Error;
   10     10   
use std::fmt::{Display, Formatter};
   11     11   
   12         -
#[derive(Debug, Eq, PartialEq)]
          12  +
#[derive(Debug, Eq, PartialEq, Clone, Default)]
   13     13   
pub(crate) struct Arn<'a> {
   14     14   
    partition: &'a str,
   15     15   
    service: &'a str,
   16     16   
    region: &'a str,
   17     17   
    account_id: &'a str,
   18     18   
    resource_id: Vec<&'a str>,
   19     19   
}
   20     20   
   21     21   
#[allow(unused)]
   22     22   
impl<'a> Arn<'a> {

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/bdd_interpreter.rs

@@ -0,1 +0,67 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           3  +
/*
           4  +
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           5  +
 *  SPDX-License-Identifier: Apache-2.0
           6  +
 */
           7  +
           8  +
//TODO(bdd): Should this just be an [i32; 3]? Might make it easier to make things const?
           9  +
/// Binary Decision Diagram node representation
          10  +
#[derive(Debug, Clone, Copy)]
          11  +
pub(crate) struct BddNode {
          12  +
    pub condition_index: i32,
          13  +
    pub high_ref: i32,
          14  +
    pub low_ref: i32,
          15  +
}
          16  +
          17  +
/// Evaluates a BDD to resolve an endpoint result
          18  +
///
          19  +
/// Arguments
          20  +
/// * `nodes` - Array of BddNodes
          21  +
/// * `conditions` - Array of conditions referenced by nodes
          22  +
/// * `results` - Array of possible results
          23  +
/// * `root_ref` - Root reference to start evaluation
          24  +
/// * `params` - Parameters for condition evaluation
          25  +
/// * `context` - Values that can be set/mutated by the conditions
          26  +
/// * `diagnostic_collector` - a struct for collecting information about the execution of conditions
          27  +
/// * `condition_evaluator` - Function to evaluate individual conditions with params and context
          28  +
///
          29  +
/// Returns
          30  +
/// * `Some(R)` - Result if evaluation succeeds
          31  +
/// * `None` - No match found
          32  +
#[allow(clippy::too_many_arguments)]
          33  +
pub(crate) fn evaluate_bdd<'a, Cond, Params, Res: Clone, Context>(
          34  +
    nodes: &[BddNode],
          35  +
    conditions: &[Cond],
          36  +
    results: &[Res],
          37  +
    root_ref: i32,
          38  +
    params: &'a Params,
          39  +
    context: &mut Context,
          40  +
    diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector,
          41  +
    mut condition_evaluator: impl FnMut(&Cond, &'a Params, &mut Context, &mut crate::endpoint_lib::diagnostic::DiagnosticCollector) -> bool,
          42  +
) -> Option<Res> {
          43  +
    let mut current_ref = root_ref;
          44  +
          45  +
    loop {
          46  +
        match current_ref {
          47  +
            // Result references (>= 100_000_000)
          48  +
            ref_val if ref_val >= 100_000_000 => {
          49  +
                let result_index = (ref_val - 100_000_000) as usize;
          50  +
                return results.get(result_index).cloned();
          51  +
            }
          52  +
            // Terminals (1 = TRUE, -1 = FALSE) NoMatchRule
          53  +
            1 | -1 => return results.first().cloned(),
          54  +
            // Node references
          55  +
            ref_val => {
          56  +
                let is_complement = ref_val < 0;
          57  +
                let node_index = (ref_val.abs() - 1) as usize;
          58  +
                let node = nodes.get(node_index)?;
          59  +
                let condition_index = node.condition_index as usize;
          60  +
                let condition = conditions.get(condition_index)?;
          61  +
                let condition_result = condition_evaluator(condition, params, context, diagnostic_collector);
          62  +
                // Handle complement edges: complement inverts the branch selection
          63  +
                current_ref = if is_complement ^ condition_result { node.high_ref } else { node.low_ref };
          64  +
            }
          65  +
        }
          66  +
    }
          67  +
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/coalesce.rs

@@ -0,1 +0,209 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
//! Coalesce function that returns the first non-None value.
           8  +
           9  +
/*
          10  +
 * Implementation Note: Autoderef Specialization
          11  +
 *
          12  +
 * This implementation uses autoderef specialization to dispatch to different
          13  +
 * coalesce behaviors based on the types of the two arguments at compile time.
          14  +
 *
          15  +
 * The technique exploits Rust's method resolution, which automatically dereferences
          16  +
 * types to find matching method implementations. Method resolution prefers implementations
          17  +
 * that require fewer dereferences, creating a priority ordering.
          18  +
 *
          19  +
 * Three specialization levels (highest to lowest priority):
          20  +
 *
          21  +
 * 1. `&&&(&Option<T>, &Option<T>)` - Both args are Option
          22  +
 *    Returns: Option<T> via a.or(b)
          23  +
 *
          24  +
 * 2. `&&(&Option<T>, &T)` - First arg is Option, second is concrete
          25  +
 *    Returns: T via a.unwrap_or(b)
          26  +
 *
          27  +
 * 3. `&(&T, &U)` - Both args are concrete (or any other combination)
          28  +
 *    Returns: T (always returns first arg)
          29  +
 *
          30  +
 * The macro call `(&&&(&a, &b)).coalesce()` starts with three references. Method resolution
          31  +
 * tries each impl in order by dereferencing:
          32  +
 * - First tries `&&&(&Option<T>, &Option<T>)` (no deref needed) - matches if both are Option
          33  +
 * - Then tries `&&(&Option<T>, &T)` (one deref) - matches if first is Option, second isn't
          34  +
 * - Finally tries `&(&T, &U)` (two derefs) - matches everything else
          35  +
 *
          36  +
 * This allows the macro to handle Option/non-Option combinations without runtime checks,
          37  +
 * selecting the appropriate coalesce logic at compile time based on argument types.
          38  +
 */
          39  +
          40  +
/// Helper trait to implement the coalesce! macro
          41  +
pub(crate) trait Coalesce {
          42  +
    /// The first arg
          43  +
    type Arg1;
          44  +
    /// The second arg
          45  +
    type Arg2;
          46  +
    /// The result of comparing Arg1 and Arg1
          47  +
    type Result;
          48  +
          49  +
    /// Evaluates arguments in order and returns the first non-empty result, otherwise returns the result of the last argument.
          50  +
    fn coalesce(&self) -> fn(Self::Arg1, Self::Arg2) -> Self::Result;
          51  +
}
          52  +
          53  +
impl<T> Coalesce for &&&(&Option<T>, &Option<T>) {
          54  +
    type Arg1 = Option<T>;
          55  +
    type Arg2 = Option<T>;
          56  +
    type Result = Option<T>;
          57  +
          58  +
    fn coalesce(&self) -> fn(Self::Arg1, Self::Arg2) -> Self::Result {
          59  +
        |a: Option<T>, b: Option<T>| a.or(b)
          60  +
    }
          61  +
}
          62  +
          63  +
impl<T> Coalesce for &&(&Option<T>, &T) {
          64  +
    type Arg1 = Option<T>;
          65  +
    type Arg2 = T;
          66  +
    type Result = T;
          67  +
          68  +
    fn coalesce(&self) -> fn(Self::Arg1, Self::Arg2) -> Self::Result {
          69  +
        |a: Option<T>, b: T| a.unwrap_or(b)
          70  +
    }
          71  +
}
          72  +
          73  +
impl<T, U> Coalesce for &(&T, &U) {
          74  +
    type Arg1 = T;
          75  +
    type Arg2 = U;
          76  +
    type Result = T;
          77  +
          78  +
    fn coalesce(&self) -> fn(Self::Arg1, Self::Arg2) -> Self::Result {
          79  +
        |a: T, _b| a
          80  +
    }
          81  +
}
          82  +
          83  +
/// Evaluates arguments in order and returns the first non-empty result, otherwise returns the result of the last argument.
          84  +
macro_rules! coalesce {
          85  +
    ($a:expr) => {$a};
          86  +
    ($a:expr, $b:expr) => {{
          87  +
        use crate::endpoint_lib::coalesce::Coalesce;
          88  +
        let a = $a;
          89  +
        let b = $b;
          90  +
        (&&&(&a, &b)).coalesce()(a, b)
          91  +
    }};
          92  +
    ($a:expr, $b:expr $(, $c:expr)* $(,)?) => {
          93  +
        $crate::endpoint_lib::coalesce::coalesce!($crate::endpoint_lib::coalesce::coalesce!($a, $b) $(, $c)*)
          94  +
    }
          95  +
}
          96  +
          97  +
pub(crate) use coalesce;
          98  +
          99  +
#[cfg(test)]
         100  +
mod test {
         101  +
    use super::*;
         102  +
         103  +
    #[test]
         104  +
    fn base_cases() {
         105  +
        // All types optional
         106  +
        let a = Some("a");
         107  +
        let b = Some("b");
         108  +
         109  +
        assert_eq!(coalesce!(a, b), Some("a"));
         110  +
         111  +
        let a = None;
         112  +
        let b = Some("b");
         113  +
         114  +
        assert_eq!(coalesce!(a, b), Some("b"));
         115  +
         116  +
        let a = Some("a");
         117  +
        let b = None;
         118  +
         119  +
        assert_eq!(coalesce!(a, b), Some("a"));
         120  +
         121  +
        let a: Option<&str> = None;
         122  +
        let b: Option<&str> = None;
         123  +
         124  +
        assert_eq!(coalesce!(a, b), None);
         125  +
         126  +
        // Some non-optional types
         127  +
        let a = "a";
         128  +
        let b = Some("b");
         129  +
         130  +
        assert_eq!(coalesce!(a, b), "a");
         131  +
         132  +
        let a = Some("a");
         133  +
        let b = "b";
         134  +
         135  +
        assert_eq!(coalesce!(a, b), "a");
         136  +
         137  +
        let a = None;
         138  +
        let b = "b";
         139  +
         140  +
        assert_eq!(coalesce!(a, b), "b");
         141  +
         142  +
        let a = "a";
         143  +
        let b: Option<&str> = None;
         144  +
         145  +
        assert_eq!(coalesce!(a, b), "a");
         146  +
         147  +
        // All types non-optional
         148  +
        let a = "a";
         149  +
        let b = "b";
         150  +
         151  +
        assert_eq!(coalesce!(a, b), "a");
         152  +
         153  +
        // Works with trailing comma (makes codegen easier)
         154  +
        let a = "a";
         155  +
        let b = "b";
         156  +
         157  +
        assert_eq!(coalesce!(a, b,), "a");
         158  +
    }
         159  +
         160  +
    #[test]
         161  +
    fn longer_cases() {
         162  +
        assert_eq!(coalesce!(None, None, None, None, None, None, None, None, None, None, "a"), "a");
         163  +
         164  +
        // In the generated code all of the inputs are typed variables, so the turbofish isn't needed in practice
         165  +
        assert_eq!(
         166  +
            coalesce!(
         167  +
                None,
         168  +
                None,
         169  +
                None,
         170  +
                None,
         171  +
                "a",
         172  +
                None::<&str>,
         173  +
                None::<&str>,
         174  +
                None::<&str>,
         175  +
                None::<&str>,
         176  +
                None::<&str>,
         177  +
                None::<&str>
         178  +
            ),
         179  +
            "a"
         180  +
        );
         181  +
         182  +
        assert_eq!(
         183  +
            coalesce!(
         184  +
                None,
         185  +
                None,
         186  +
                None,
         187  +
                None,
         188  +
                "a",
         189  +
                None::<&str>,
         190  +
                Some("b"),
         191  +
                None::<&str>,
         192  +
                None::<&str>,
         193  +
                None::<&str>,
         194  +
                "c"
         195  +
            ),
         196  +
            "a"
         197  +
        );
         198  +
         199  +
        assert_eq!(coalesce!(None, None, None, Some("a"), None, None, None, None, None, None, "b"), "a");
         200  +
        assert_eq!(
         201  +
            coalesce!(Some("a"), None, None, Some("b"), None, None, None, None, None, None,),
         202  +
            Some("a")
         203  +
        );
         204  +
         205  +
        assert_eq!(coalesce!("a", "b", "c", "d", "e", "f", "g",), "a");
         206  +
         207  +
        assert_eq!(coalesce!(None, None, None, None, None, None, None, None, None, None::<&str>,), None);
         208  +
    }
         209  +
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/diagnostic.rs

@@ -7,7 +45,46 @@
   27     27   
    pub(crate) fn capture<T, E: Into<Box<dyn Error + Send + Sync>>>(&mut self, err: Result<T, E>) -> Option<T> {
   28     28   
        match err {
   29     29   
            Ok(res) => Some(res),
   30     30   
            Err(e) => {
   31     31   
                self.report_error(e);
   32     32   
                None
   33     33   
            }
   34     34   
        }
   35     35   
    }
   36     36   
          37  +
    #[allow(dead_code)]
   37     38   
    pub(crate) fn take_last_error(&mut self) -> Option<Box<dyn Error + Send + Sync>> {
   38     39   
        self.last_error.take()
   39     40   
    }
   40     41   
   41     42   
    /// Create a new diagnostic collector
   42     43   
    pub(crate) fn new() -> Self {
   43     44   
        Self { last_error: None }
   44     45   
    }
   45     46   
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/parse_url.rs

@@ -1,1 +47,57 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/*
    3      3   
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
 *  SPDX-License-Identifier: Apache-2.0
    5      5   
 */
    6      6   
    7      7   
use crate::endpoint_lib::diagnostic::DiagnosticCollector;
    8      8   
use http::Uri;
    9      9   
use url::{Host, Url as ParsedUrl};
   10     10   
   11         -
#[derive(PartialEq, Debug)]
          11  +
#[derive(PartialEq, Debug, Clone)]
   12     12   
pub(crate) struct Url<'a> {
   13     13   
    uri: Uri,
   14     14   
    url: ParsedUrl,
   15     15   
    raw: &'a str,
   16     16   
}
   17     17   
          18  +
impl Default for Url<'_> {
          19  +
    fn default() -> Self {
          20  +
        Self {
          21  +
            uri: Uri::from_static("https://localhost"),
          22  +
            url: ParsedUrl::parse("https://localhost").unwrap(),
          23  +
            raw: "https://localhost",
          24  +
        }
          25  +
    }
          26  +
}
          27  +
   18     28   
// individual methods on parse_url might not be used (although the [`parse_url`] itself _MUST_ be used
   19     29   
// since stdlib functions are pulled into crate lazily)
   20     30   
#[allow(unused)]
   21     31   
impl Url<'_> {
   22     32   
    pub(crate) fn is_ip(&self) -> bool {
   23     33   
        matches!(self.url.host(), Some(Host::Ipv4(_) | Host::Ipv6(_)))
   24     34   
    }
   25     35   
    pub(crate) fn scheme(&self) -> &str {
   26     36   
        self.url.scheme()
   27     37   
    }

tmp-codegen-diff/aws-sdk/sdk/s3/src/endpoint_lib/partition.rs

@@ -3,3 +62,63 @@
   23     23   
    partitions: Vec<PartitionMetadata>,
   24     24   
}
   25     25   
   26     26   
impl PartitionResolver {
   27     27   
    pub(crate) fn from_partitions(partitions: Vec<PartitionMetadata>) -> Self {
   28     28   
        Self { partitions }
   29     29   
    }
   30     30   
}
   31     31   
   32     32   
/// Partition result returned from partition resolver
          33  +
#[derive(Debug, Default, Clone)]
   33     34   
pub(crate) struct Partition<'a> {
   34     35   
    name: &'a str,
   35     36   
    dns_suffix: &'a str,
   36     37   
    dual_stack_dns_suffix: &'a str,
   37     38   
    supports_fips: bool,
   38     39   
    supports_dual_stack: bool,
   39     40   
    implicit_global_region: &'a str,
   40     41   
}
   41     42   
   42     43   
#[allow(unused)]

tmp-codegen-diff/aws-sdk/sdk/s3/src/error_meta.rs

@@ -1,1 +126,119 @@
    2      2   
/// All possible error types for this service.
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::fmt::Debug)]
    5      5   
pub enum Error {
    6      6   
    /// <p>The requested bucket name is not available. The bucket namespace is shared by all users of the system. Select a different name and try again.</p>
    7      7   
    BucketAlreadyExists(crate::types::error::BucketAlreadyExists),
    8      8   
    /// <p>The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).</p>
    9      9   
    BucketAlreadyOwnedByYou(crate::types::error::BucketAlreadyOwnedByYou),
   10     10   
    /// <p>The existing object was created with a different encryption type. Subsequent write requests must include the appropriate encryption parameters in the request or while creating the session.</p>
   11     11   
    EncryptionTypeMismatch(crate::types::error::EncryptionTypeMismatch),
   12         -
    /// <p>Parameters on this idempotent request are inconsistent with parameters used in previous request(s).</p>
   13         -
    /// <p>For a list of error codes and more information on Amazon S3 errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList">Error codes</a>.</p><note>
   14         -
    /// <p>Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
   15         -
    /// </note>
   16         -
    IdempotencyParameterMismatch(crate::types::error::IdempotencyParameterMismatch),
   17     12   
    /// <p>Object is archived and inaccessible until restored.</p>
   18     13   
    /// <p>If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. Otherwise, this operation returns an <code>InvalidObjectState</code> error. For information about restoring archived objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
   19     14   
    InvalidObjectState(crate::types::error::InvalidObjectState),
   20     15   
    /// <p>You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:</p>
   21     16   
    /// <ul>
   22     17   
    /// <li>
   23     18   
    /// <p>Cannot specify both a write offset value and user-defined object metadata for existing objects.</p></li>
   24     19   
    /// <li>
   25     20   
    /// <p>Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.</p></li>
   26     21   
    /// <li>
   27     22   
    /// <p>Request body cannot be empty when 'write offset' is specified.</p></li>
   28     23   
    /// </ul>
   29     24   
    InvalidRequest(crate::types::error::InvalidRequest),
   30     25   
    /// <p>The write offset value that you specified does not match the current object size.</p>
   31     26   
    InvalidWriteOffset(crate::types::error::InvalidWriteOffset),
   32     27   
    /// <p>The specified bucket does not exist.</p>
   33     28   
    NoSuchBucket(crate::types::error::NoSuchBucket),
   34     29   
    /// <p>The specified key does not exist.</p>
   35     30   
    NoSuchKey(crate::types::error::NoSuchKey),
   36     31   
    /// <p>The specified multipart upload does not exist.</p>
   37     32   
    NoSuchUpload(crate::types::error::NoSuchUpload),
   38     33   
    /// <p>The specified content does not exist.</p>
   39     34   
    NotFound(crate::types::error::NotFound),
   40     35   
    /// <p>This action is not allowed against this storage tier.</p>
   41     36   
    ObjectAlreadyInActiveTierError(crate::types::error::ObjectAlreadyInActiveTierError),
   42     37   
    /// <p>The source object of the COPY action is not in the active tier and is only stored in Amazon S3 Glacier.</p>
   43     38   
    ObjectNotInActiveTierError(crate::types::error::ObjectNotInActiveTierError),
   44     39   
    /// <p>You have attempted to add more parts than the maximum of 10000 that are allowed for this object. You can use the CopyObject operation to copy this object to another and then add more data to the newly copied object.</p>
   45     40   
    TooManyParts(crate::types::error::TooManyParts),
   46     41   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
   47     42   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   48     43   
    variable wildcard pattern and check `.code()`:
   49     44   
     \
   50     45   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   51     46   
     \
   52     47   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   53     48   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
   54     49   
}
   55     50   
impl ::std::fmt::Display for Error {
   56     51   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   57     52   
        match self {
   58     53   
            Error::BucketAlreadyExists(inner) => inner.fmt(f),
   59     54   
            Error::BucketAlreadyOwnedByYou(inner) => inner.fmt(f),
   60     55   
            Error::EncryptionTypeMismatch(inner) => inner.fmt(f),
   61         -
            Error::IdempotencyParameterMismatch(inner) => inner.fmt(f),
   62     56   
            Error::InvalidObjectState(inner) => inner.fmt(f),
   63     57   
            Error::InvalidRequest(inner) => inner.fmt(f),
   64     58   
            Error::InvalidWriteOffset(inner) => inner.fmt(f),
   65     59   
            Error::NoSuchBucket(inner) => inner.fmt(f),
   66     60   
            Error::NoSuchKey(inner) => inner.fmt(f),
   67     61   
            Error::NoSuchUpload(inner) => inner.fmt(f),
   68     62   
            Error::NotFound(inner) => inner.fmt(f),
   69     63   
            Error::ObjectAlreadyInActiveTierError(inner) => inner.fmt(f),
   70     64   
            Error::ObjectNotInActiveTierError(inner) => inner.fmt(f),
   71     65   
            Error::TooManyParts(inner) => inner.fmt(f),
   72     66   
            Error::Unhandled(_) => {
   73     67   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   74     68   
                    write!(f, "unhandled error ({code})")
   75     69   
                } else {
   76     70   
                    f.write_str("unhandled error")
   77     71   
                }
   78     72   
            }
   79     73   
        }
   80     74   
    }
   81     75   
}
   82     76   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   83     77   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   84     78   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   85     79   
            source: value.into(),
   86     80   
            meta: ::std::default::Default::default(),
   87     81   
        })
   88     82   
    }
   89     83   
}
   90     84   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   91     85   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   92     86   
        match self {
   93     87   
            Self::BucketAlreadyExists(inner) => inner.meta(),
   94     88   
            Self::BucketAlreadyOwnedByYou(inner) => inner.meta(),
   95     89   
            Self::EncryptionTypeMismatch(inner) => inner.meta(),
   96         -
            Self::IdempotencyParameterMismatch(inner) => inner.meta(),
   97     90   
            Self::InvalidObjectState(inner) => inner.meta(),
   98     91   
            Self::InvalidRequest(inner) => inner.meta(),
   99     92   
            Self::InvalidWriteOffset(inner) => inner.meta(),
  100     93   
            Self::NoSuchBucket(inner) => inner.meta(),
  101     94   
            Self::NoSuchKey(inner) => inner.meta(),
  102     95   
            Self::NoSuchUpload(inner) => inner.meta(),
  103     96   
            Self::NotFound(inner) => inner.meta(),
  104     97   
            Self::ObjectAlreadyInActiveTierError(inner) => inner.meta(),
  105     98   
            Self::ObjectNotInActiveTierError(inner) => inner.meta(),
  106     99   
            Self::TooManyParts(inner) => inner.meta(),
@@ -172,165 +265,224 @@
  192    185   
}
  193    186   
impl From<crate::operation::create_bucket::CreateBucketError> for Error {
  194    187   
    fn from(err: crate::operation::create_bucket::CreateBucketError) -> Self {
  195    188   
        match err {
  196    189   
            crate::operation::create_bucket::CreateBucketError::BucketAlreadyExists(inner) => Error::BucketAlreadyExists(inner),
  197    190   
            crate::operation::create_bucket::CreateBucketError::BucketAlreadyOwnedByYou(inner) => Error::BucketAlreadyOwnedByYou(inner),
  198    191   
            crate::operation::create_bucket::CreateBucketError::Unhandled(inner) => Error::Unhandled(inner),
  199    192   
        }
  200    193   
    }
  201    194   
}
  202         -
impl<R>
  203         -
    From<
  204         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  205         -
            crate::operation::create_bucket_metadata_configuration::CreateBucketMetadataConfigurationError,
  206         -
            R,
  207         -
        >,
  208         -
    > for Error
  209         -
where
  210         -
    R: Send + Sync + std::fmt::Debug + 'static,
  211         -
{
  212         -
    fn from(
  213         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  214         -
            crate::operation::create_bucket_metadata_configuration::CreateBucketMetadataConfigurationError,
  215         -
            R,
  216         -
        >,
  217         -
    ) -> Self {
  218         -
        match err {
  219         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  220         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  221         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  222         -
                source: err.into(),
  223         -
            }),
  224         -
        }
  225         -
    }
  226         -
}
  227         -
impl From<crate::operation::create_bucket_metadata_configuration::CreateBucketMetadataConfigurationError> for Error {
  228         -
    fn from(err: crate::operation::create_bucket_metadata_configuration::CreateBucketMetadataConfigurationError) -> Self {
  229         -
        match err {
  230         -
            crate::operation::create_bucket_metadata_configuration::CreateBucketMetadataConfigurationError::Unhandled(inner) => {
  231         -
                Error::Unhandled(inner)
  232         -
            }
  233         -
        }
  234         -
    }
  235         -
}
  236    195   
impl<R>
  237    196   
    From<
  238    197   
        ::aws_smithy_runtime_api::client::result::SdkError<
  239    198   
            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
  240    199   
            R,
  241    200   
        >,
  242    201   
    > for Error
  243    202   
where
  244    203   
    R: Send + Sync + std::fmt::Debug + 'static,
  245    204   
{
@@ -475,434 +568,493 @@
  495    454   
        }
  496    455   
    }
  497    456   
}
  498    457   
impl From<crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleError> for Error {
  499    458   
    fn from(err: crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleError) -> Self {
  500    459   
        match err {
  501    460   
            crate::operation::delete_bucket_lifecycle::DeleteBucketLifecycleError::Unhandled(inner) => Error::Unhandled(inner),
  502    461   
        }
  503    462   
    }
  504    463   
}
  505         -
impl<R>
  506         -
    From<
  507         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  508         -
            crate::operation::delete_bucket_metadata_configuration::DeleteBucketMetadataConfigurationError,
  509         -
            R,
  510         -
        >,
  511         -
    > for Error
  512         -
where
  513         -
    R: Send + Sync + std::fmt::Debug + 'static,
  514         -
{
  515         -
    fn from(
  516         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  517         -
            crate::operation::delete_bucket_metadata_configuration::DeleteBucketMetadataConfigurationError,
  518         -
            R,
  519         -
        >,
  520         -
    ) -> Self {
  521         -
        match err {
  522         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  523         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  524         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  525         -
                source: err.into(),
  526         -
            }),
  527         -
        }
  528         -
    }
  529         -
}
  530         -
impl From<crate::operation::delete_bucket_metadata_configuration::DeleteBucketMetadataConfigurationError> for Error {
  531         -
    fn from(err: crate::operation::delete_bucket_metadata_configuration::DeleteBucketMetadataConfigurationError) -> Self {
  532         -
        match err {
  533         -
            crate::operation::delete_bucket_metadata_configuration::DeleteBucketMetadataConfigurationError::Unhandled(inner) => {
  534         -
                Error::Unhandled(inner)
  535         -
            }
  536         -
        }
  537         -
    }
  538         -
}
  539    464   
impl<R>
  540    465   
    From<
  541    466   
        ::aws_smithy_runtime_api::client::result::SdkError<
  542    467   
            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
  543    468   
            R,
  544    469   
        >,
  545    470   
    > for Error
  546    471   
where
  547    472   
    R: Send + Sync + std::fmt::Debug + 'static,
  548    473   
{
@@ -1045,970 +1136,1029 @@
 1065    990   
        }
 1066    991   
    }
 1067    992   
}
 1068    993   
impl From<crate::operation::get_bucket_logging::GetBucketLoggingError> for Error {
 1069    994   
    fn from(err: crate::operation::get_bucket_logging::GetBucketLoggingError) -> Self {
 1070    995   
        match err {
 1071    996   
            crate::operation::get_bucket_logging::GetBucketLoggingError::Unhandled(inner) => Error::Unhandled(inner),
 1072    997   
        }
 1073    998   
    }
 1074    999   
}
 1075         -
impl<R>
 1076         -
    From<
 1077         -
        ::aws_smithy_runtime_api::client::result::SdkError<
 1078         -
            crate::operation::get_bucket_metadata_configuration::GetBucketMetadataConfigurationError,
 1079         -
            R,
 1080         -
        >,
 1081         -
    > for Error
 1082         -
where
 1083         -
    R: Send + Sync + std::fmt::Debug + 'static,
 1084         -
{
 1085         -
    fn from(
 1086         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
 1087         -
            crate::operation::get_bucket_metadata_configuration::GetBucketMetadataConfigurationError,
 1088         -
            R,
 1089         -
        >,
 1090         -
    ) -> Self {
 1091         -
        match err {
 1092         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 1093         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 1094         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 1095         -
                source: err.into(),
 1096         -
            }),
 1097         -
        }
 1098         -
    }
 1099         -
}
 1100         -
impl From<crate::operation::get_bucket_metadata_configuration::GetBucketMetadataConfigurationError> for Error {
 1101         -
    fn from(err: crate::operation::get_bucket_metadata_configuration::GetBucketMetadataConfigurationError) -> Self {
 1102         -
        match err {
 1103         -
            crate::operation::get_bucket_metadata_configuration::GetBucketMetadataConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
 1104         -
        }
 1105         -
    }
 1106         -
}
 1107   1000   
impl<R>
 1108   1001   
    From<
 1109   1002   
        ::aws_smithy_runtime_api::client::result::SdkError<
 1110   1003   
            crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
 1111   1004   
            R,
 1112   1005   
        >,
 1113   1006   
    > for Error
 1114   1007   
where
 1115   1008   
    R: Send + Sync + std::fmt::Debug + 'static,
 1116   1009   
{
@@ -2494,2387 +2688,2470 @@
 2514   2407   
        }
 2515   2408   
    }
 2516   2409   
}
 2517   2410   
impl From<crate::operation::put_public_access_block::PutPublicAccessBlockError> for Error {
 2518   2411   
    fn from(err: crate::operation::put_public_access_block::PutPublicAccessBlockError) -> Self {
 2519   2412   
        match err {
 2520   2413   
            crate::operation::put_public_access_block::PutPublicAccessBlockError::Unhandled(inner) => Error::Unhandled(inner),
 2521   2414   
        }
 2522   2415   
    }
 2523   2416   
}
 2524         -
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rename_object::RenameObjectError, R>> for Error
 2525         -
where
 2526         -
    R: Send + Sync + std::fmt::Debug + 'static,
 2527         -
{
 2528         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rename_object::RenameObjectError, R>) -> Self {
 2529         -
        match err {
 2530         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2531         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2532         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2533         -
                source: err.into(),
 2534         -
            }),
 2535         -
        }
 2536         -
    }
 2537         -
}
 2538         -
impl From<crate::operation::rename_object::RenameObjectError> for Error {
 2539         -
    fn from(err: crate::operation::rename_object::RenameObjectError) -> Self {
 2540         -
        match err {
 2541         -
            crate::operation::rename_object::RenameObjectError::IdempotencyParameterMismatch(inner) => Error::IdempotencyParameterMismatch(inner),
 2542         -
            crate::operation::rename_object::RenameObjectError::Unhandled(inner) => Error::Unhandled(inner),
 2543         -
        }
 2544         -
    }
 2545         -
}
 2546   2417   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_object::RestoreObjectError, R>> for Error
 2547   2418   
where
 2548   2419   
    R: Send + Sync + std::fmt::Debug + 'static,
 2549   2420   
{
 2550   2421   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_object::RestoreObjectError, R>) -> Self {
 2551   2422   
        match err {
 2552   2423   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2553   2424   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2554   2425   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2555   2426   
                source: err.into(),
 2556   2427   
            }),
 2557   2428   
        }
 2558   2429   
    }
 2559   2430   
}
 2560   2431   
impl From<crate::operation::restore_object::RestoreObjectError> for Error {
 2561   2432   
    fn from(err: crate::operation::restore_object::RestoreObjectError) -> Self {
 2562   2433   
        match err {
 2563   2434   
            crate::operation::restore_object::RestoreObjectError::ObjectAlreadyInActiveTierError(inner) => {
 2564   2435   
                Error::ObjectAlreadyInActiveTierError(inner)
 2565   2436   
            }
 2566   2437   
            crate::operation::restore_object::RestoreObjectError::Unhandled(inner) => Error::Unhandled(inner),
 2567   2438   
        }
 2568   2439   
    }
 2569   2440   
}
 2570         -
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::select_object_content::SelectObjectContentError, R>> for Error
 2571         -
where
 2572         -
    R: Send + Sync + std::fmt::Debug + 'static,
 2573         -
{
 2574         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::select_object_content::SelectObjectContentError, R>) -> Self {
 2575         -
        match err {
 2576         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2577         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2578         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2579         -
                source: err.into(),
 2580         -
            }),
 2581         -
        }
 2582         -
    }
 2583         -
}
 2584         -
impl From<crate::operation::select_object_content::SelectObjectContentError> for Error {
 2585         -
    fn from(err: crate::operation::select_object_content::SelectObjectContentError) -> Self {
 2586         -
        match err {
 2587         -
            crate::operation::select_object_content::SelectObjectContentError::Unhandled(inner) => Error::Unhandled(inner),
 2588         -
        }
 2589         -
    }
 2590         -
}
 2591         -
impl<R>
 2592         -
    From<
 2593         -
        ::aws_smithy_runtime_api::client::result::SdkError<
 2594         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
 2595         -
            R,
 2596         -
        >,
 2597         -
    > for Error
 2598         -
where
 2599         -
    R: Send + Sync + std::fmt::Debug + 'static,
 2600         -
{
 2601         -
    fn from(
 2602         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
 2603         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
 2604         -
            R,
 2605         -
        >,
 2606         -
    ) -> Self {
 2607         -
        match err {
 2608         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2609         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2610         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2611         -
                source: err.into(),
 2612         -
            }),
 2613         -
        }
 2614         -
    }
 2615         -
}
 2616         -
impl From<crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError> for Error {
 2617         -
    fn from(
 2618         -
        err: crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError,
 2619         -
    ) -> Self {
 2620         -
        match err {
 2621         -
            crate::operation::update_bucket_metadata_inventory_table_configuration::UpdateBucketMetadataInventoryTableConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
 2622         -
        }
 2623         -
    }
 2624         -
}
 2625         -
impl<R>
 2626         -
    From<
 2627         -
        ::aws_smithy_runtime_api::client::result::SdkError<
 2628         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
 2629         -
            R,
 2630         -
        >,
 2631         -
    > for Error
 2632         -
where
 2633         -
    R: Send + Sync + std::fmt::Debug + 'static,
 2634         -
{
 2635         -
    fn from(
 2636         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
 2637         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
 2638         -
            R,
 2639         -
        >,
 2640         -
    ) -> Self {
 2641         -
        match err {
 2642         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2643         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2644         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2645         -
                source: err.into(),
 2646         -
            }),
 2647         -
        }
 2648         -
    }
 2649         -
}
 2650         -
impl From<crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError> for Error {
 2651         -
    fn from(err: crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError) -> Self {
 2652         -
        match err {
 2653         -
            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError::Unhandled(
 2654         -
                inner,
 2655         -
            ) => Error::Unhandled(inner),
 2656         -
        }
 2657         -
    }
 2658         -
}
 2659   2441   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::upload_part::UploadPartError, R>> for Error
 2660   2442   
where
 2661   2443   
    R: Send + Sync + std::fmt::Debug + 'static,
 2662   2444   
{
 2663   2445   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::upload_part::UploadPartError, R>) -> Self {
 2664   2446   
        match err {
 2665   2447   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2666   2448   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2667   2449   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2668   2450   
                source: err.into(),
@@ -2707,2489 +2820,2578 @@
 2727   2509   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
 2728   2510   
    E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
 2729   2511   
{
 2730   2512   
    fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
 2731   2513   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2732   2514   
            meta: ::std::default::Default::default(),
 2733   2515   
            source: err.into(),
 2734   2516   
        })
 2735   2517   
    }
 2736   2518   
}
 2737         -
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::SelectObjectContentEventStreamError, R>> for Error
 2738         -
where
 2739         -
    R: Send + Sync + std::fmt::Debug + 'static,
 2740         -
{
 2741         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::SelectObjectContentEventStreamError, R>) -> Self {
 2742         -
        match err {
 2743         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2744         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2745         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2746         -
                source: err.into(),
 2747         -
            }),
 2748         -
        }
 2749         -
    }
 2750         -
}
 2751         -
impl From<crate::types::error::SelectObjectContentEventStreamError> for Error {
 2752         -
    fn from(err: crate::types::error::SelectObjectContentEventStreamError) -> Self {
 2753         -
        match err {
 2754         -
            crate::types::error::SelectObjectContentEventStreamError::Unhandled(inner) => Error::Unhandled(inner),
 2755         -
        }
 2756         -
    }
 2757         -
}
 2758   2519   
impl ::std::error::Error for Error {
 2759   2520   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 2760   2521   
        match self {
 2761   2522   
            Error::BucketAlreadyExists(inner) => inner.source(),
 2762   2523   
            Error::BucketAlreadyOwnedByYou(inner) => inner.source(),
 2763   2524   
            Error::EncryptionTypeMismatch(inner) => inner.source(),
 2764         -
            Error::IdempotencyParameterMismatch(inner) => inner.source(),
 2765   2525   
            Error::InvalidObjectState(inner) => inner.source(),
 2766   2526   
            Error::InvalidRequest(inner) => inner.source(),
 2767   2527   
            Error::InvalidWriteOffset(inner) => inner.source(),
 2768   2528   
            Error::NoSuchBucket(inner) => inner.source(),
 2769   2529   
            Error::NoSuchKey(inner) => inner.source(),
 2770   2530   
            Error::NoSuchUpload(inner) => inner.source(),
 2771   2531   
            Error::NotFound(inner) => inner.source(),
 2772   2532   
            Error::ObjectAlreadyInActiveTierError(inner) => inner.source(),
 2773   2533   
            Error::ObjectNotInActiveTierError(inner) => inner.source(),
 2774   2534   
            Error::TooManyParts(inner) => inner.source(),
 2775   2535   
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
 2776   2536   
        }
 2777   2537   
    }
 2778   2538   
}
 2779   2539   
impl crate::s3_request_id::RequestIdExt for Error {
 2780   2540   
    fn extended_request_id(&self) -> Option<&str> {
 2781   2541   
        match self {
 2782   2542   
            Self::BucketAlreadyExists(e) => e.extended_request_id(),
 2783   2543   
            Self::BucketAlreadyOwnedByYou(e) => e.extended_request_id(),
 2784   2544   
            Self::EncryptionTypeMismatch(e) => e.extended_request_id(),
 2785         -
            Self::IdempotencyParameterMismatch(e) => e.extended_request_id(),
 2786   2545   
            Self::InvalidObjectState(e) => e.extended_request_id(),
 2787   2546   
            Self::InvalidRequest(e) => e.extended_request_id(),
 2788   2547   
            Self::InvalidWriteOffset(e) => e.extended_request_id(),
 2789   2548   
            Self::NoSuchBucket(e) => e.extended_request_id(),
 2790   2549   
            Self::NoSuchKey(e) => e.extended_request_id(),
 2791   2550   
            Self::NoSuchUpload(e) => e.extended_request_id(),
 2792   2551   
            Self::NotFound(e) => e.extended_request_id(),
 2793   2552   
            Self::ObjectAlreadyInActiveTierError(e) => e.extended_request_id(),
 2794   2553   
            Self::ObjectNotInActiveTierError(e) => e.extended_request_id(),
 2795   2554   
            Self::TooManyParts(e) => e.extended_request_id(),
 2796   2555   
            Self::Unhandled(e) => e.meta.extended_request_id(),
 2797   2556   
        }
 2798   2557   
    }
 2799   2558   
}
 2800   2559   
impl ::aws_types::request_id::RequestId for Error {
 2801   2560   
    fn request_id(&self) -> Option<&str> {
 2802   2561   
        match self {
 2803   2562   
            Self::BucketAlreadyExists(e) => e.request_id(),
 2804   2563   
            Self::BucketAlreadyOwnedByYou(e) => e.request_id(),
 2805   2564   
            Self::EncryptionTypeMismatch(e) => e.request_id(),
 2806         -
            Self::IdempotencyParameterMismatch(e) => e.request_id(),
 2807   2565   
            Self::InvalidObjectState(e) => e.request_id(),
 2808   2566   
            Self::InvalidRequest(e) => e.request_id(),
 2809   2567   
            Self::InvalidWriteOffset(e) => e.request_id(),
 2810   2568   
            Self::NoSuchBucket(e) => e.request_id(),
 2811   2569   
            Self::NoSuchKey(e) => e.request_id(),
 2812   2570   
            Self::NoSuchUpload(e) => e.request_id(),
 2813   2571   
            Self::NotFound(e) => e.request_id(),
 2814   2572   
            Self::ObjectAlreadyInActiveTierError(e) => e.request_id(),
 2815   2573   
            Self::ObjectNotInActiveTierError(e) => e.request_id(),
 2816   2574   
            Self::TooManyParts(e) => e.request_id(),

tmp-codegen-diff/aws-sdk/sdk/s3/src/event_receiver.rs

@@ -1,0 +39,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/*
    3         -
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4         -
 *  SPDX-License-Identifier: Apache-2.0
    5         -
 */
    6         -
    7         -
use aws_smithy_http::event_stream::{InitialMessageType, Receiver};
    8         -
use aws_smithy_runtime_api::client::result::SdkError;
    9         -
use aws_smithy_types::event_stream::{Message, RawMessage};
   10         -
   11         -
#[derive(Debug)]
   12         -
/// Receives unmarshalled events at a time out of an Event Stream.
   13         -
pub struct EventReceiver<T, E> {
   14         -
    inner: Receiver<T, E>,
   15         -
}
   16         -
   17         -
impl<T, E> EventReceiver<T, E> {
   18         -
    pub(crate) fn new(inner: Receiver<T, E>) -> Self {
   19         -
        Self { inner }
   20         -
    }
   21         -
   22         -
    #[allow(dead_code)]
   23         -
    pub(crate) async fn try_recv_initial_request(&mut self) -> Result<Option<Message>, SdkError<E, RawMessage>> {
   24         -
        self.inner.try_recv_initial(InitialMessageType::Request).await
   25         -
    }
   26         -
   27         -
    #[allow(dead_code)]
   28         -
    pub(crate) async fn try_recv_initial_response(&mut self) -> Result<Option<Message>, SdkError<E, RawMessage>> {
   29         -
        self.inner.try_recv_initial(InitialMessageType::Response).await
   30         -
    }
   31         -
   32         -
    /// Asynchronously tries to receive an event from the stream. If the stream has ended, it
   33         -
    /// returns an `Ok(None)`. If there is a transport layer error, it will return
   34         -
    /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned
   35         -
    /// messages.
   36         -
    pub async fn recv(&mut self) -> Result<Option<T>, SdkError<E, RawMessage>> {
   37         -
        self.inner.recv().await
   38         -
    }
   39         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/event_stream_serde.rs

@@ -1,0 +85,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[non_exhaustive]
    3         -
#[derive(Debug)]
    4         -
pub struct SelectObjectContentEventStreamUnmarshaller;
    5         -
    6         -
impl SelectObjectContentEventStreamUnmarshaller {
    7         -
    pub fn new() -> Self {
    8         -
        SelectObjectContentEventStreamUnmarshaller
    9         -
    }
   10         -
}
   11         -
impl ::aws_smithy_eventstream::frame::UnmarshallMessage for SelectObjectContentEventStreamUnmarshaller {
   12         -
    type Output = crate::types::SelectObjectContentEventStream;
   13         -
    type Error = crate::types::error::SelectObjectContentEventStreamError;
   14         -
    fn unmarshall(
   15         -
        &self,
   16         -
        message: &::aws_smithy_types::event_stream::Message,
   17         -
    ) -> std::result::Result<::aws_smithy_eventstream::frame::UnmarshalledMessage<Self::Output, Self::Error>, ::aws_smithy_eventstream::error::Error>
   18         -
    {
   19         -
        let response_headers = ::aws_smithy_eventstream::smithy::parse_response_headers(message)?;
   20         -
        match response_headers.message_type.as_str() {
   21         -
            "event" => match response_headers.smithy_type.as_str() {
   22         -
                "Records" => {
   23         -
                    let mut builder = crate::types::builders::RecordsEventBuilder::default();
   24         -
                    let content_type = response_headers.content_type().unwrap_or_default();
   25         -
                    if content_type != "application/octet-stream" {
   26         -
                        return Err(::aws_smithy_eventstream::error::Error::unmarshalling(format!(
   27         -
                            "expected :content-type to be 'application/octet-stream', but was '{content_type}'"
   28         -
                        )));
   29         -
                    }
   30         -
                    builder = builder.set_payload(Some(::aws_smithy_types::Blob::new(message.payload().as_ref())));
   31         -
                    Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   32         -
                        crate::types::SelectObjectContentEventStream::Records(builder.build()),
   33         -
                    ))
   34         -
                }
   35         -
                "Stats" => {
   36         -
                    let mut builder = crate::types::builders::StatsEventBuilder::default();
   37         -
                    builder = builder.set_details(Some(
   38         -
                        crate::protocol_serde::shape_stats_event::de_details(&message.payload()[..])
   39         -
                            .map_err(|err| ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall details: {err}")))?,
   40         -
                    ));
   41         -
                    Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   42         -
                        crate::types::SelectObjectContentEventStream::Stats(builder.build()),
   43         -
                    ))
   44         -
                }
   45         -
                "Progress" => {
   46         -
                    let mut builder = crate::types::builders::ProgressEventBuilder::default();
   47         -
                    builder = builder.set_details(Some(
   48         -
                        crate::protocol_serde::shape_progress_event::de_details(&message.payload()[..])
   49         -
                            .map_err(|err| ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall details: {err}")))?,
   50         -
                    ));
   51         -
                    Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   52         -
                        crate::types::SelectObjectContentEventStream::Progress(builder.build()),
   53         -
                    ))
   54         -
                }
   55         -
                "Cont" => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   56         -
                    crate::types::SelectObjectContentEventStream::Cont(crate::types::ContinuationEvent::builder().build()),
   57         -
                )),
   58         -
                "End" => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   59         -
                    crate::types::SelectObjectContentEventStream::End(crate::types::EndEvent::builder().build()),
   60         -
                )),
   61         -
                _unknown_variant => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
   62         -
                    crate::types::SelectObjectContentEventStream::Unknown,
   63         -
                )),
   64         -
            },
   65         -
            "exception" => {
   66         -
                let generic = match crate::protocol_serde::parse_event_stream_error_metadata(message.payload()) {
   67         -
                    Ok(builder) => builder.build(),
   68         -
                    Err(err) => {
   69         -
                        return Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
   70         -
                            crate::types::error::SelectObjectContentEventStreamError::unhandled(err),
   71         -
                        ))
   72         -
                    }
   73         -
                };
   74         -
                Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
   75         -
                    crate::types::error::SelectObjectContentEventStreamError::generic(generic),
   76         -
                ))
   77         -
            }
   78         -
            value => {
   79         -
                return Err(::aws_smithy_eventstream::error::Error::unmarshalling(format!(
   80         -
                    "unrecognized :message-type: {value}"
   81         -
                )));
   82         -
            }
   83         -
        }
   84         -
    }
   85         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/idempotency_token.rs

@@ -1,0 +102,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/*
    3         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4         -
 * SPDX-License-Identifier: Apache-2.0
    5         -
 */
    6         -
    7         -
use aws_smithy_types::config_bag::{Storable, StoreReplace};
    8         -
use std::sync::Mutex;
    9         -
   10         -
pub(crate) fn uuid_v4(input: u128) -> String {
   11         -
    let mut out = String::with_capacity(36);
   12         -
    // u4-aligned index into [input]
   13         -
    let mut rnd_idx: u8 = 0;
   14         -
    const HEX_CHARS: &[u8; 16] = b"0123456789abcdef";
   15         -
   16         -
    for str_idx in 0..36 {
   17         -
        if str_idx == 8 || str_idx == 13 || str_idx == 18 || str_idx == 23 {
   18         -
            out.push('-');
   19         -
        // UUID version character
   20         -
        } else if str_idx == 14 {
   21         -
            out.push('4');
   22         -
        } else {
   23         -
            let mut dat: u8 = ((input >> (rnd_idx * 4)) & 0x0F) as u8;
   24         -
            // UUID variant bits
   25         -
            if str_idx == 19 {
   26         -
                dat |= 0b00001000;
   27         -
            }
   28         -
            rnd_idx += 1;
   29         -
            out.push(HEX_CHARS[dat as usize] as char);
   30         -
        }
   31         -
    }
   32         -
    out
   33         -
}
   34         -
   35         -
/// IdempotencyTokenProvider generates idempotency tokens for idempotent API requests
   36         -
///
   37         -
/// Generally, customers will not need to interact with this at all. A sensible default will be
   38         -
/// provided automatically during config construction. However, if you need deterministic behavior
   39         -
/// for testing, two options are available:
   40         -
/// 1. Utilize the From<&'static str>` implementation to hard code an idempotency token
   41         -
/// 2. Seed the token provider with [`IdempotencyTokenProvider::with_seed`](IdempotencyTokenProvider::with_seed)
   42         -
#[derive(Debug)]
   43         -
pub struct IdempotencyTokenProvider {
   44         -
    inner: Inner,
   45         -
}
   46         -
   47         -
#[derive(Debug)]
   48         -
enum Inner {
   49         -
    Static(&'static str),
   50         -
    Random(Mutex<fastrand::Rng>),
   51         -
}
   52         -
   53         -
pub fn default_provider() -> IdempotencyTokenProvider {
   54         -
    IdempotencyTokenProvider::random()
   55         -
}
   56         -
   57         -
impl From<&'static str> for IdempotencyTokenProvider {
   58         -
    fn from(token: &'static str) -> Self {
   59         -
        Self::fixed(token)
   60         -
    }
   61         -
}
   62         -
   63         -
impl Storable for IdempotencyTokenProvider {
   64         -
    type Storer = StoreReplace<IdempotencyTokenProvider>;
   65         -
}
   66         -
   67         -
impl IdempotencyTokenProvider {
   68         -
    pub fn make_idempotency_token(&self) -> String {
   69         -
        match &self.inner {
   70         -
            Inner::Static(token) => token.to_string(),
   71         -
            Inner::Random(rng) => {
   72         -
                let input: u128 = rng.lock().unwrap().u128(..);
   73         -
                uuid_v4(input)
   74         -
            }
   75         -
        }
   76         -
    }
   77         -
   78         -
    pub fn with_seed(seed: u64) -> Self {
   79         -
        Self {
   80         -
            inner: Inner::Random(Mutex::new(fastrand::Rng::with_seed(seed))),
   81         -
        }
   82         -
    }
   83         -
   84         -
    pub fn random() -> Self {
   85         -
        Self {
   86         -
            inner: Inner::Random(Mutex::new(fastrand::Rng::new())),
   87         -
        }
   88         -
    }
   89         -
   90         -
    pub fn fixed(token: &'static str) -> Self {
   91         -
        Self { inner: Inner::Static(token) }
   92         -
    }
   93         -
}
   94         -
   95         -
impl Clone for IdempotencyTokenProvider {
   96         -
    fn clone(&self) -> Self {
   97         -
        match &self.inner {
   98         -
            Inner::Static(token) => IdempotencyTokenProvider::fixed(token),
   99         -
            Inner::Random(_) => IdempotencyTokenProvider::random(),
  100         -
        }
  101         -
    }
  102         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/lib.rs

@@ -174,174 +248,240 @@
  194    194   
pub mod operation;
  195    195   
  196    196   
/// Primitives such as `Blob` or `DateTime` used by other types.
  197    197   
pub mod primitives;
  198    198   
  199    199   
/// Data structures used by operation inputs/outputs.
  200    200   
pub mod types;
  201    201   
  202    202   
pub(crate) mod aws_chunked;
  203    203   
  204         -
pub(crate) mod client_idempotency_token;
  205         -
  206         -
mod event_receiver;
  207         -
  208    204   
pub(crate) mod http_request_checksum;
  209    205   
  210    206   
pub(crate) mod http_response_checksum;
  211    207   
  212         -
mod idempotency_token;
  213         -
  214    208   
pub mod presigning;
  215    209   
  216    210   
pub(crate) mod presigning_interceptors;
  217    211   
  218    212   
pub(crate) mod protocol_serde;
  219    213   
  220    214   
mod rest_xml_unwrapped_errors;
  221    215   
  222    216   
mod s3_expires_interceptor;
  223    217   
  224    218   
mod s3_express;
  225    219   
  226    220   
mod s3_request_id;
  227    221   
  228    222   
mod sdk_feature_tracker;
  229    223   
  230    224   
mod serialization_settings;
  231    225   
  232    226   
pub(crate) mod endpoint_auth;
  233    227   
  234    228   
mod endpoint_lib;
  235    229   
  236    230   
mod lens;
  237    231   
  238    232   
mod serde_util;
  239    233   
  240    234   
/// Supporting types for waiters.
  241    235   
///
  242    236   
/// Note: to use waiters, import the [`Waiters`](crate::client::Waiters) trait, which adds methods prefixed with `wait_until` to the client.
  243    237   
pub mod waiters;
  244    238   
  245         -
mod event_stream_serde;
  246         -
  247    239   
#[doc(inline)]
  248    240   
pub use client::Client;

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

@@ -1,1 +83,77 @@
    8      8   
    9      9   
/// Types for the `CompleteMultipartUpload` operation.
   10     10   
pub mod complete_multipart_upload;
   11     11   
   12     12   
/// Types for the `CopyObject` operation.
   13     13   
pub mod copy_object;
   14     14   
   15     15   
/// Types for the `CreateBucket` operation.
   16     16   
pub mod create_bucket;
   17     17   
   18         -
/// Types for the `CreateBucketMetadataConfiguration` operation.
   19         -
pub mod create_bucket_metadata_configuration;
   20         -
   21     18   
/// Types for the `CreateBucketMetadataTableConfiguration` operation.
   22     19   
pub mod create_bucket_metadata_table_configuration;
   23     20   
   24     21   
/// Types for the `CreateMultipartUpload` operation.
   25     22   
pub mod create_multipart_upload;
   26     23   
   27     24   
/// Types for the `CreateSession` operation.
   28     25   
pub mod create_session;
   29     26   
   30     27   
/// Types for the `DeleteBucket` operation.
   31     28   
pub mod delete_bucket;
   32     29   
   33     30   
/// Types for the `DeleteBucketAnalyticsConfiguration` operation.
   34     31   
pub mod delete_bucket_analytics_configuration;
   35     32   
   36     33   
/// Types for the `DeleteBucketCors` operation.
   37     34   
pub mod delete_bucket_cors;
   38     35   
   39     36   
/// Types for the `DeleteBucketEncryption` operation.
   40     37   
pub mod delete_bucket_encryption;
   41     38   
   42     39   
/// Types for the `DeleteBucketIntelligentTieringConfiguration` operation.
   43     40   
pub mod delete_bucket_intelligent_tiering_configuration;
   44     41   
   45     42   
/// Types for the `DeleteBucketInventoryConfiguration` operation.
   46     43   
pub mod delete_bucket_inventory_configuration;
   47     44   
   48     45   
/// Types for the `DeleteBucketLifecycle` operation.
   49     46   
pub mod delete_bucket_lifecycle;
   50     47   
   51         -
/// Types for the `DeleteBucketMetadataConfiguration` operation.
   52         -
pub mod delete_bucket_metadata_configuration;
   53         -
   54     48   
/// Types for the `DeleteBucketMetadataTableConfiguration` operation.
   55     49   
pub mod delete_bucket_metadata_table_configuration;
   56     50   
   57     51   
/// Types for the `DeleteBucketMetricsConfiguration` operation.
   58     52   
pub mod delete_bucket_metrics_configuration;
   59     53   
   60     54   
/// Types for the `DeleteBucketOwnershipControls` operation.
   61     55   
pub mod delete_bucket_ownership_controls;
   62     56   
   63     57   
/// Types for the `DeleteBucketPolicy` operation.
@@ -87,81 +149,140 @@
  107    101   
  108    102   
/// Types for the `GetBucketLifecycleConfiguration` operation.
  109    103   
pub mod get_bucket_lifecycle_configuration;
  110    104   
  111    105   
/// Types for the `GetBucketLocation` operation.
  112    106   
pub mod get_bucket_location;
  113    107   
  114    108   
/// Types for the `GetBucketLogging` operation.
  115    109   
pub mod get_bucket_logging;
  116    110   
  117         -
/// Types for the `GetBucketMetadataConfiguration` operation.
  118         -
pub mod get_bucket_metadata_configuration;
  119         -
  120    111   
/// Types for the `GetBucketMetadataTableConfiguration` operation.
  121    112   
pub mod get_bucket_metadata_table_configuration;
  122    113   
  123    114   
/// Types for the `GetBucketMetricsConfiguration` operation.
  124    115   
pub mod get_bucket_metrics_configuration;
  125    116   
  126    117   
/// Types for the `GetBucketNotificationConfiguration` operation.
  127    118   
pub mod get_bucket_notification_configuration;
  128    119   
  129    120   
/// Types for the `GetBucketOwnershipControls` operation.
@@ -264,255 +316,295 @@
  284    275   
  285    276   
/// Types for the `PutObjectRetention` operation.
  286    277   
pub mod put_object_retention;
  287    278   
  288    279   
/// Types for the `PutObjectTagging` operation.
  289    280   
pub mod put_object_tagging;
  290    281   
  291    282   
/// Types for the `PutPublicAccessBlock` operation.
  292    283   
pub mod put_public_access_block;
  293    284   
  294         -
/// Types for the `RenameObject` operation.
  295         -
pub mod rename_object;
  296         -
  297    285   
/// Types for the `RestoreObject` operation.
  298    286   
pub mod restore_object;
  299    287   
  300         -
/// Types for the `SelectObjectContent` operation.
  301         -
pub mod select_object_content;
  302         -
  303         -
/// Types for the `UpdateBucketMetadataInventoryTableConfiguration` operation.
  304         -
pub mod update_bucket_metadata_inventory_table_configuration;
  305         -
  306         -
/// Types for the `UpdateBucketMetadataJournalTableConfiguration` operation.
  307         -
pub mod update_bucket_metadata_journal_table_configuration;
  308         -
  309    288   
/// Types for the `UploadPart` operation.
  310    289   
pub mod upload_part;
  311    290   
  312    291   
/// Types for the `UploadPartCopy` operation.
  313    292   
pub mod upload_part_copy;
  314    293   
  315    294   
/// Types for the `WriteGetObjectResponse` operation.
  316    295   
pub mod write_get_object_response;

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

@@ -2,2 +65,62 @@
   22     22   
    /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
   23     23   
    pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
   24     24   
    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
   25     25   
    pub checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
   26     26   
    /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This will only be present if the object was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
   27     27   
    pub checksum_sha1: ::std::option::Option<::std::string::String>,
   28     28   
    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
   29     29   
    pub checksum_sha256: ::std::option::Option<::std::string::String>,
   30     30   
    /// <p>The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum type that was specified during the <code>CreateMultipartUpload</code> request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
   31     31   
    pub checksum_type: ::std::option::Option<crate::types::ChecksumType>,
   32         -
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3.</p><note>
   33         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
   34         -
    /// </note>
   35         -
    /// <p></p>
          32  +
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
   36     33   
    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
   37     34   
    /// <p>Version ID of the newly created object, in case the bucket has versioning turned on.</p><note>
   38     35   
    /// <p>This functionality is not supported for directory buckets.</p>
   39     36   
    /// </note>
   40     37   
    pub version_id: ::std::option::Option<::std::string::String>,
   41     38   
    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
   42     39   
    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
   43     40   
    /// <p>Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
   44     41   
    pub bucket_key_enabled: ::std::option::Option<bool>,
   45     42   
    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
@@ -71,68 +134,128 @@
   91     88   
        self.checksum_sha1.as_deref()
   92     89   
    }
   93     90   
    /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This will only be present if the object was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
   94     91   
    pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
   95     92   
        self.checksum_sha256.as_deref()
   96     93   
    }
   97     94   
    /// <p>The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum type that was specified during the <code>CreateMultipartUpload</code> request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
   98     95   
    pub fn checksum_type(&self) -> ::std::option::Option<&crate::types::ChecksumType> {
   99     96   
        self.checksum_type.as_ref()
  100     97   
    }
  101         -
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3.</p><note>
  102         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  103         -
    /// </note>
  104         -
    /// <p></p>
          98  +
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
  105     99   
    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
  106    100   
        self.server_side_encryption.as_ref()
  107    101   
    }
  108    102   
    /// <p>Version ID of the newly created object, in case the bucket has versioning turned on.</p><note>
  109    103   
    /// <p>This functionality is not supported for directory buckets.</p>
  110    104   
    /// </note>
  111    105   
    pub fn version_id(&self) -> ::std::option::Option<&str> {
  112    106   
        self.version_id.as_deref()
  113    107   
    }
  114    108   
    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
@@ -330,324 +409,394 @@
  350    344   
    }
  351    345   
    /// <p>The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum type that was specified during the <code>CreateMultipartUpload</code> request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
  352    346   
    pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
  353    347   
        self.checksum_type = input;
  354    348   
        self
  355    349   
    }
  356    350   
    /// <p>The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum type that was specified during the <code>CreateMultipartUpload</code> request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
  357    351   
    pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
  358    352   
        &self.checksum_type
  359    353   
    }
  360         -
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3.</p><note>
  361         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  362         -
    /// </note>
  363         -
    /// <p></p>
         354  +
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
  364    355   
    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
  365    356   
        self.server_side_encryption = ::std::option::Option::Some(input);
  366    357   
        self
  367    358   
    }
  368         -
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3.</p><note>
  369         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  370         -
    /// </note>
  371         -
    /// <p></p>
         359  +
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
  372    360   
    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
  373    361   
        self.server_side_encryption = input;
  374    362   
        self
  375    363   
    }
  376         -
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3.</p><note>
  377         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  378         -
    /// </note>
  379         -
    /// <p></p>
         364  +
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
  380    365   
    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
  381    366   
        &self.server_side_encryption
  382    367   
    }
  383    368   
    /// <p>Version ID of the newly created object, in case the bucket has versioning turned on.</p><note>
  384    369   
    /// <p>This functionality is not supported for directory buckets.</p>
  385    370   
    /// </note>
  386    371   
    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  387    372   
        self.version_id = ::std::option::Option::Some(input.into());
  388    373   
        self
  389    374   
    }

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

@@ -178,178 +239,237 @@
  198    198   
    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
  199    199   
    /// <li>
  200    200   
    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
  201    201   
    /// </ul>
  202    202   
    /// <p><b>Directory buckets </b></p>
  203    203   
    /// <ul>
  204    204   
    /// <li>
  205    205   
    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
  206    206   
    /// <li>
  207    207   
    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
  208         -
    /// <li>
  209         -
    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
  210    208   
    /// </ul>
  211    209   
    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
  212    210   
    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
  213    211   
    /// <ul>
  214    212   
    /// <li>
  215    213   
    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
  216    214   
    /// <li>
  217    215   
    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
  218    216   
    /// </ul>
  219    217   
    /// </note>
@@ -537,535 +598,594 @@
  557    555   
    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
  558    556   
    /// <li>
  559    557   
    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
  560    558   
    /// </ul>
  561    559   
    /// <p><b>Directory buckets </b></p>
  562    560   
    /// <ul>
  563    561   
    /// <li>
  564    562   
    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
  565    563   
    /// <li>
  566    564   
    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
  567         -
    /// <li>
  568         -
    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
  569    565   
    /// </ul>
  570    566   
    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
  571    567   
        self.server_side_encryption.as_ref()
  572    568   
    }
  573    569   
    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
  574    570   
    /// <ul>
  575    571   
    /// <li>
  576    572   
    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
  577    573   
    /// <li>
  578    574   
    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
@@ -1547,1543 +1654,1644 @@
 1567   1563   
    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
 1568   1564   
    /// <li>
 1569   1565   
    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
 1570   1566   
    /// </ul>
 1571   1567   
    /// <p><b>Directory buckets </b></p>
 1572   1568   
    /// <ul>
 1573   1569   
    /// <li>
 1574   1570   
    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
 1575   1571   
    /// <li>
 1576   1572   
    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
 1577         -
    /// <li>
 1578         -
    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
 1579   1573   
    /// </ul>
 1580   1574   
    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
 1581   1575   
        self.server_side_encryption = ::std::option::Option::Some(input);
 1582   1576   
        self
 1583   1577   
    }
 1584   1578   
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
 1585   1579   
    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
 1586   1580   
    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
 1587   1581   
    /// <p><b>General purpose buckets </b></p>
 1588   1582   
    /// <ul>
 1589   1583   
    /// <li>
 1590   1584   
    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
 1591   1585   
    /// <li>
 1592   1586   
    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
 1593   1587   
    /// </ul>
 1594   1588   
    /// <p><b>Directory buckets </b></p>
 1595   1589   
    /// <ul>
 1596   1590   
    /// <li>
 1597   1591   
    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
 1598   1592   
    /// <li>
 1599   1593   
    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
 1600         -
    /// <li>
 1601         -
    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
 1602   1594   
    /// </ul>
 1603   1595   
    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
 1604   1596   
        self.server_side_encryption = input;
 1605   1597   
        self
 1606   1598   
    }
 1607   1599   
    /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
 1608   1600   
    /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
 1609   1601   
    /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
 1610   1602   
    /// <p><b>General purpose buckets </b></p>
 1611   1603   
    /// <ul>
 1612   1604   
    /// <li>
 1613   1605   
    /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
 1614   1606   
    /// <li>
 1615   1607   
    /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
 1616   1608   
    /// </ul>
 1617   1609   
    /// <p><b>Directory buckets </b></p>
 1618   1610   
    /// <ul>
 1619   1611   
    /// <li>
 1620   1612   
    /// <p>For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p></li>
 1621   1613   
    /// <li>
 1622   1614   
    /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
 1623         -
    /// <li>
 1624         -
    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
 1625   1615   
    /// </ul>
 1626   1616   
    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
 1627   1617   
        &self.server_side_encryption
 1628   1618   
    }
 1629   1619   
    /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
 1630   1620   
    /// <ul>
 1631   1621   
    /// <li>
 1632   1622   
    /// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
 1633   1623   
    /// <li>
 1634   1624   
    /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>

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

@@ -1,1 +100,96 @@
   10     10   
    /// </note>
   11     11   
    pub expiration: ::std::option::Option<::std::string::String>,
   12     12   
    /// <p>Version ID of the source object that was copied.</p><note>
   13     13   
    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
   14     14   
    /// </note>
   15     15   
    pub copy_source_version_id: ::std::option::Option<::std::string::String>,
   16     16   
    /// <p>Version ID of the newly created copy.</p><note>
   17     17   
    /// <p>This functionality is not supported for directory buckets.</p>
   18     18   
    /// </note>
   19     19   
    pub version_id: ::std::option::Option<::std::string::String>,
   20         -
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
   21         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
   22         -
    /// </note>
          20  +
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
   23     21   
    pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
   24     22   
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
   25     23   
    /// <p>This functionality is not supported for directory buckets.</p>
   26     24   
    /// </note>
   27     25   
    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
   28     26   
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
   29     27   
    /// <p>This functionality is not supported for directory buckets.</p>
   30     28   
    /// </note>
   31     29   
    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
   32     30   
    /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
   33     31   
    pub ssekms_key_id: ::std::option::Option<::std::string::String>,
   34     32   
    /// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
   35     33   
    pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
   36     34   
    /// <p>Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
   37     35   
    pub bucket_key_enabled: ::std::option::Option<bool>,
   38     36   
    /// <p>If present, indicates that the requester was successfully charged for the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html">Using Requester Pays buckets for storage transfers and usage</a> in the <i>Amazon Simple Storage Service user guide</i>.</p><note>
   39     37   
    /// <p>This functionality is not supported for directory buckets.</p>
   40     38   
    /// </note>
   41     39   
    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
   42     40   
    _extended_request_id: Option<String>,
   43     41   
    _request_id: Option<String>,
   44     42   
}
   45     43   
impl CopyObjectOutput {
   46     44   
    /// <p>Container for all response elements.</p>
   47     45   
    pub fn copy_object_result(&self) -> ::std::option::Option<&crate::types::CopyObjectResult> {
   48     46   
        self.copy_object_result.as_ref()
   49     47   
    }
   50     48   
    /// <p>If the object expiration is configured, the response includes this header.</p><note>
   51     49   
    /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
   52     50   
    /// </note>
   53     51   
    pub fn expiration(&self) -> ::std::option::Option<&str> {
   54     52   
        self.expiration.as_deref()
   55     53   
    }
   56     54   
    /// <p>Version ID of the source object that was copied.</p><note>
   57     55   
    /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
   58     56   
    /// </note>
   59     57   
    pub fn copy_source_version_id(&self) -> ::std::option::Option<&str> {
   60     58   
        self.copy_source_version_id.as_deref()
   61     59   
    }
   62     60   
    /// <p>Version ID of the newly created copy.</p><note>
   63     61   
    /// <p>This functionality is not supported for directory buckets.</p>
   64     62   
    /// </note>
   65     63   
    pub fn version_id(&self) -> ::std::option::Option<&str> {
   66     64   
        self.version_id.as_deref()
   67     65   
    }
   68         -
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
   69         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
   70         -
    /// </note>
          66  +
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
   71     67   
    pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
   72     68   
        self.server_side_encryption.as_ref()
   73     69   
    }
   74     70   
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
   75     71   
    /// <p>This functionality is not supported for directory buckets.</p>
   76     72   
    /// </note>
   77     73   
    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
   78     74   
        self.sse_customer_algorithm.as_deref()
   79     75   
    }
   80     76   
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
@@ -204,200 +280,270 @@
  224    220   
    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  225    221   
        self.version_id = input;
  226    222   
        self
  227    223   
    }
  228    224   
    /// <p>Version ID of the newly created copy.</p><note>
  229    225   
    /// <p>This functionality is not supported for directory buckets.</p>
  230    226   
    /// </note>
  231    227   
    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
  232    228   
        &self.version_id
  233    229   
    }
  234         -
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
  235         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  236         -
    /// </note>
         230  +
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
  237    231   
    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
  238    232   
        self.server_side_encryption = ::std::option::Option::Some(input);
  239    233   
        self
  240    234   
    }
  241         -
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
  242         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  243         -
    /// </note>
         235  +
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
  244    236   
    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
  245    237   
        self.server_side_encryption = input;
  246    238   
        self
  247    239   
    }
  248         -
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p><note>
  249         -
    /// <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p>
  250         -
    /// </note>
         240  +
    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
  251    241   
    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
  252    242   
        &self.server_side_encryption
  253    243   
    }
  254    244   
    /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
  255    245   
    /// <p>This functionality is not supported for directory buckets.</p>
  256    246   
    /// </note>
  257    247   
    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  258    248   
        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
  259    249   
        self
  260    250   
    }