AWS SDK

AWS SDK

rev. 354ff73b046b4e419d8c1c81c59e2914a72dfb77 (ignoring whitespace)

Files changed:

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

@@ -6,6 +66,71 @@
   26     26   
    tracing::debug!(endpoint_params = ?endpoint_params, "resolving endpoint for auth scheme selection");
   27     27   
   28     28   
    let endpoint = runtime_components.endpoint_resolver().resolve_endpoint(endpoint_params).await?;
   29     29   
   30     30   
    let mut endpoint_auth_scheme_ids = Vec::new();
   31     31   
   32     32   
    // Note that we're not constructing the `properties` for `endpoint_auth_schemes` here—only collecting
   33     33   
    // auth scheme IDs but not properties. This is because, at this stage, we're only determining which auth schemes will be candidates.
   34     34   
    // Any `authSchemes` list properties that influence the signing context will be extracted later
   35     35   
    // in `AuthSchemeEndpointConfig`, and passed by the orchestrator to the signer's `sign_http_request` method.
   36         -
    if let Some(aws_smithy_types::Document::Array(endpoint_auth_schemes)) = endpoint.properties().get("authSchemes") {
          36  +
    let typed_schemes = endpoint.auth_schemes();
          37  +
    if !typed_schemes.is_empty() {
          38  +
        for scheme in typed_schemes {
          39  +
            endpoint_auth_scheme_ids.push(AuthSchemeId::from(Cow::Owned(scheme.name().to_owned())));
          40  +
        }
          41  +
    } else if let Some(aws_smithy_types::Document::Array(endpoint_auth_schemes)) = endpoint.properties().get("authSchemes") {
   37     42   
        for endpoint_auth_scheme in endpoint_auth_schemes {
   38     43   
            let scheme_id_str = endpoint_auth_scheme
   39     44   
                .as_object()
   40     45   
                .and_then(|object| object.get("name"))
   41     46   
                .and_then(aws_smithy_types::Document::as_string);
   42     47   
            if let Some(scheme_id_str) = scheme_id_str {
   43     48   
                endpoint_auth_scheme_ids.push(AuthSchemeId::from(Cow::Owned(scheme_id_str.to_owned())));
   44     49   
            }
   45     50   
        }
   46     51   
    }

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

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

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

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}

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

@@ -889,889 +928,935 @@
  909    909   
  910    910   
pub(crate) mod utils {
  911    911   
    use aws_smithy_types::{config_bag::ConfigBag, Document};
  912    912   
  913    913   
    pub(crate) fn for_s3_express(cfg: &ConfigBag) -> bool {
  914    914   
        // logic borrowed from aws_smithy_runtime::client::orchestrator::auth::extract_endpoint_auth_scheme_config
  915    915   
        let endpoint = cfg
  916    916   
            .load::<crate::config::endpoint::Endpoint>()
  917    917   
            .expect("endpoint added to config bag by endpoint orchestrator");
  918    918   
         919  +
        let typed_schemes = endpoint.auth_schemes();
         920  +
        if !typed_schemes.is_empty() {
         921  +
            return typed_schemes
         922  +
                .iter()
         923  +
                .any(|scheme| scheme.name() == crate::s3_express::auth::SCHEME_ID.as_str());
         924  +
        }
         925  +
  919    926   
        let auth_schemes = match endpoint.properties().get("authSchemes") {
  920    927   
            Some(Document::Array(schemes)) => schemes,
  921    928   
            _ => return false,
  922    929   
        };
  923    930   
        auth_schemes.iter().any(|doc| {
  924    931   
            let config_scheme_id = doc.as_object().and_then(|object| object.get("name")).and_then(Document::as_string);
  925    932   
            config_scheme_id == Some(crate::s3_express::auth::SCHEME_ID.as_str())
  926    933   
        })
  927    934   
    }
  928    935   
}

tmp-codegen-diff/aws-sdk/sdk/s3control/Cargo.toml

@@ -1,1 +155,155 @@
   14     14   
protocol = "aws.protocols#restXml"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.5"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.11.1"
          45  +
version = "1.11.2"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.12.0"
          50  +
version = "1.12.1"
   51     51   
   52     52   
[dependencies.aws-smithy-types]
   53     53   
path = "../aws-smithy-types"
   54     54   
features = ["http-body-1-x"]
   55         -
version = "1.4.7"
          55  +
version = "1.4.8"
   56     56   
   57     57   
[dependencies.aws-smithy-xml]
   58     58   
path = "../aws-smithy-xml"
   59     59   
version = "0.60.15"
   60     60   
   61     61   
[dependencies.aws-types]
   62     62   
path = "../aws-types"
   63     63   
version = "1.3.15"
   64     64   
   65     65   
[dependencies.fastrand]
   66     66   
version = "2.0.0"
   67     67   
   68     68   
[dependencies.http]
   69     69   
version = "0.2.9"
   70     70   
   71     71   
[dependencies.http-1x]
   72     72   
version = "1"
   73     73   
package = "http"
   74     74   
   75     75   
[dependencies.md-5]
   76     76   
version = "0.11.0"
   77     77   
   78     78   
[dependencies.regex-lite]
   79     79   
version = "0.1.5"
   80     80   
   81     81   
[dependencies.tracing]
   82     82   
version = "0.1"
   83     83   
   84     84   
[dependencies.url]
   85     85   
version = "2.3.1"
   86     86   
[dev-dependencies.aws-config]
   87     87   
path = "../aws-config"
   88     88   
version = "1.8.16"
   89     89   
   90     90   
[dev-dependencies.aws-credential-types]
   91     91   
path = "../aws-credential-types"
   92     92   
features = ["test-util"]
   93     93   
version = "1.2.14"
   94     94   
   95     95   
[dev-dependencies.aws-runtime]
   96     96   
path = "../aws-runtime"
   97     97   
features = ["test-util"]
   98         -
version = "1.7.3"
          98  +
version = "1.7.4"
   99     99   
  100    100   
[dev-dependencies.aws-smithy-async]
  101    101   
path = "../aws-smithy-async"
  102    102   
features = ["test-util"]
  103    103   
version = "1.2.14"
  104    104   
  105    105   
[dev-dependencies.aws-smithy-http-client]
  106    106   
path = "../aws-smithy-http-client"
  107    107   
features = ["test-util", "wire-mock"]
  108    108   
version = "1.1.12"
  109    109   
  110    110   
[dev-dependencies.aws-smithy-protocol-test]
  111    111   
path = "../aws-smithy-protocol-test"
  112    112   
version = "0.63.14"
  113    113   
  114    114   
[dev-dependencies.aws-smithy-runtime]
  115    115   
path = "../aws-smithy-runtime"
  116    116   
features = ["test-util"]
  117         -
version = "1.11.1"
         117  +
version = "1.11.2"
  118    118   
  119    119   
[dev-dependencies.aws-smithy-runtime-api]
  120    120   
path = "../aws-smithy-runtime-api"
  121    121   
features = ["test-util"]
  122         -
version = "1.12.0"
         122  +
version = "1.12.1"
  123    123   
  124    124   
[dev-dependencies.aws-smithy-types]
  125    125   
path = "../aws-smithy-types"
  126    126   
features = ["http-body-1-x", "test-util"]
  127         -
version = "1.4.7"
         127  +
version = "1.4.8"
  128    128   
  129    129   
[dev-dependencies.futures-util]
  130    130   
version = "0.3.25"
  131    131   
features = ["alloc"]
  132    132   
default-features = false
  133    133   
  134    134   
[dev-dependencies.proptest]
  135    135   
version = "1"
  136    136   
  137    137   
[dev-dependencies.serde_json]

tmp-codegen-diff/aws-sdk/sdk/s3control/src/config/endpoint/internals.rs

@@ -76,76 +238,238 @@
   96     96   
                                    out.push_str("://");
   97     97   
                                    #[allow(clippy::needless_borrow)]
   98     98   
                                    out.push_str(&url.authority());
   99     99   
                                    #[allow(clippy::needless_borrow)]
  100    100   
                                    out.push_str(&url.path());
  101    101   
                                    out
  102    102   
                                })
  103    103   
                                .property(
  104    104   
                                    "authSchemes",
  105    105   
                                    vec![::aws_smithy_types::Document::from({
  106         -
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         106  +
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  107    107   
                                        out.insert("disableDoubleEncoding".to_string(), true.into());
  108    108   
                                        out.insert("name".to_string(), "sigv4".to_string().into());
  109    109   
                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
  110    110   
                                        out.insert("signingRegion".to_string(), region.to_owned().into());
  111    111   
                                        out
  112    112   
                                    })],
  113    113   
                                )
  114    114   
                                .build());
  115    115   
                        }
  116    116   
                    }
  117    117   
                    if (*use_fips) == (true) {
  118    118   
                        if (*use_dual_stack) == (true) {
  119    119   
                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  120    120   
                                .url({
  121    121   
                                    let mut out = String::new();
  122    122   
                                    out.push_str("https://s3-outposts-fips.");
  123    123   
                                    #[allow(clippy::needless_borrow)]
  124    124   
                                    out.push_str(&region.as_ref() as &str);
  125    125   
                                    out.push('.');
  126    126   
                                    #[allow(clippy::needless_borrow)]
  127    127   
                                    out.push_str(&partition_result.dual_stack_dns_suffix());
  128    128   
                                    out
  129    129   
                                })
  130    130   
                                .property(
  131    131   
                                    "authSchemes",
  132    132   
                                    vec![::aws_smithy_types::Document::from({
  133         -
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         133  +
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  134    134   
                                        out.insert("disableDoubleEncoding".to_string(), true.into());
  135    135   
                                        out.insert("name".to_string(), "sigv4".to_string().into());
  136    136   
                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
  137    137   
                                        out.insert("signingRegion".to_string(), region.to_owned().into());
  138    138   
                                        out
  139    139   
                                    })],
  140    140   
                                )
  141    141   
                                .build());
  142    142   
                        }
  143    143   
                    }
  144    144   
                    if (*use_fips) == (true) {
  145    145   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  146    146   
                            .url({
  147    147   
                                let mut out = String::new();
  148    148   
                                out.push_str("https://s3-outposts-fips.");
  149    149   
                                #[allow(clippy::needless_borrow)]
  150    150   
                                out.push_str(&region.as_ref() as &str);
  151    151   
                                out.push('.');
  152    152   
                                #[allow(clippy::needless_borrow)]
  153    153   
                                out.push_str(&partition_result.dns_suffix());
  154    154   
                                out
  155    155   
                            })
  156    156   
                            .property(
  157    157   
                                "authSchemes",
  158    158   
                                vec![::aws_smithy_types::Document::from({
  159         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         159  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  160    160   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  161    161   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
  162    162   
                                    out.insert("signingName".to_string(), "s3-outposts".to_string().into());
  163    163   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  164    164   
                                    out
  165    165   
                                })],
  166    166   
                            )
  167    167   
                            .build());
  168    168   
                    }
  169    169   
                    if (*use_dual_stack) == (true) {
  170    170   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  171    171   
                            .url({
  172    172   
                                let mut out = String::new();
  173    173   
                                out.push_str("https://s3-outposts.");
  174    174   
                                #[allow(clippy::needless_borrow)]
  175    175   
                                out.push_str(&region.as_ref() as &str);
  176    176   
                                out.push('.');
  177    177   
                                #[allow(clippy::needless_borrow)]
  178    178   
                                out.push_str(&partition_result.dual_stack_dns_suffix());
  179    179   
                                out
  180    180   
                            })
  181    181   
                            .property(
  182    182   
                                "authSchemes",
  183    183   
                                vec![::aws_smithy_types::Document::from({
  184         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         184  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  185    185   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  186    186   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
  187    187   
                                    out.insert("signingName".to_string(), "s3-outposts".to_string().into());
  188    188   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  189    189   
                                    out
  190    190   
                                })],
  191    191   
                            )
  192    192   
                            .build());
  193    193   
                    }
  194    194   
                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  195    195   
                        .url({
  196    196   
                            let mut out = String::new();
  197    197   
                            out.push_str("https://s3-outposts.");
  198    198   
                            #[allow(clippy::needless_borrow)]
  199    199   
                            out.push_str(&region.as_ref() as &str);
  200    200   
                            out.push('.');
  201    201   
                            #[allow(clippy::needless_borrow)]
  202    202   
                            out.push_str(&partition_result.dns_suffix());
  203    203   
                            out
  204    204   
                        })
  205    205   
                        .property(
  206    206   
                            "authSchemes",
  207    207   
                            vec![::aws_smithy_types::Document::from({
  208         -
                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         208  +
                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  209    209   
                                out.insert("disableDoubleEncoding".to_string(), true.into());
  210    210   
                                out.insert("name".to_string(), "sigv4".to_string().into());
  211    211   
                                out.insert("signingName".to_string(), "s3-outposts".to_string().into());
  212    212   
                                out.insert("signingRegion".to_string(), region.to_owned().into());
  213    213   
                                out
  214    214   
                            })],
  215    215   
                        )
  216    216   
                        .build());
  217    217   
                }
  218    218   
                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
@@ -255,255 +365,366 @@
  275    275   
                                                #[allow(clippy::needless_borrow)]
  276    276   
                                                out.push_str(&url.scheme());
  277    277   
                                                out.push_str("://");
  278    278   
                                                #[allow(clippy::needless_borrow)]
  279    279   
                                                out.push_str(&url.authority());
  280    280   
                                                out
  281    281   
                                            })
  282    282   
                                            .property(
  283    283   
                                                "authSchemes",
  284    284   
                                                vec![::aws_smithy_types::Document::from({
  285         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         285  +
                                                    let mut out =
         286  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  286    287   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  287    288   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  288    289   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  289    290   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  290    291   
                                                    out
  291    292   
                                                })],
  292    293   
                                            )
  293    294   
                                            .build());
  294    295   
                                    }
  295    296   
                                }
  296    297   
                                if (*use_fips) == (true) {
  297    298   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  298    299   
                                        .url({
  299    300   
                                            let mut out = String::new();
  300    301   
                                            out.push_str("https://s3express-control-fips.");
  301    302   
                                            #[allow(clippy::needless_borrow)]
  302    303   
                                            out.push_str(&region.as_ref() as &str);
  303    304   
                                            out.push('.');
  304    305   
                                            #[allow(clippy::needless_borrow)]
  305    306   
                                            out.push_str(&partition_result.dns_suffix());
  306    307   
                                            out
  307    308   
                                        })
  308    309   
                                        .property(
  309    310   
                                            "authSchemes",
  310    311   
                                            vec![::aws_smithy_types::Document::from({
  311         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         312  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  312    313   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  313    314   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  314    315   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  315    316   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  316    317   
                                                out
  317    318   
                                            })],
  318    319   
                                        )
  319    320   
                                        .build());
  320    321   
                                }
  321    322   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  322    323   
                                    .url({
  323    324   
                                        let mut out = String::new();
  324    325   
                                        out.push_str("https://s3express-control.");
  325    326   
                                        #[allow(clippy::needless_borrow)]
  326    327   
                                        out.push_str(&region.as_ref() as &str);
  327    328   
                                        out.push('.');
  328    329   
                                        #[allow(clippy::needless_borrow)]
  329    330   
                                        out.push_str(&partition_result.dns_suffix());
  330    331   
                                        out
  331    332   
                                    })
  332    333   
                                    .property(
  333    334   
                                        "authSchemes",
  334    335   
                                        vec![::aws_smithy_types::Document::from({
  335         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         336  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  336    337   
                                            out.insert("disableDoubleEncoding".to_string(), true.into());
  337    338   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  338    339   
                                            out.insert("signingName".to_string(), "s3express".to_string().into());
  339    340   
                                            out.insert("signingRegion".to_string(), region.to_owned().into());
  340    341   
                                            out
  341    342   
                                        })],
  342    343   
                                    )
  343    344   
                                    .build());
  344    345   
                            }
  345    346   
                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
@@ -378,379 +891,897 @@
  398    399   
                                        #[allow(clippy::needless_borrow)]
  399    400   
                                        out.push_str(&url.scheme());
  400    401   
                                        out.push_str("://");
  401    402   
                                        #[allow(clippy::needless_borrow)]
  402    403   
                                        out.push_str(&url.authority());
  403    404   
                                        out
  404    405   
                                    })
  405    406   
                                    .property(
  406    407   
                                        "authSchemes",
  407    408   
                                        vec![::aws_smithy_types::Document::from({
  408         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         409  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  409    410   
                                            out.insert("disableDoubleEncoding".to_string(), true.into());
  410    411   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  411    412   
                                            out.insert("signingName".to_string(), "s3express".to_string().into());
  412    413   
                                            out.insert("signingRegion".to_string(), region.to_owned().into());
  413    414   
                                            out
  414    415   
                                        })],
  415    416   
                                    )
  416    417   
                                    .build());
  417    418   
                            }
  418    419   
                        }
  419    420   
                        #[allow(unused_variables)]
  420    421   
                        if let Some(s3express_availability_zone_id) =
  421    422   
                            crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 15, true, _diagnostic_collector)
  422    423   
                        {
  423    424   
                            #[allow(unused_variables)]
  424    425   
                            if let Some(s3express_availability_zone_delim) =
  425    426   
                                crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 15, 17, true, _diagnostic_collector)
  426    427   
                            {
  427    428   
                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
  428    429   
                                    if (*use_fips) == (true) {
  429    430   
                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  430    431   
                                            .url({
  431    432   
                                                let mut out = String::new();
  432    433   
                                                out.push_str("https://s3express-control-fips.");
  433    434   
                                                #[allow(clippy::needless_borrow)]
  434    435   
                                                out.push_str(&region.as_ref() as &str);
  435    436   
                                                out.push('.');
  436    437   
                                                #[allow(clippy::needless_borrow)]
  437    438   
                                                out.push_str(&partition_result.dns_suffix());
  438    439   
                                                out
  439    440   
                                            })
  440    441   
                                            .property(
  441    442   
                                                "authSchemes",
  442    443   
                                                vec![::aws_smithy_types::Document::from({
  443         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         444  +
                                                    let mut out =
         445  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  444    446   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  445    447   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  446    448   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  447    449   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  448    450   
                                                    out
  449    451   
                                                })],
  450    452   
                                            )
  451    453   
                                            .build());
  452    454   
                                    }
  453    455   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  454    456   
                                        .url({
  455    457   
                                            let mut out = String::new();
  456    458   
                                            out.push_str("https://s3express-control.");
  457    459   
                                            #[allow(clippy::needless_borrow)]
  458    460   
                                            out.push_str(&region.as_ref() as &str);
  459    461   
                                            out.push('.');
  460    462   
                                            #[allow(clippy::needless_borrow)]
  461    463   
                                            out.push_str(&partition_result.dns_suffix());
  462    464   
                                            out
  463    465   
                                        })
  464    466   
                                        .property(
  465    467   
                                            "authSchemes",
  466    468   
                                            vec![::aws_smithy_types::Document::from({
  467         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         469  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  468    470   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  469    471   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  470    472   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  471    473   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  472    474   
                                                out
  473    475   
                                            })],
  474    476   
                                        )
  475    477   
                                        .build());
  476    478   
                                }
  477    479   
                            }
  478    480   
                        }
  479    481   
                        #[allow(unused_variables)]
  480    482   
                        if let Some(s3express_availability_zone_id) =
  481    483   
                            crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 16, true, _diagnostic_collector)
  482    484   
                        {
  483    485   
                            #[allow(unused_variables)]
  484    486   
                            if let Some(s3express_availability_zone_delim) =
  485    487   
                                crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 16, 18, true, _diagnostic_collector)
  486    488   
                            {
  487    489   
                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
  488    490   
                                    if (*use_fips) == (true) {
  489    491   
                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  490    492   
                                            .url({
  491    493   
                                                let mut out = String::new();
  492    494   
                                                out.push_str("https://s3express-control-fips.");
  493    495   
                                                #[allow(clippy::needless_borrow)]
  494    496   
                                                out.push_str(&region.as_ref() as &str);
  495    497   
                                                out.push('.');
  496    498   
                                                #[allow(clippy::needless_borrow)]
  497    499   
                                                out.push_str(&partition_result.dns_suffix());
  498    500   
                                                out
  499    501   
                                            })
  500    502   
                                            .property(
  501    503   
                                                "authSchemes",
  502    504   
                                                vec![::aws_smithy_types::Document::from({
  503         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         505  +
                                                    let mut out =
         506  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  504    507   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  505    508   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  506    509   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  507    510   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  508    511   
                                                    out
  509    512   
                                                })],
  510    513   
                                            )
  511    514   
                                            .build());
  512    515   
                                    }
  513    516   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  514    517   
                                        .url({
  515    518   
                                            let mut out = String::new();
  516    519   
                                            out.push_str("https://s3express-control.");
  517    520   
                                            #[allow(clippy::needless_borrow)]
  518    521   
                                            out.push_str(&region.as_ref() as &str);
  519    522   
                                            out.push('.');
  520    523   
                                            #[allow(clippy::needless_borrow)]
  521    524   
                                            out.push_str(&partition_result.dns_suffix());
  522    525   
                                            out
  523    526   
                                        })
  524    527   
                                        .property(
  525    528   
                                            "authSchemes",
  526    529   
                                            vec![::aws_smithy_types::Document::from({
  527         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         530  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  528    531   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  529    532   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  530    533   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  531    534   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  532    535   
                                                out
  533    536   
                                            })],
  534    537   
                                        )
  535    538   
                                        .build());
  536    539   
                                }
  537    540   
                            }
  538    541   
                        }
  539    542   
                        #[allow(unused_variables)]
  540    543   
                        if let Some(s3express_availability_zone_id) =
  541    544   
                            crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 20, true, _diagnostic_collector)
  542    545   
                        {
  543    546   
                            #[allow(unused_variables)]
  544    547   
                            if let Some(s3express_availability_zone_delim) =
  545    548   
                                crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 20, 22, true, _diagnostic_collector)
  546    549   
                            {
  547    550   
                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
  548    551   
                                    if (*use_fips) == (true) {
  549    552   
                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  550    553   
                                            .url({
  551    554   
                                                let mut out = String::new();
  552    555   
                                                out.push_str("https://s3express-control-fips.");
  553    556   
                                                #[allow(clippy::needless_borrow)]
  554    557   
                                                out.push_str(&region.as_ref() as &str);
  555    558   
                                                out.push('.');
  556    559   
                                                #[allow(clippy::needless_borrow)]
  557    560   
                                                out.push_str(&partition_result.dns_suffix());
  558    561   
                                                out
  559    562   
                                            })
  560    563   
                                            .property(
  561    564   
                                                "authSchemes",
  562    565   
                                                vec![::aws_smithy_types::Document::from({
  563         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         566  +
                                                    let mut out =
         567  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  564    568   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  565    569   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  566    570   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  567    571   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  568    572   
                                                    out
  569    573   
                                                })],
  570    574   
                                            )
  571    575   
                                            .build());
  572    576   
                                    }
  573    577   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  574    578   
                                        .url({
  575    579   
                                            let mut out = String::new();
  576    580   
                                            out.push_str("https://s3express-control.");
  577    581   
                                            #[allow(clippy::needless_borrow)]
  578    582   
                                            out.push_str(&region.as_ref() as &str);
  579    583   
                                            out.push('.');
  580    584   
                                            #[allow(clippy::needless_borrow)]
  581    585   
                                            out.push_str(&partition_result.dns_suffix());
  582    586   
                                            out
  583    587   
                                        })
  584    588   
                                        .property(
  585    589   
                                            "authSchemes",
  586    590   
                                            vec![::aws_smithy_types::Document::from({
  587         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         591  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  588    592   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  589    593   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  590    594   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  591    595   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  592    596   
                                                out
  593    597   
                                            })],
  594    598   
                                        )
  595    599   
                                        .build());
  596    600   
                                }
  597    601   
                            }
  598    602   
                        }
  599    603   
                        #[allow(unused_variables)]
  600    604   
                        if let Some(s3express_availability_zone_id) =
  601    605   
                            crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 21, true, _diagnostic_collector)
  602    606   
                        {
  603    607   
                            #[allow(unused_variables)]
  604    608   
                            if let Some(s3express_availability_zone_delim) =
  605    609   
                                crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 21, 23, true, _diagnostic_collector)
  606    610   
                            {
  607    611   
                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
  608    612   
                                    if (*use_fips) == (true) {
  609    613   
                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  610    614   
                                            .url({
  611    615   
                                                let mut out = String::new();
  612    616   
                                                out.push_str("https://s3express-control-fips.");
  613    617   
                                                #[allow(clippy::needless_borrow)]
  614    618   
                                                out.push_str(&region.as_ref() as &str);
  615    619   
                                                out.push('.');
  616    620   
                                                #[allow(clippy::needless_borrow)]
  617    621   
                                                out.push_str(&partition_result.dns_suffix());
  618    622   
                                                out
  619    623   
                                            })
  620    624   
                                            .property(
  621    625   
                                                "authSchemes",
  622    626   
                                                vec![::aws_smithy_types::Document::from({
  623         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         627  +
                                                    let mut out =
         628  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  624    629   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  625    630   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  626    631   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  627    632   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  628    633   
                                                    out
  629    634   
                                                })],
  630    635   
                                            )
  631    636   
                                            .build());
  632    637   
                                    }
  633    638   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  634    639   
                                        .url({
  635    640   
                                            let mut out = String::new();
  636    641   
                                            out.push_str("https://s3express-control.");
  637    642   
                                            #[allow(clippy::needless_borrow)]
  638    643   
                                            out.push_str(&region.as_ref() as &str);
  639    644   
                                            out.push('.');
  640    645   
                                            #[allow(clippy::needless_borrow)]
  641    646   
                                            out.push_str(&partition_result.dns_suffix());
  642    647   
                                            out
  643    648   
                                        })
  644    649   
                                        .property(
  645    650   
                                            "authSchemes",
  646    651   
                                            vec![::aws_smithy_types::Document::from({
  647         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         652  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  648    653   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  649    654   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  650    655   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  651    656   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  652    657   
                                                out
  653    658   
                                            })],
  654    659   
                                        )
  655    660   
                                        .build());
  656    661   
                                }
  657    662   
                            }
  658    663   
                        }
  659    664   
                        #[allow(unused_variables)]
  660    665   
                        if let Some(s3express_availability_zone_id) =
  661    666   
                            crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 27, true, _diagnostic_collector)
  662    667   
                        {
  663    668   
                            #[allow(unused_variables)]
  664    669   
                            if let Some(s3express_availability_zone_delim) =
  665    670   
                                crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 27, 29, true, _diagnostic_collector)
  666    671   
                            {
  667    672   
                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
  668    673   
                                    if (*use_fips) == (true) {
  669    674   
                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  670    675   
                                            .url({
  671    676   
                                                let mut out = String::new();
  672    677   
                                                out.push_str("https://s3express-control-fips.");
  673    678   
                                                #[allow(clippy::needless_borrow)]
  674    679   
                                                out.push_str(&region.as_ref() as &str);
  675    680   
                                                out.push('.');
  676    681   
                                                #[allow(clippy::needless_borrow)]
  677    682   
                                                out.push_str(&partition_result.dns_suffix());
  678    683   
                                                out
  679    684   
                                            })
  680    685   
                                            .property(
  681    686   
                                                "authSchemes",
  682    687   
                                                vec![::aws_smithy_types::Document::from({
  683         -
                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         688  +
                                                    let mut out =
         689  +
                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  684    690   
                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  685    691   
                                                    out.insert("name".to_string(), "sigv4".to_string().into());
  686    692   
                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  687    693   
                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  688    694   
                                                    out
  689    695   
                                                })],
  690    696   
                                            )
  691    697   
                                            .build());
  692    698   
                                    }
  693    699   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  694    700   
                                        .url({
  695    701   
                                            let mut out = String::new();
  696    702   
                                            out.push_str("https://s3express-control.");
  697    703   
                                            #[allow(clippy::needless_borrow)]
  698    704   
                                            out.push_str(&region.as_ref() as &str);
  699    705   
                                            out.push('.');
  700    706   
                                            #[allow(clippy::needless_borrow)]
  701    707   
                                            out.push_str(&partition_result.dns_suffix());
  702    708   
                                            out
  703    709   
                                        })
  704    710   
                                        .property(
  705    711   
                                            "authSchemes",
  706    712   
                                            vec![::aws_smithy_types::Document::from({
  707         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         713  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  708    714   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
  709    715   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
  710    716   
                                                out.insert("signingName".to_string(), "s3express".to_string().into());
  711    717   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
  712    718   
                                                out
  713    719   
                                            })],
  714    720   
                                        )
  715    721   
                                        .build());
  716    722   
                                }
  717    723   
                            }
  718    724   
                        }
  719    725   
                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  720    726   
                            "Unrecognized S3Express Access Point name format.".to_string(),
  721    727   
                        ));
  722    728   
                    }
  723    729   
                    #[allow(unreachable_code)]
  724    730   
                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
  725    731   
                        "No rules matched these parameters. This is a bug. {_params:?}"
  726    732   
                    )));
  727    733   
                }
  728    734   
            }
  729    735   
        }
  730    736   
        #[allow(unused_variables)]
  731    737   
        if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
  732    738   
            if (*use_s3_express_control_endpoint) == (true) {
  733    739   
                #[allow(unused_variables)]
  734    740   
                if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
  735    741   
                    #[allow(unused_variables)]
  736    742   
                    if let Some(endpoint) = endpoint {
  737    743   
                        if (*use_dual_stack) == (true) {
  738    744   
                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  739    745   
                                "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
  740    746   
                            ));
  741    747   
                        }
  742    748   
                    }
  743    749   
                    if (*use_dual_stack) == (true) {
  744    750   
                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  745    751   
                            "S3Express does not support Dual-stack.".to_string(),
  746    752   
                        ));
  747    753   
                    }
  748    754   
                    #[allow(unused_variables)]
  749    755   
                    if let Some(endpoint) = endpoint {
  750    756   
                        #[allow(unused_variables)]
  751    757   
                        if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
  752    758   
                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  753    759   
                                .url({
  754    760   
                                    let mut out = String::new();
  755    761   
                                    #[allow(clippy::needless_borrow)]
  756    762   
                                    out.push_str(&url.scheme());
  757    763   
                                    out.push_str("://");
  758    764   
                                    #[allow(clippy::needless_borrow)]
  759    765   
                                    out.push_str(&url.authority());
  760    766   
                                    out
  761    767   
                                })
  762    768   
                                .property(
  763    769   
                                    "authSchemes",
  764    770   
                                    vec![::aws_smithy_types::Document::from({
  765         -
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         771  +
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  766    772   
                                        out.insert("disableDoubleEncoding".to_string(), true.into());
  767    773   
                                        out.insert("name".to_string(), "sigv4".to_string().into());
  768    774   
                                        out.insert("signingName".to_string(), "s3express".to_string().into());
  769    775   
                                        out.insert("signingRegion".to_string(), region.to_owned().into());
  770    776   
                                        out
  771    777   
                                    })],
  772    778   
                                )
  773    779   
                                .build());
  774    780   
                        }
  775    781   
                    }
  776    782   
                    if (*use_fips) == (true) {
  777    783   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  778    784   
                            .url({
  779    785   
                                let mut out = String::new();
  780    786   
                                out.push_str("https://s3express-control-fips.");
  781    787   
                                #[allow(clippy::needless_borrow)]
  782    788   
                                out.push_str(&region.as_ref() as &str);
  783    789   
                                out.push('.');
  784    790   
                                #[allow(clippy::needless_borrow)]
  785    791   
                                out.push_str(&partition_result.dns_suffix());
  786    792   
                                out
  787    793   
                            })
  788    794   
                            .property(
  789    795   
                                "authSchemes",
  790    796   
                                vec![::aws_smithy_types::Document::from({
  791         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         797  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  792    798   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  793    799   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
  794    800   
                                    out.insert("signingName".to_string(), "s3express".to_string().into());
  795    801   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  796    802   
                                    out
  797    803   
                                })],
  798    804   
                            )
  799    805   
                            .build());
  800    806   
                    }
  801    807   
                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  802    808   
                        .url({
  803    809   
                            let mut out = String::new();
  804    810   
                            out.push_str("https://s3express-control.");
  805    811   
                            #[allow(clippy::needless_borrow)]
  806    812   
                            out.push_str(&region.as_ref() as &str);
  807    813   
                            out.push('.');
  808    814   
                            #[allow(clippy::needless_borrow)]
  809    815   
                            out.push_str(&partition_result.dns_suffix());
  810    816   
                            out
  811    817   
                        })
  812    818   
                        .property(
  813    819   
                            "authSchemes",
  814    820   
                            vec![::aws_smithy_types::Document::from({
  815         -
                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         821  +
                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  816    822   
                                out.insert("disableDoubleEncoding".to_string(), true.into());
  817    823   
                                out.insert("name".to_string(), "sigv4".to_string().into());
  818    824   
                                out.insert("signingName".to_string(), "s3express".to_string().into());
  819    825   
                                out.insert("signingRegion".to_string(), region.to_owned().into());
  820    826   
                                out
  821    827   
                            })],
  822    828   
                        )
  823    829   
                        .build());
  824    830   
                }
  825    831   
                #[allow(unreachable_code)]
  826    832   
                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
  827    833   
                    "No rules matched these parameters. This is a bug. {_params:?}"
  828    834   
                )));
  829    835   
            }
  830    836   
        }
  831    837   
        if (region.as_ref() as &str) == ("snow") {
  832    838   
            #[allow(unused_variables)]
  833    839   
            if let Some(endpoint) = endpoint {
  834    840   
                #[allow(unused_variables)]
  835    841   
                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
  836    842   
                    #[allow(unused_variables)]
  837    843   
                    if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
  838    844   
                        if (*use_dual_stack) == (true) {
  839    845   
                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  840    846   
                                "S3 Snow does not support DualStack".to_string(),
  841    847   
                            ));
  842    848   
                        }
  843    849   
                        if (*use_fips) == (true) {
  844    850   
                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  845    851   
                                "S3 Snow does not support FIPS".to_string(),
  846    852   
                            ));
  847    853   
                        }
  848    854   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  849    855   
                            .url({
  850    856   
                                let mut out = String::new();
  851    857   
                                #[allow(clippy::needless_borrow)]
  852    858   
                                out.push_str(&url.scheme());
  853    859   
                                out.push_str("://");
  854    860   
                                #[allow(clippy::needless_borrow)]
  855    861   
                                out.push_str(&url.authority());
  856    862   
                                out
  857    863   
                            })
  858    864   
                            .property(
  859    865   
                                "authSchemes",
  860    866   
                                vec![::aws_smithy_types::Document::from({
  861         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         867  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
  862    868   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
  863    869   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
  864    870   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
  865    871   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
  866    872   
                                    out
  867    873   
                                })],
  868    874   
                            )
  869    875   
                            .build());
  870    876   
                    }
  871    877   
                    #[allow(unreachable_code)]
@@ -950,956 +1181,1192 @@
  970    976   
                                                                                        "x-amz-account-id",
  971    977   
                                                                                        access_point_arn.account_id().to_owned(),
  972    978   
                                                                                    )
  973    979   
                                                                                    .header("x-amz-outpost-id", outpost_id.to_owned())
  974    980   
                                                                                    .property(
  975    981   
                                                                                        "authSchemes",
  976    982   
                                                                                        vec![::aws_smithy_types::Document::from({
  977    983   
                                                                                            let mut out = ::std::collections::HashMap::<
  978    984   
                                                                                                String,
  979    985   
                                                                                                ::aws_smithy_types::Document,
  980         -
                                                                                            >::new(
         986  +
                                                                                            >::with_capacity(
         987  +
                                                                                                4
  981    988   
                                                                                            );
  982    989   
                                                                                            out.insert(
  983    990   
                                                                                                "disableDoubleEncoding".to_string(),
  984    991   
                                                                                                true.into(),
  985    992   
                                                                                            );
  986    993   
                                                                                            out.insert(
  987    994   
                                                                                                "name".to_string(),
  988    995   
                                                                                                "sigv4".to_string().into(),
  989    996   
                                                                                            );
  990    997   
                                                                                            out.insert(
  991    998   
                                                                                                "signingName".to_string(),
  992    999   
                                                                                                "s3-outposts".to_string().into(),
  993   1000   
                                                                                            );
  994   1001   
                                                                                            out.insert(
  995   1002   
                                                                                                "signingRegion".to_string(),
  996   1003   
                                                                                                access_point_arn.region().to_owned().into(),
  997   1004   
                                                                                            );
  998   1005   
                                                                                            out
  999   1006   
                                                                                        })],
 1000   1007   
                                                                                    )
 1001   1008   
                                                                                    .build());
 1002   1009   
                                                                            }
 1003   1010   
                                                                        }
 1004   1011   
                                                                        if (*use_fips) == (true) {
 1005   1012   
                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1006   1013   
                                                                                .url({
 1007   1014   
                                                                                    let mut out = String::new();
 1008   1015   
                                                                                    out.push_str("https://s3-outposts-fips.");
 1009   1016   
                                                                                    #[allow(clippy::needless_borrow)]
 1010   1017   
                                                                                    out.push_str(&access_point_arn.region());
 1011   1018   
                                                                                    out.push('.');
 1012   1019   
                                                                                    #[allow(clippy::needless_borrow)]
 1013   1020   
                                                                                    out.push_str(&arn_partition.dns_suffix());
 1014   1021   
                                                                                    out
 1015   1022   
                                                                                })
 1016   1023   
                                                                                .header("x-amz-account-id", access_point_arn.account_id().to_owned())
 1017   1024   
                                                                                .header("x-amz-outpost-id", outpost_id.to_owned())
 1018   1025   
                                                                                .property(
 1019   1026   
                                                                                    "authSchemes",
 1020   1027   
                                                                                    vec![::aws_smithy_types::Document::from({
 1021   1028   
                                                                                        let mut out = ::std::collections::HashMap::<
 1022   1029   
                                                                                            String,
 1023   1030   
                                                                                            ::aws_smithy_types::Document,
 1024         -
                                                                                        >::new(
        1031  +
                                                                                        >::with_capacity(
        1032  +
                                                                                            4
 1025   1033   
                                                                                        );
 1026   1034   
                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
 1027   1035   
                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
 1028   1036   
                                                                                        out.insert(
 1029   1037   
                                                                                            "signingName".to_string(),
 1030   1038   
                                                                                            "s3-outposts".to_string().into(),
 1031   1039   
                                                                                        );
 1032   1040   
                                                                                        out.insert(
 1033   1041   
                                                                                            "signingRegion".to_string(),
 1034   1042   
                                                                                            access_point_arn.region().to_owned().into(),
 1035   1043   
                                                                                        );
 1036   1044   
                                                                                        out
 1037   1045   
                                                                                    })],
 1038   1046   
                                                                                )
 1039   1047   
                                                                                .build());
 1040   1048   
                                                                        }
 1041   1049   
                                                                        if (*use_dual_stack) == (true) {
 1042   1050   
                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1043   1051   
                                                                                .url({
 1044   1052   
                                                                                    let mut out = String::new();
 1045   1053   
                                                                                    out.push_str("https://s3-outposts.");
 1046   1054   
                                                                                    #[allow(clippy::needless_borrow)]
 1047   1055   
                                                                                    out.push_str(&access_point_arn.region());
 1048   1056   
                                                                                    out.push('.');
 1049   1057   
                                                                                    #[allow(clippy::needless_borrow)]
 1050   1058   
                                                                                    out.push_str(&arn_partition.dual_stack_dns_suffix());
 1051   1059   
                                                                                    out
 1052   1060   
                                                                                })
 1053   1061   
                                                                                .header("x-amz-account-id", access_point_arn.account_id().to_owned())
 1054   1062   
                                                                                .header("x-amz-outpost-id", outpost_id.to_owned())
 1055   1063   
                                                                                .property(
 1056   1064   
                                                                                    "authSchemes",
 1057   1065   
                                                                                    vec![::aws_smithy_types::Document::from({
 1058   1066   
                                                                                        let mut out = ::std::collections::HashMap::<
 1059   1067   
                                                                                            String,
 1060   1068   
                                                                                            ::aws_smithy_types::Document,
 1061         -
                                                                                        >::new(
        1069  +
                                                                                        >::with_capacity(
        1070  +
                                                                                            4
 1062   1071   
                                                                                        );
 1063   1072   
                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
 1064   1073   
                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
 1065   1074   
                                                                                        out.insert(
 1066   1075   
                                                                                            "signingName".to_string(),
 1067   1076   
                                                                                            "s3-outposts".to_string().into(),
 1068   1077   
                                                                                        );
 1069   1078   
                                                                                        out.insert(
 1070   1079   
                                                                                            "signingRegion".to_string(),
 1071   1080   
                                                                                            access_point_arn.region().to_owned().into(),
 1072   1081   
                                                                                        );
 1073   1082   
                                                                                        out
 1074   1083   
                                                                                    })],
 1075   1084   
                                                                                )
 1076   1085   
                                                                                .build());
 1077   1086   
                                                                        }
 1078   1087   
                                                                        #[allow(unused_variables)]
 1079   1088   
                                                                        if let Some(endpoint) = endpoint {
 1080   1089   
                                                                            #[allow(unused_variables)]
 1081   1090   
                                                                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
 1082   1091   
                                                                                endpoint.as_ref() as &str,
 1083   1092   
                                                                                _diagnostic_collector,
 1084   1093   
                                                                            ) {
 1085   1094   
                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1086   1095   
                                                                                    .url({
 1087   1096   
                                                                                        let mut out = String::new();
 1088   1097   
                                                                                        #[allow(clippy::needless_borrow)]
 1089   1098   
                                                                                        out.push_str(&url.scheme());
 1090   1099   
                                                                                        out.push_str("://");
 1091   1100   
                                                                                        #[allow(clippy::needless_borrow)]
 1092   1101   
                                                                                        out.push_str(&url.authority());
 1093   1102   
                                                                                        #[allow(clippy::needless_borrow)]
 1094   1103   
                                                                                        out.push_str(&url.path());
 1095   1104   
                                                                                        out
 1096   1105   
                                                                                    })
 1097   1106   
                                                                                    .header(
 1098   1107   
                                                                                        "x-amz-account-id",
 1099   1108   
                                                                                        access_point_arn.account_id().to_owned(),
 1100   1109   
                                                                                    )
 1101   1110   
                                                                                    .header("x-amz-outpost-id", outpost_id.to_owned())
 1102   1111   
                                                                                    .property(
 1103   1112   
                                                                                        "authSchemes",
 1104   1113   
                                                                                        vec![::aws_smithy_types::Document::from({
 1105   1114   
                                                                                            let mut out = ::std::collections::HashMap::<
 1106   1115   
                                                                                                String,
 1107   1116   
                                                                                                ::aws_smithy_types::Document,
 1108         -
                                                                                            >::new(
        1117  +
                                                                                            >::with_capacity(
        1118  +
                                                                                                4
 1109   1119   
                                                                                            );
 1110   1120   
                                                                                            out.insert(
 1111   1121   
                                                                                                "disableDoubleEncoding".to_string(),
 1112   1122   
                                                                                                true.into(),
 1113   1123   
                                                                                            );
 1114   1124   
                                                                                            out.insert(
 1115   1125   
                                                                                                "name".to_string(),
 1116   1126   
                                                                                                "sigv4".to_string().into(),
 1117   1127   
                                                                                            );
 1118   1128   
                                                                                            out.insert(
 1119   1129   
                                                                                                "signingName".to_string(),
 1120   1130   
                                                                                                "s3-outposts".to_string().into(),
 1121   1131   
                                                                                            );
 1122   1132   
                                                                                            out.insert(
 1123   1133   
                                                                                                "signingRegion".to_string(),
 1124   1134   
                                                                                                access_point_arn.region().to_owned().into(),
 1125   1135   
                                                                                            );
 1126   1136   
                                                                                            out
 1127   1137   
                                                                                        })],
 1128   1138   
                                                                                    )
 1129   1139   
                                                                                    .build());
 1130   1140   
                                                                            }
 1131   1141   
                                                                        }
 1132   1142   
                                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1133   1143   
                                                                            .url({
 1134   1144   
                                                                                let mut out = String::new();
 1135   1145   
                                                                                out.push_str("https://s3-outposts.");
 1136   1146   
                                                                                #[allow(clippy::needless_borrow)]
 1137   1147   
                                                                                out.push_str(&access_point_arn.region());
 1138   1148   
                                                                                out.push('.');
 1139   1149   
                                                                                #[allow(clippy::needless_borrow)]
 1140   1150   
                                                                                out.push_str(&arn_partition.dns_suffix());
 1141   1151   
                                                                                out
 1142   1152   
                                                                            })
 1143   1153   
                                                                            .header("x-amz-account-id", access_point_arn.account_id().to_owned())
 1144   1154   
                                                                            .header("x-amz-outpost-id", outpost_id.to_owned())
 1145   1155   
                                                                            .property(
 1146   1156   
                                                                                "authSchemes",
 1147   1157   
                                                                                vec![::aws_smithy_types::Document::from({
 1148   1158   
                                                                                    let mut out = ::std::collections::HashMap::<
 1149   1159   
                                                                                        String,
 1150   1160   
                                                                                        ::aws_smithy_types::Document,
 1151         -
                                                                                    >::new(
        1161  +
                                                                                    >::with_capacity(
        1162  +
                                                                                        4
 1152   1163   
                                                                                    );
 1153   1164   
                                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1154   1165   
                                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1155   1166   
                                                                                    out.insert(
 1156   1167   
                                                                                        "signingName".to_string(),
 1157   1168   
                                                                                        "s3-outposts".to_string().into(),
 1158   1169   
                                                                                    );
 1159   1170   
                                                                                    out.insert(
 1160   1171   
                                                                                        "signingRegion".to_string(),
 1161   1172   
                                                                                        access_point_arn.region().to_owned().into(),
@@ -1318,1329 +1546,1562 @@
 1338   1349   
                                                                                        out
 1339   1350   
                                                                                    })
 1340   1351   
                                                                                    .header("x-amz-account-id", bucket_arn.account_id().to_owned())
 1341   1352   
                                                                                    .header("x-amz-outpost-id", outpost_id.to_owned())
 1342   1353   
                                                                                    .property(
 1343   1354   
                                                                                        "authSchemes",
 1344   1355   
                                                                                        vec![::aws_smithy_types::Document::from({
 1345   1356   
                                                                                            let mut out = ::std::collections::HashMap::<
 1346   1357   
                                                                                                String,
 1347   1358   
                                                                                                ::aws_smithy_types::Document,
 1348         -
                                                                                            >::new(
        1359  +
                                                                                            >::with_capacity(
        1360  +
                                                                                                4
 1349   1361   
                                                                                            );
 1350   1362   
                                                                                            out.insert(
 1351   1363   
                                                                                                "disableDoubleEncoding".to_string(),
 1352   1364   
                                                                                                true.into(),
 1353   1365   
                                                                                            );
 1354   1366   
                                                                                            out.insert(
 1355   1367   
                                                                                                "name".to_string(),
 1356   1368   
                                                                                                "sigv4".to_string().into(),
 1357   1369   
                                                                                            );
 1358   1370   
                                                                                            out.insert(
 1359   1371   
                                                                                                "signingName".to_string(),
 1360   1372   
                                                                                                "s3-outposts".to_string().into(),
 1361   1373   
                                                                                            );
 1362   1374   
                                                                                            out.insert(
 1363   1375   
                                                                                                "signingRegion".to_string(),
 1364   1376   
                                                                                                bucket_arn.region().to_owned().into(),
 1365   1377   
                                                                                            );
 1366   1378   
                                                                                            out
 1367   1379   
                                                                                        })],
 1368   1380   
                                                                                    )
 1369   1381   
                                                                                    .build());
 1370   1382   
                                                                            }
 1371   1383   
                                                                        }
 1372   1384   
                                                                        if (*use_fips) == (true) {
 1373   1385   
                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1374   1386   
                                                                                .url({
 1375   1387   
                                                                                    let mut out = String::new();
 1376   1388   
                                                                                    out.push_str("https://s3-outposts-fips.");
 1377   1389   
                                                                                    #[allow(clippy::needless_borrow)]
 1378   1390   
                                                                                    out.push_str(&bucket_arn.region());
 1379   1391   
                                                                                    out.push('.');
 1380   1392   
                                                                                    #[allow(clippy::needless_borrow)]
 1381   1393   
                                                                                    out.push_str(&arn_partition.dns_suffix());
 1382   1394   
                                                                                    out
 1383   1395   
                                                                                })
 1384   1396   
                                                                                .header("x-amz-account-id", bucket_arn.account_id().to_owned())
 1385   1397   
                                                                                .header("x-amz-outpost-id", outpost_id.to_owned())
 1386   1398   
                                                                                .property(
 1387   1399   
                                                                                    "authSchemes",
 1388   1400   
                                                                                    vec![::aws_smithy_types::Document::from({
 1389   1401   
                                                                                        let mut out = ::std::collections::HashMap::<
 1390   1402   
                                                                                            String,
 1391   1403   
                                                                                            ::aws_smithy_types::Document,
 1392         -
                                                                                        >::new(
        1404  +
                                                                                        >::with_capacity(
        1405  +
                                                                                            4
 1393   1406   
                                                                                        );
 1394   1407   
                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
 1395   1408   
                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
 1396   1409   
                                                                                        out.insert(
 1397   1410   
                                                                                            "signingName".to_string(),
 1398   1411   
                                                                                            "s3-outposts".to_string().into(),
 1399   1412   
                                                                                        );
 1400   1413   
                                                                                        out.insert(
 1401   1414   
                                                                                            "signingRegion".to_string(),
 1402   1415   
                                                                                            bucket_arn.region().to_owned().into(),
 1403   1416   
                                                                                        );
 1404   1417   
                                                                                        out
 1405   1418   
                                                                                    })],
 1406   1419   
                                                                                )
 1407   1420   
                                                                                .build());
 1408   1421   
                                                                        }
 1409   1422   
                                                                        if (*use_dual_stack) == (true) {
 1410   1423   
                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1411   1424   
                                                                                .url({
 1412   1425   
                                                                                    let mut out = String::new();
 1413   1426   
                                                                                    out.push_str("https://s3-outposts.");
 1414   1427   
                                                                                    #[allow(clippy::needless_borrow)]
 1415   1428   
                                                                                    out.push_str(&bucket_arn.region());
 1416   1429   
                                                                                    out.push('.');
 1417   1430   
                                                                                    #[allow(clippy::needless_borrow)]
 1418   1431   
                                                                                    out.push_str(&arn_partition.dual_stack_dns_suffix());
 1419   1432   
                                                                                    out
 1420   1433   
                                                                                })
 1421   1434   
                                                                                .header("x-amz-account-id", bucket_arn.account_id().to_owned())
 1422   1435   
                                                                                .header("x-amz-outpost-id", outpost_id.to_owned())
 1423   1436   
                                                                                .property(
 1424   1437   
                                                                                    "authSchemes",
 1425   1438   
                                                                                    vec![::aws_smithy_types::Document::from({
 1426   1439   
                                                                                        let mut out = ::std::collections::HashMap::<
 1427   1440   
                                                                                            String,
 1428   1441   
                                                                                            ::aws_smithy_types::Document,
 1429         -
                                                                                        >::new(
        1442  +
                                                                                        >::with_capacity(
        1443  +
                                                                                            4
 1430   1444   
                                                                                        );
 1431   1445   
                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
 1432   1446   
                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
 1433   1447   
                                                                                        out.insert(
 1434   1448   
                                                                                            "signingName".to_string(),
 1435   1449   
                                                                                            "s3-outposts".to_string().into(),
 1436   1450   
                                                                                        );
 1437   1451   
                                                                                        out.insert(
 1438   1452   
                                                                                            "signingRegion".to_string(),
 1439   1453   
                                                                                            bucket_arn.region().to_owned().into(),
 1440   1454   
                                                                                        );
 1441   1455   
                                                                                        out
 1442   1456   
                                                                                    })],
 1443   1457   
                                                                                )
 1444   1458   
                                                                                .build());
 1445   1459   
                                                                        }
 1446   1460   
                                                                        #[allow(unused_variables)]
 1447   1461   
                                                                        if let Some(endpoint) = endpoint {
 1448   1462   
                                                                            #[allow(unused_variables)]
 1449   1463   
                                                                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
 1450   1464   
                                                                                endpoint.as_ref() as &str,
 1451   1465   
                                                                                _diagnostic_collector,
 1452   1466   
                                                                            ) {
 1453   1467   
                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1454   1468   
                                                                                    .url({
 1455   1469   
                                                                                        let mut out = String::new();
 1456   1470   
                                                                                        #[allow(clippy::needless_borrow)]
 1457   1471   
                                                                                        out.push_str(&url.scheme());
 1458   1472   
                                                                                        out.push_str("://");
 1459   1473   
                                                                                        #[allow(clippy::needless_borrow)]
 1460   1474   
                                                                                        out.push_str(&url.authority());
 1461   1475   
                                                                                        #[allow(clippy::needless_borrow)]
 1462   1476   
                                                                                        out.push_str(&url.path());
 1463   1477   
                                                                                        out
 1464   1478   
                                                                                    })
 1465   1479   
                                                                                    .header("x-amz-account-id", bucket_arn.account_id().to_owned())
 1466   1480   
                                                                                    .header("x-amz-outpost-id", outpost_id.to_owned())
 1467   1481   
                                                                                    .property(
 1468   1482   
                                                                                        "authSchemes",
 1469   1483   
                                                                                        vec![::aws_smithy_types::Document::from({
 1470   1484   
                                                                                            let mut out = ::std::collections::HashMap::<
 1471   1485   
                                                                                                String,
 1472   1486   
                                                                                                ::aws_smithy_types::Document,
 1473         -
                                                                                            >::new(
        1487  +
                                                                                            >::with_capacity(
        1488  +
                                                                                                4
 1474   1489   
                                                                                            );
 1475   1490   
                                                                                            out.insert(
 1476   1491   
                                                                                                "disableDoubleEncoding".to_string(),
 1477   1492   
                                                                                                true.into(),
 1478   1493   
                                                                                            );
 1479   1494   
                                                                                            out.insert(
 1480   1495   
                                                                                                "name".to_string(),
 1481   1496   
                                                                                                "sigv4".to_string().into(),
 1482   1497   
                                                                                            );
 1483   1498   
                                                                                            out.insert(
 1484   1499   
                                                                                                "signingName".to_string(),
 1485   1500   
                                                                                                "s3-outposts".to_string().into(),
 1486   1501   
                                                                                            );
 1487   1502   
                                                                                            out.insert(
 1488   1503   
                                                                                                "signingRegion".to_string(),
 1489   1504   
                                                                                                bucket_arn.region().to_owned().into(),
 1490   1505   
                                                                                            );
 1491   1506   
                                                                                            out
 1492   1507   
                                                                                        })],
 1493   1508   
                                                                                    )
 1494   1509   
                                                                                    .build());
 1495   1510   
                                                                            }
 1496   1511   
                                                                        }
 1497   1512   
                                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1498   1513   
                                                                            .url({
 1499   1514   
                                                                                let mut out = String::new();
 1500   1515   
                                                                                out.push_str("https://s3-outposts.");
 1501   1516   
                                                                                #[allow(clippy::needless_borrow)]
 1502   1517   
                                                                                out.push_str(&bucket_arn.region());
 1503   1518   
                                                                                out.push('.');
 1504   1519   
                                                                                #[allow(clippy::needless_borrow)]
 1505   1520   
                                                                                out.push_str(&arn_partition.dns_suffix());
 1506   1521   
                                                                                out
 1507   1522   
                                                                            })
 1508   1523   
                                                                            .header("x-amz-account-id", bucket_arn.account_id().to_owned())
 1509   1524   
                                                                            .header("x-amz-outpost-id", outpost_id.to_owned())
 1510   1525   
                                                                            .property(
 1511   1526   
                                                                                "authSchemes",
 1512   1527   
                                                                                vec![::aws_smithy_types::Document::from({
 1513   1528   
                                                                                    let mut out = ::std::collections::HashMap::<
 1514   1529   
                                                                                        String,
 1515   1530   
                                                                                        ::aws_smithy_types::Document,
 1516         -
                                                                                    >::new(
        1531  +
                                                                                    >::with_capacity(
        1532  +
                                                                                        4
 1517   1533   
                                                                                    );
 1518   1534   
                                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1519   1535   
                                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1520   1536   
                                                                                    out.insert(
 1521   1537   
                                                                                        "signingName".to_string(),
 1522   1538   
                                                                                        "s3-outposts".to_string().into(),
 1523   1539   
                                                                                    );
 1524   1540   
                                                                                    out.insert(
 1525   1541   
                                                                                        "signingRegion".to_string(),
 1526   1542   
                                                                                        bucket_arn.region().to_owned().into(),
@@ -1643,1659 +1988,2004 @@
 1663   1679   
                                            out.push('.');
 1664   1680   
                                            #[allow(clippy::needless_borrow)]
 1665   1681   
                                            out.push_str(&url.authority());
 1666   1682   
                                            #[allow(clippy::needless_borrow)]
 1667   1683   
                                            out.push_str(&url.path());
 1668   1684   
                                            out
 1669   1685   
                                        })
 1670   1686   
                                        .property(
 1671   1687   
                                            "authSchemes",
 1672   1688   
                                            vec![::aws_smithy_types::Document::from({
 1673         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1689  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1674   1690   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
 1675   1691   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
 1676   1692   
                                                out.insert("signingName".to_string(), "s3".to_string().into());
 1677   1693   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
 1678   1694   
                                                out
 1679   1695   
                                            })],
 1680   1696   
                                        )
 1681   1697   
                                        .build());
 1682   1698   
                                }
 1683   1699   
                            }
 1684   1700   
                        }
 1685   1701   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1686   1702   
                            .url({
 1687   1703   
                                let mut out = String::new();
 1688   1704   
                                #[allow(clippy::needless_borrow)]
 1689   1705   
                                out.push_str(&url.scheme());
 1690   1706   
                                out.push_str("://");
 1691   1707   
                                #[allow(clippy::needless_borrow)]
 1692   1708   
                                out.push_str(&url.authority());
 1693   1709   
                                #[allow(clippy::needless_borrow)]
 1694   1710   
                                out.push_str(&url.path());
 1695   1711   
                                out
 1696   1712   
                            })
 1697   1713   
                            .property(
 1698   1714   
                                "authSchemes",
 1699   1715   
                                vec![::aws_smithy_types::Document::from({
 1700         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1716  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1701   1717   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1702   1718   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1703   1719   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
 1704   1720   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
 1705   1721   
                                    out
 1706   1722   
                                })],
 1707   1723   
                            )
 1708   1724   
                            .build());
 1709   1725   
                    }
 1710   1726   
                }
 1711   1727   
                if (*use_fips) == (true) {
 1712   1728   
                    if (*use_dual_stack) == (true) {
 1713   1729   
                        #[allow(unused_variables)]
 1714   1730   
                        if let Some(requires_account_id) = requires_account_id {
 1715   1731   
                            if (*requires_account_id) == (true) {
 1716   1732   
                                #[allow(unused_variables)]
 1717   1733   
                                if let Some(account_id) = account_id {
 1718   1734   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1719   1735   
                                        .url({
 1720   1736   
                                            let mut out = String::new();
 1721   1737   
                                            out.push_str("https://");
 1722   1738   
                                            #[allow(clippy::needless_borrow)]
 1723   1739   
                                            out.push_str(&account_id.as_ref() as &str);
 1724   1740   
                                            out.push_str(".s3-control-fips.dualstack.");
 1725   1741   
                                            #[allow(clippy::needless_borrow)]
 1726   1742   
                                            out.push_str(&region.as_ref() as &str);
 1727   1743   
                                            out.push('.');
 1728   1744   
                                            #[allow(clippy::needless_borrow)]
 1729   1745   
                                            out.push_str(&partition_result.dns_suffix());
 1730   1746   
                                            out
 1731   1747   
                                        })
 1732   1748   
                                        .property(
 1733   1749   
                                            "authSchemes",
 1734   1750   
                                            vec![::aws_smithy_types::Document::from({
 1735         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1751  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1736   1752   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
 1737   1753   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
 1738   1754   
                                                out.insert("signingName".to_string(), "s3".to_string().into());
 1739   1755   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
 1740   1756   
                                                out
 1741   1757   
                                            })],
 1742   1758   
                                        )
 1743   1759   
                                        .build());
 1744   1760   
                                }
 1745   1761   
                            }
 1746   1762   
                        }
 1747   1763   
                    }
 1748   1764   
                }
 1749   1765   
                if (*use_fips) == (true) {
 1750   1766   
                    if (*use_dual_stack) == (true) {
 1751   1767   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1752   1768   
                            .url({
 1753   1769   
                                let mut out = String::new();
 1754   1770   
                                out.push_str("https://s3-control-fips.dualstack.");
 1755   1771   
                                #[allow(clippy::needless_borrow)]
 1756   1772   
                                out.push_str(&region.as_ref() as &str);
 1757   1773   
                                out.push('.');
 1758   1774   
                                #[allow(clippy::needless_borrow)]
 1759   1775   
                                out.push_str(&partition_result.dns_suffix());
 1760   1776   
                                out
 1761   1777   
                            })
 1762   1778   
                            .property(
 1763   1779   
                                "authSchemes",
 1764   1780   
                                vec![::aws_smithy_types::Document::from({
 1765         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1781  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1766   1782   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1767   1783   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1768   1784   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
 1769   1785   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
 1770   1786   
                                    out
 1771   1787   
                                })],
 1772   1788   
                            )
 1773   1789   
                            .build());
 1774   1790   
                    }
 1775   1791   
                }
 1776   1792   
                if (*use_fips) == (true) {
 1777   1793   
                    if (*use_dual_stack) == (false) {
 1778   1794   
                        #[allow(unused_variables)]
 1779   1795   
                        if let Some(requires_account_id) = requires_account_id {
 1780   1796   
                            if (*requires_account_id) == (true) {
 1781   1797   
                                #[allow(unused_variables)]
 1782   1798   
                                if let Some(account_id) = account_id {
 1783   1799   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1784   1800   
                                        .url({
 1785   1801   
                                            let mut out = String::new();
 1786   1802   
                                            out.push_str("https://");
 1787   1803   
                                            #[allow(clippy::needless_borrow)]
 1788   1804   
                                            out.push_str(&account_id.as_ref() as &str);
 1789   1805   
                                            out.push_str(".s3-control-fips.");
 1790   1806   
                                            #[allow(clippy::needless_borrow)]
 1791   1807   
                                            out.push_str(&region.as_ref() as &str);
 1792   1808   
                                            out.push('.');
 1793   1809   
                                            #[allow(clippy::needless_borrow)]
 1794   1810   
                                            out.push_str(&partition_result.dns_suffix());
 1795   1811   
                                            out
 1796   1812   
                                        })
 1797   1813   
                                        .property(
 1798   1814   
                                            "authSchemes",
 1799   1815   
                                            vec![::aws_smithy_types::Document::from({
 1800         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1816  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1801   1817   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
 1802   1818   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
 1803   1819   
                                                out.insert("signingName".to_string(), "s3".to_string().into());
 1804   1820   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
 1805   1821   
                                                out
 1806   1822   
                                            })],
 1807   1823   
                                        )
 1808   1824   
                                        .build());
 1809   1825   
                                }
 1810   1826   
                            }
 1811   1827   
                        }
 1812   1828   
                    }
 1813   1829   
                }
 1814   1830   
                if (*use_fips) == (true) {
 1815   1831   
                    if (*use_dual_stack) == (false) {
 1816   1832   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1817   1833   
                            .url({
 1818   1834   
                                let mut out = String::new();
 1819   1835   
                                out.push_str("https://s3-control-fips.");
 1820   1836   
                                #[allow(clippy::needless_borrow)]
 1821   1837   
                                out.push_str(&region.as_ref() as &str);
 1822   1838   
                                out.push('.');
 1823   1839   
                                #[allow(clippy::needless_borrow)]
 1824   1840   
                                out.push_str(&partition_result.dns_suffix());
 1825   1841   
                                out
 1826   1842   
                            })
 1827   1843   
                            .property(
 1828   1844   
                                "authSchemes",
 1829   1845   
                                vec![::aws_smithy_types::Document::from({
 1830         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1846  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1831   1847   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1832   1848   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1833   1849   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
 1834   1850   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
 1835   1851   
                                    out
 1836   1852   
                                })],
 1837   1853   
                            )
 1838   1854   
                            .build());
 1839   1855   
                    }
 1840   1856   
                }
 1841   1857   
                if (*use_fips) == (false) {
 1842   1858   
                    if (*use_dual_stack) == (true) {
 1843   1859   
                        #[allow(unused_variables)]
 1844   1860   
                        if let Some(requires_account_id) = requires_account_id {
 1845   1861   
                            if (*requires_account_id) == (true) {
 1846   1862   
                                #[allow(unused_variables)]
 1847   1863   
                                if let Some(account_id) = account_id {
 1848   1864   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1849   1865   
                                        .url({
 1850   1866   
                                            let mut out = String::new();
 1851   1867   
                                            out.push_str("https://");
 1852   1868   
                                            #[allow(clippy::needless_borrow)]
 1853   1869   
                                            out.push_str(&account_id.as_ref() as &str);
 1854   1870   
                                            out.push_str(".s3-control.dualstack.");
 1855   1871   
                                            #[allow(clippy::needless_borrow)]
 1856   1872   
                                            out.push_str(&region.as_ref() as &str);
 1857   1873   
                                            out.push('.');
 1858   1874   
                                            #[allow(clippy::needless_borrow)]
 1859   1875   
                                            out.push_str(&partition_result.dns_suffix());
 1860   1876   
                                            out
 1861   1877   
                                        })
 1862   1878   
                                        .property(
 1863   1879   
                                            "authSchemes",
 1864   1880   
                                            vec![::aws_smithy_types::Document::from({
 1865         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1881  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1866   1882   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
 1867   1883   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
 1868   1884   
                                                out.insert("signingName".to_string(), "s3".to_string().into());
 1869   1885   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
 1870   1886   
                                                out
 1871   1887   
                                            })],
 1872   1888   
                                        )
 1873   1889   
                                        .build());
 1874   1890   
                                }
 1875   1891   
                            }
 1876   1892   
                        }
 1877   1893   
                    }
 1878   1894   
                }
 1879   1895   
                if (*use_fips) == (false) {
 1880   1896   
                    if (*use_dual_stack) == (true) {
 1881   1897   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1882   1898   
                            .url({
 1883   1899   
                                let mut out = String::new();
 1884   1900   
                                out.push_str("https://s3-control.dualstack.");
 1885   1901   
                                #[allow(clippy::needless_borrow)]
 1886   1902   
                                out.push_str(&region.as_ref() as &str);
 1887   1903   
                                out.push('.');
 1888   1904   
                                #[allow(clippy::needless_borrow)]
 1889   1905   
                                out.push_str(&partition_result.dns_suffix());
 1890   1906   
                                out
 1891   1907   
                            })
 1892   1908   
                            .property(
 1893   1909   
                                "authSchemes",
 1894   1910   
                                vec![::aws_smithy_types::Document::from({
 1895         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1911  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1896   1912   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1897   1913   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1898   1914   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
 1899   1915   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
 1900   1916   
                                    out
 1901   1917   
                                })],
 1902   1918   
                            )
 1903   1919   
                            .build());
 1904   1920   
                    }
 1905   1921   
                }
 1906   1922   
                if (*use_fips) == (false) {
 1907   1923   
                    if (*use_dual_stack) == (false) {
 1908   1924   
                        #[allow(unused_variables)]
 1909   1925   
                        if let Some(requires_account_id) = requires_account_id {
 1910   1926   
                            if (*requires_account_id) == (true) {
 1911   1927   
                                #[allow(unused_variables)]
 1912   1928   
                                if let Some(account_id) = account_id {
 1913   1929   
                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1914   1930   
                                        .url({
 1915   1931   
                                            let mut out = String::new();
 1916   1932   
                                            out.push_str("https://");
 1917   1933   
                                            #[allow(clippy::needless_borrow)]
 1918   1934   
                                            out.push_str(&account_id.as_ref() as &str);
 1919   1935   
                                            out.push_str(".s3-control.");
 1920   1936   
                                            #[allow(clippy::needless_borrow)]
 1921   1937   
                                            out.push_str(&region.as_ref() as &str);
 1922   1938   
                                            out.push('.');
 1923   1939   
                                            #[allow(clippy::needless_borrow)]
 1924   1940   
                                            out.push_str(&partition_result.dns_suffix());
 1925   1941   
                                            out
 1926   1942   
                                        })
 1927   1943   
                                        .property(
 1928   1944   
                                            "authSchemes",
 1929   1945   
                                            vec![::aws_smithy_types::Document::from({
 1930         -
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1946  +
                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1931   1947   
                                                out.insert("disableDoubleEncoding".to_string(), true.into());
 1932   1948   
                                                out.insert("name".to_string(), "sigv4".to_string().into());
 1933   1949   
                                                out.insert("signingName".to_string(), "s3".to_string().into());
 1934   1950   
                                                out.insert("signingRegion".to_string(), region.to_owned().into());
 1935   1951   
                                                out
 1936   1952   
                                            })],
 1937   1953   
                                        )
 1938   1954   
                                        .build());
 1939   1955   
                                }
 1940   1956   
                            }
 1941   1957   
                        }
 1942   1958   
                    }
 1943   1959   
                }
 1944   1960   
                if (*use_fips) == (false) {
 1945   1961   
                    if (*use_dual_stack) == (false) {
 1946   1962   
                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
 1947   1963   
                            .url({
 1948   1964   
                                let mut out = String::new();
 1949   1965   
                                out.push_str("https://s3-control.");
 1950   1966   
                                #[allow(clippy::needless_borrow)]
 1951   1967   
                                out.push_str(&region.as_ref() as &str);
 1952   1968   
                                out.push('.');
 1953   1969   
                                #[allow(clippy::needless_borrow)]
 1954   1970   
                                out.push_str(&partition_result.dns_suffix());
 1955   1971   
                                out
 1956   1972   
                            })
 1957   1973   
                            .property(
 1958   1974   
                                "authSchemes",
 1959   1975   
                                vec![::aws_smithy_types::Document::from({
 1960         -
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
        1976  +
                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
 1961   1977   
                                    out.insert("disableDoubleEncoding".to_string(), true.into());
 1962   1978   
                                    out.insert("name".to_string(), "sigv4".to_string().into());
 1963   1979   
                                    out.insert("signingName".to_string(), "s3".to_string().into());
 1964   1980   
                                    out.insert("signingRegion".to_string(), region.to_owned().into());
 1965   1981   
                                    out
 1966   1982   
                                })],
 1967   1983   
                            )
 1968   1984   
                            .build());
 1969   1985   
                    }
 1970   1986   
                }

tmp-codegen-diff/aws-sdk/sdk/s3control/src/endpoint_lib/host.rs

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}

tmp-codegen-diff/aws-sdk/sdk/signin/Cargo.toml

@@ -1,1 +85,85 @@
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.5"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.11.1"
          45  +
version = "1.11.2"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.12.0"
          50  +
version = "1.12.1"
   51     51   
   52     52   
[dependencies.aws-smithy-types]
   53     53   
path = "../aws-smithy-types"
   54     54   
features = ["http-body-1-x"]
   55         -
version = "1.4.7"
          55  +
version = "1.4.8"
   56     56   
   57     57   
[dependencies.aws-types]
   58     58   
path = "../aws-types"
   59     59   
version = "1.3.15"
   60     60   
   61     61   
[dependencies.bytes]
   62     62   
version = "1.4.0"
   63     63   
   64     64   
[dependencies.fastrand]
   65     65   
version = "2.0.0"

tmp-codegen-diff/aws-sdk/sdk/signin/src/endpoint_lib/host.rs

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}

tmp-codegen-diff/aws-sdk/sdk/sso/Cargo.toml

@@ -1,1 +85,85 @@
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.5"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.11.1"
          45  +
version = "1.11.2"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.12.0"
          50  +
version = "1.12.1"
   51     51   
   52     52   
[dependencies.aws-smithy-types]
   53     53   
path = "../aws-smithy-types"
   54     54   
features = ["http-body-1-x"]
   55         -
version = "1.4.7"
          55  +
version = "1.4.8"
   56     56   
   57     57   
[dependencies.aws-types]
   58     58   
path = "../aws-types"
   59     59   
version = "1.3.15"
   60     60   
   61     61   
[dependencies.bytes]
   62     62   
version = "1.4.0"
   63     63   
   64     64   
[dependencies.fastrand]
   65     65   
version = "2.0.0"

tmp-codegen-diff/aws-sdk/sdk/sso/src/endpoint_lib/host.rs

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}

tmp-codegen-diff/aws-sdk/sdk/ssooidc/Cargo.toml

@@ -1,1 +85,85 @@
   14     14   
protocol = "aws.protocols#restJson1"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.5"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-runtime]
   43     43   
path = "../aws-smithy-runtime"
   44     44   
features = ["client"]
   45         -
version = "1.11.1"
          45  +
version = "1.11.2"
   46     46   
   47     47   
[dependencies.aws-smithy-runtime-api]
   48     48   
path = "../aws-smithy-runtime-api"
   49     49   
features = ["client", "http-1x"]
   50         -
version = "1.12.0"
          50  +
version = "1.12.1"
   51     51   
   52     52   
[dependencies.aws-smithy-types]
   53     53   
path = "../aws-smithy-types"
   54     54   
features = ["http-body-1-x"]
   55         -
version = "1.4.7"
          55  +
version = "1.4.8"
   56     56   
   57     57   
[dependencies.aws-types]
   58     58   
path = "../aws-types"
   59     59   
version = "1.3.15"
   60     60   
   61     61   
[dependencies.bytes]
   62     62   
version = "1.4.0"
   63     63   
   64     64   
[dependencies.fastrand]
   65     65   
version = "2.0.0"

tmp-codegen-diff/aws-sdk/sdk/ssooidc/src/endpoint_lib/host.rs

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}

tmp-codegen-diff/aws-sdk/sdk/sts/Cargo.toml

@@ -1,1 +151,151 @@
   14     14   
protocol = "aws.protocols#awsQuery"
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.14"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24         -
version = "1.7.3"
          24  +
version = "1.7.4"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.14"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.63.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.62.5"
   37     37   
   38     38   
[dependencies.aws-smithy-observability]
   39     39   
path = "../aws-smithy-observability"
   40     40   
version = "0.2.6"
   41     41   
   42     42   
[dependencies.aws-smithy-query]
   43     43   
path = "../aws-smithy-query"
   44     44   
version = "0.60.15"
   45     45   
   46     46   
[dependencies.aws-smithy-runtime]
   47     47   
path = "../aws-smithy-runtime"
   48     48   
features = ["client"]
   49         -
version = "1.11.1"
          49  +
version = "1.11.2"
   50     50   
   51     51   
[dependencies.aws-smithy-runtime-api]
   52     52   
path = "../aws-smithy-runtime-api"
   53     53   
features = ["client", "http-1x"]
   54         -
version = "1.12.0"
          54  +
version = "1.12.1"
   55     55   
   56     56   
[dependencies.aws-smithy-types]
   57     57   
path = "../aws-smithy-types"
   58     58   
features = ["http-body-1-x"]
   59         -
version = "1.4.7"
          59  +
version = "1.4.8"
   60     60   
   61     61   
[dependencies.aws-smithy-xml]
   62     62   
path = "../aws-smithy-xml"
   63     63   
version = "0.60.15"
   64     64   
   65     65   
[dependencies.aws-types]
   66     66   
path = "../aws-types"
   67     67   
version = "1.3.15"
   68     68   
   69     69   
[dependencies.fastrand]
   70     70   
version = "2.0.0"
   71     71   
   72     72   
[dependencies.http]
   73     73   
version = "0.2.9"
   74     74   
   75     75   
[dependencies.http-1x]
   76     76   
version = "1"
   77     77   
package = "http"
   78     78   
   79     79   
[dependencies.regex-lite]
   80     80   
version = "0.1.5"
   81     81   
   82     82   
[dependencies.tracing]
   83     83   
version = "0.1"
   84     84   
[dev-dependencies.aws-credential-types]
   85     85   
path = "../aws-credential-types"
   86     86   
features = ["test-util"]
   87     87   
version = "1.2.14"
   88     88   
   89     89   
[dev-dependencies.aws-runtime]
   90     90   
path = "../aws-runtime"
   91     91   
features = ["test-util"]
   92         -
version = "1.7.3"
          92  +
version = "1.7.4"
   93     93   
   94     94   
[dev-dependencies.aws-smithy-async]
   95     95   
path = "../aws-smithy-async"
   96     96   
features = ["test-util"]
   97     97   
version = "1.2.14"
   98     98   
   99     99   
[dev-dependencies.aws-smithy-http-client]
  100    100   
path = "../aws-smithy-http-client"
  101    101   
features = ["test-util", "wire-mock"]
  102    102   
version = "1.1.12"
  103    103   
  104    104   
[dev-dependencies.aws-smithy-protocol-test]
  105    105   
path = "../aws-smithy-protocol-test"
  106    106   
version = "0.63.14"
  107    107   
  108    108   
[dev-dependencies.aws-smithy-runtime]
  109    109   
path = "../aws-smithy-runtime"
  110    110   
features = ["test-util"]
  111         -
version = "1.11.1"
         111  +
version = "1.11.2"
  112    112   
  113    113   
[dev-dependencies.aws-smithy-runtime-api]
  114    114   
path = "../aws-smithy-runtime-api"
  115    115   
features = ["test-util"]
  116         -
version = "1.12.0"
         116  +
version = "1.12.1"
  117    117   
  118    118   
[dev-dependencies.aws-smithy-types]
  119    119   
path = "../aws-smithy-types"
  120    120   
features = ["http-body-1-x", "test-util"]
  121         -
version = "1.4.7"
         121  +
version = "1.4.8"
  122    122   
  123    123   
[dev-dependencies.futures-util]
  124    124   
version = "0.3.25"
  125    125   
features = ["alloc"]
  126    126   
default-features = false
  127    127   
  128    128   
[dev-dependencies.proptest]
  129    129   
version = "1"
  130    130   
  131    131   
[dev-dependencies.serde_json]

tmp-codegen-diff/aws-sdk/sdk/sts/src/config/endpoint/internals.rs

@@ -9,9 +317,317 @@
   29     29   
                #[allow(unused_variables)]
   30     30   
                if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
   31     31   
                    if (*use_fips) == (false) {
   32     32   
                        if (*use_dual_stack) == (false) {
   33     33   
                            if (region.as_ref() as &str) == ("ap-northeast-1") {
   34     34   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   35     35   
                                    .url("https://sts.amazonaws.com".to_string())
   36     36   
                                    .property(
   37     37   
                                        "authSchemes",
   38     38   
                                        vec![::aws_smithy_types::Document::from({
   39         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
          39  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
   40     40   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
   41     41   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
   42     42   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
   43     43   
                                            out
   44     44   
                                        })],
   45     45   
                                    )
   46     46   
                                    .build());
   47     47   
                            }
   48     48   
                            if (region.as_ref() as &str) == ("ap-south-1") {
   49     49   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   50     50   
                                    .url("https://sts.amazonaws.com".to_string())
   51     51   
                                    .property(
   52     52   
                                        "authSchemes",
   53     53   
                                        vec![::aws_smithy_types::Document::from({
   54         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
          54  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
   55     55   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
   56     56   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
   57     57   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
   58     58   
                                            out
   59     59   
                                        })],
   60     60   
                                    )
   61     61   
                                    .build());
   62     62   
                            }
   63     63   
                            if (region.as_ref() as &str) == ("ap-southeast-1") {
   64     64   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   65     65   
                                    .url("https://sts.amazonaws.com".to_string())
   66     66   
                                    .property(
   67     67   
                                        "authSchemes",
   68     68   
                                        vec![::aws_smithy_types::Document::from({
   69         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
          69  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
   70     70   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
   71     71   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
   72     72   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
   73     73   
                                            out
   74     74   
                                        })],
   75     75   
                                    )
   76     76   
                                    .build());
   77     77   
                            }
   78     78   
                            if (region.as_ref() as &str) == ("ap-southeast-2") {
   79     79   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   80     80   
                                    .url("https://sts.amazonaws.com".to_string())
   81     81   
                                    .property(
   82     82   
                                        "authSchemes",
   83     83   
                                        vec![::aws_smithy_types::Document::from({
   84         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
          84  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
   85     85   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
   86     86   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
   87     87   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
   88     88   
                                            out
   89     89   
                                        })],
   90     90   
                                    )
   91     91   
                                    .build());
   92     92   
                            }
   93     93   
                            if (region.as_ref() as &str) == ("aws-global") {
   94     94   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
   95     95   
                                    .url("https://sts.amazonaws.com".to_string())
   96     96   
                                    .property(
   97     97   
                                        "authSchemes",
   98     98   
                                        vec![::aws_smithy_types::Document::from({
   99         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
          99  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  100    100   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  101    101   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  102    102   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  103    103   
                                            out
  104    104   
                                        })],
  105    105   
                                    )
  106    106   
                                    .build());
  107    107   
                            }
  108    108   
                            if (region.as_ref() as &str) == ("ca-central-1") {
  109    109   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  110    110   
                                    .url("https://sts.amazonaws.com".to_string())
  111    111   
                                    .property(
  112    112   
                                        "authSchemes",
  113    113   
                                        vec![::aws_smithy_types::Document::from({
  114         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         114  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  115    115   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  116    116   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  117    117   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  118    118   
                                            out
  119    119   
                                        })],
  120    120   
                                    )
  121    121   
                                    .build());
  122    122   
                            }
  123    123   
                            if (region.as_ref() as &str) == ("eu-central-1") {
  124    124   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  125    125   
                                    .url("https://sts.amazonaws.com".to_string())
  126    126   
                                    .property(
  127    127   
                                        "authSchemes",
  128    128   
                                        vec![::aws_smithy_types::Document::from({
  129         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         129  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  130    130   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  131    131   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  132    132   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  133    133   
                                            out
  134    134   
                                        })],
  135    135   
                                    )
  136    136   
                                    .build());
  137    137   
                            }
  138    138   
                            if (region.as_ref() as &str) == ("eu-north-1") {
  139    139   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  140    140   
                                    .url("https://sts.amazonaws.com".to_string())
  141    141   
                                    .property(
  142    142   
                                        "authSchemes",
  143    143   
                                        vec![::aws_smithy_types::Document::from({
  144         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         144  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  145    145   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  146    146   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  147    147   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  148    148   
                                            out
  149    149   
                                        })],
  150    150   
                                    )
  151    151   
                                    .build());
  152    152   
                            }
  153    153   
                            if (region.as_ref() as &str) == ("eu-west-1") {
  154    154   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  155    155   
                                    .url("https://sts.amazonaws.com".to_string())
  156    156   
                                    .property(
  157    157   
                                        "authSchemes",
  158    158   
                                        vec![::aws_smithy_types::Document::from({
  159         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         159  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  160    160   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  161    161   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  162    162   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  163    163   
                                            out
  164    164   
                                        })],
  165    165   
                                    )
  166    166   
                                    .build());
  167    167   
                            }
  168    168   
                            if (region.as_ref() as &str) == ("eu-west-2") {
  169    169   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  170    170   
                                    .url("https://sts.amazonaws.com".to_string())
  171    171   
                                    .property(
  172    172   
                                        "authSchemes",
  173    173   
                                        vec![::aws_smithy_types::Document::from({
  174         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         174  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  175    175   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  176    176   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  177    177   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  178    178   
                                            out
  179    179   
                                        })],
  180    180   
                                    )
  181    181   
                                    .build());
  182    182   
                            }
  183    183   
                            if (region.as_ref() as &str) == ("eu-west-3") {
  184    184   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  185    185   
                                    .url("https://sts.amazonaws.com".to_string())
  186    186   
                                    .property(
  187    187   
                                        "authSchemes",
  188    188   
                                        vec![::aws_smithy_types::Document::from({
  189         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         189  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  190    190   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  191    191   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  192    192   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  193    193   
                                            out
  194    194   
                                        })],
  195    195   
                                    )
  196    196   
                                    .build());
  197    197   
                            }
  198    198   
                            if (region.as_ref() as &str) == ("sa-east-1") {
  199    199   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  200    200   
                                    .url("https://sts.amazonaws.com".to_string())
  201    201   
                                    .property(
  202    202   
                                        "authSchemes",
  203    203   
                                        vec![::aws_smithy_types::Document::from({
  204         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         204  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  205    205   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  206    206   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  207    207   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  208    208   
                                            out
  209    209   
                                        })],
  210    210   
                                    )
  211    211   
                                    .build());
  212    212   
                            }
  213    213   
                            if (region.as_ref() as &str) == ("us-east-1") {
  214    214   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  215    215   
                                    .url("https://sts.amazonaws.com".to_string())
  216    216   
                                    .property(
  217    217   
                                        "authSchemes",
  218    218   
                                        vec![::aws_smithy_types::Document::from({
  219         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         219  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  220    220   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  221    221   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  222    222   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  223    223   
                                            out
  224    224   
                                        })],
  225    225   
                                    )
  226    226   
                                    .build());
  227    227   
                            }
  228    228   
                            if (region.as_ref() as &str) == ("us-east-2") {
  229    229   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  230    230   
                                    .url("https://sts.amazonaws.com".to_string())
  231    231   
                                    .property(
  232    232   
                                        "authSchemes",
  233    233   
                                        vec![::aws_smithy_types::Document::from({
  234         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         234  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  235    235   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  236    236   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  237    237   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  238    238   
                                            out
  239    239   
                                        })],
  240    240   
                                    )
  241    241   
                                    .build());
  242    242   
                            }
  243    243   
                            if (region.as_ref() as &str) == ("us-west-1") {
  244    244   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  245    245   
                                    .url("https://sts.amazonaws.com".to_string())
  246    246   
                                    .property(
  247    247   
                                        "authSchemes",
  248    248   
                                        vec![::aws_smithy_types::Document::from({
  249         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         249  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  250    250   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  251    251   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  252    252   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  253    253   
                                            out
  254    254   
                                        })],
  255    255   
                                    )
  256    256   
                                    .build());
  257    257   
                            }
  258    258   
                            if (region.as_ref() as &str) == ("us-west-2") {
  259    259   
                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  260    260   
                                    .url("https://sts.amazonaws.com".to_string())
  261    261   
                                    .property(
  262    262   
                                        "authSchemes",
  263    263   
                                        vec![::aws_smithy_types::Document::from({
  264         -
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         264  +
                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  265    265   
                                            out.insert("name".to_string(), "sigv4".to_string().into());
  266    266   
                                            out.insert("signingName".to_string(), "sts".to_string().into());
  267    267   
                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  268    268   
                                            out
  269    269   
                                        })],
  270    270   
                                    )
  271    271   
                                    .build());
  272    272   
                            }
  273    273   
                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  274    274   
                                .url({
  275    275   
                                    let mut out = String::new();
  276    276   
                                    out.push_str("https://sts.");
  277    277   
                                    #[allow(clippy::needless_borrow)]
  278    278   
                                    out.push_str(&region.as_ref() as &str);
  279    279   
                                    out.push('.');
  280    280   
                                    #[allow(clippy::needless_borrow)]
  281    281   
                                    out.push_str(&partition_result.dns_suffix());
  282    282   
                                    out
  283    283   
                                })
  284    284   
                                .property(
  285    285   
                                    "authSchemes",
  286    286   
                                    vec![::aws_smithy_types::Document::from({
  287         -
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         287  +
                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  288    288   
                                        out.insert("name".to_string(), "sigv4".to_string().into());
  289    289   
                                        out.insert("signingName".to_string(), "sts".to_string().into());
  290    290   
                                        out.insert("signingRegion".to_string(), region.to_owned().into());
  291    291   
                                        out
  292    292   
                                    })],
  293    293   
                                )
  294    294   
                                .build());
  295    295   
                        }
  296    296   
                    }
  297    297   
                }
@@ -368,368 +428,428 @@
  388    388   
                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
  389    389   
                    "DualStack is enabled but this partition does not support DualStack".to_string(),
  390    390   
                ));
  391    391   
            }
  392    392   
            if (region.as_ref() as &str) == ("aws-global") {
  393    393   
                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  394    394   
                    .url("https://sts.amazonaws.com".to_string())
  395    395   
                    .property(
  396    396   
                        "authSchemes",
  397    397   
                        vec![::aws_smithy_types::Document::from({
  398         -
                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
         398  +
                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(3);
  399    399   
                            out.insert("name".to_string(), "sigv4".to_string().into());
  400    400   
                            out.insert("signingName".to_string(), "sts".to_string().into());
  401    401   
                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
  402    402   
                            out
  403    403   
                        })],
  404    404   
                    )
  405    405   
                    .build());
  406    406   
            }
  407    407   
            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
  408    408   
                .url({

tmp-codegen-diff/aws-sdk/sdk/sts/src/endpoint_lib/host.rs

@@ -1,1 +72,100 @@
    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   
    9      9   
pub(crate) fn is_valid_host_label(label: &str, allow_dots: bool, e: &mut DiagnosticCollector) -> bool {
          10  +
    let bytes = label.as_bytes();
   10     11   
    if allow_dots {
   11         -
        for part in label.split('.') {
   12         -
            if !is_valid_host_label(part, false, e) {
          12  +
        let mut start = 0;
          13  +
        for i in 0..bytes.len() {
          14  +
            if bytes[i] == b'.' {
          15  +
                if !is_valid_segment(bytes, start, i, e) {
   13     16   
                    return false;
   14     17   
                }
          18  +
                start = i + 1;
   15     19   
            }
   16         -
        true
          20  +
        }
          21  +
        is_valid_segment(bytes, start, bytes.len(), e)
   17     22   
    } else {
   18         -
        if label.is_empty() || label.len() > 63 {
          23  +
        is_valid_segment(bytes, 0, bytes.len(), e)
          24  +
    }
          25  +
}
          26  +
          27  +
#[inline]
          28  +
fn is_valid_segment(bytes: &[u8], start: usize, end: usize, e: &mut DiagnosticCollector) -> bool {
          29  +
    let len = end - start;
          30  +
    if len == 0 || len > 63 {
   19     31   
        e.report_error("host was too short or too long");
   20     32   
        return false;
   21     33   
    }
   22         -
        label.chars().enumerate().all(|(idx, ch)| match (ch, idx) {
   23         -
            ('-', 0) => {
          34  +
    if bytes[start] == b'-' {
   24     35   
        e.report_error("cannot start with `-`");
   25         -
                false
          36  +
        return false;
   26     37   
    }
   27         -
            _ => ch.is_alphanumeric() || ch == '-',
   28         -
        })
          38  +
    for &b in &bytes[start..end] {
          39  +
        if !b.is_ascii_alphanumeric() && b != b'-' {
          40  +
            return false;
   29     41   
        }
          42  +
    }
          43  +
    true
   30     44   
}
   31     45   
   32     46   
#[cfg(all(test, feature = "gated-tests"))]
   33     47   
mod test {
   34     48   
    use proptest::proptest;
   35     49   
   36     50   
    fn is_valid_host_label(label: &str, allow_dots: bool) -> bool {
   37     51   
        super::is_valid_host_label(label, allow_dots, &mut DiagnosticCollector::new())
   38     52   
    }
   39     53   
   40     54   
    #[allow(clippy::bool_assert_comparison)]
   41     55   
    #[test]
   42     56   
    fn basic_cases() {
   43     57   
        assert_eq!(is_valid_host_label("", false), false);
   44     58   
        assert_eq!(is_valid_host_label("", true), false);
   45     59   
        assert_eq!(is_valid_host_label(".", true), false);
   46     60   
        assert_eq!(is_valid_host_label("a.b", true), true);
   47     61   
        assert_eq!(is_valid_host_label("a.b", false), false);
   48     62   
        assert_eq!(is_valid_host_label("a.b.", true), false);
   49     63   
        assert_eq!(is_valid_host_label("a.b.c", true), true);
   50     64   
        assert_eq!(is_valid_host_label("a_b", true), false);
   51     65   
        assert_eq!(is_valid_host_label(&"a".repeat(64), false), false);
   52     66   
        assert_eq!(is_valid_host_label(&format!("{}.{}", "a".repeat(63), "a".repeat(63)), true), true);
   53     67   
    }
   54     68   
   55     69   
    #[allow(clippy::bool_assert_comparison)]
   56     70   
    #[test]
   57     71   
    fn start_bounds() {
   58     72   
        assert_eq!(is_valid_host_label("-foo", false), false);
   59     73   
        assert_eq!(is_valid_host_label("-foo", true), false);
   60     74   
        assert_eq!(is_valid_host_label(".foo", true), false);
   61     75   
        assert_eq!(is_valid_host_label("a-b.foo", true), true);
   62     76   
    }
   63     77   
          78  +
    #[allow(clippy::bool_assert_comparison)]
          79  +
    #[test]
          80  +
    fn non_ascii_rejected() {
          81  +
        // DNS host labels only allow ASCII alphanumeric and hyphens (RFC 952/1123)
          82  +
        assert_eq!(is_valid_host_label("café", false), false);
          83  +
        assert_eq!(is_valid_host_label("bücher", false), false);
          84  +
        assert_eq!(is_valid_host_label("日本語", false), false);
          85  +
        assert_eq!(is_valid_host_label("a.café.b", true), false);
          86  +
        assert_eq!(is_valid_host_label("🚀rocket", false), false);
          87  +
        // ASCII is fine
          88  +
        assert_eq!(is_valid_host_label("abc123", false), true);
          89  +
        assert_eq!(is_valid_host_label("a-b-c", false), true);
          90  +
    }
          91  +
   64     92   
    use crate::endpoint_lib::diagnostic::DiagnosticCollector;
   65     93   
    use proptest::prelude::*;
   66     94   
    proptest! {
   67     95   
        #[test]
   68     96   
        fn no_panics(s in any::<String>(), dots in any::<bool>()) {
   69     97   
            is_valid_host_label(&s, dots);
   70     98   
        }
   71     99   
    }
   72    100   
}