Client Test

Client Test

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_structure_name_punning.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_structure_name_punning_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::structure_name_punning::StructureNamePunningOutput,
    9         -
    crate::operation::structure_name_punning::StructureNamePunningError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::structure_name_punning::StructureNamePunningError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::structure_name_punning::StructureNamePunningError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_structure_name_punning_http_response(
   20         -
    _response_status: u16,
   21         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22         -
    _response_body: &[u8],
   23         -
) -> std::result::Result<
   24         -
    crate::operation::structure_name_punning::StructureNamePunningOutput,
   25         -
    crate::operation::structure_name_punning::StructureNamePunningError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::structure_name_punning::builders::StructureNamePunningOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_structure_name_punning_input(
   35         -
    input: &crate::operation::structure_name_punning::StructureNamePunningInput,
   36         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   37         -
    let mut out = String::new();
   38         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   39         -
    crate::protocol_serde::shape_structure_name_punning_input::ser_structure_name_punning_input_input(&mut object, input)?;
   40         -
    object.finish();
   41         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   42         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_structure_name_punning_input.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_structure_name_punning_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::structure_name_punning::StructureNamePunningInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.regular_string {
    7         -
        object.key("regular_string").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.punned_vec {
   10         -
        #[allow(unused_mut)]
   11         -
        let mut object_3 = object.key("punned_vec").start_object();
   12         -
        crate::protocol_serde::shape_vec::ser_vec(&mut object_3, var_2)?;
   13         -
        object_3.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_validation_exception.rs

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_validation_exception_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ValidationExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ValidationExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                "fieldList" => {
   21         -
                    builder = builder.set_field_list(
   22         -
                        crate::protocol_serde::shape_validation_exception_field_list::de_validation_exception_field_list(tokens, _value)?,
   23         -
                    );
   24         -
                }
   25         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   26         -
            },
   27         -
            other => {
   28         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   29         -
                    "expected object key or end object, found: {other:?}"
   30         -
                )))
   31         -
            }
   32         -
        }
   33         -
    }
   34         -
    if tokens.next().is_some() {
   35         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36         -
            "found more JSON tokens after completing parsing",
   37         -
        ));
   38         -
    }
   39         -
    Ok(builder)
   40         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_validation_exception_field.rs

@@ -1,0 +51,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_validation_exception_field<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ValidationExceptionField>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::ValidationExceptionFieldBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "path" => {
   19         -
                            builder = builder.set_path(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        "message" => {
   26         -
                            builder = builder.set_message(
   27         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                                    .transpose()?,
   30         -
                            );
   31         -
                        }
   32         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {other:?}"
   37         -
                        )))
   38         -
                    }
   39         -
                }
   40         -
            }
   41         -
            Ok(Some(
   42         -
                crate::serde_util::validation_exception_field_correct_errors(builder)
   43         -
                    .build()
   44         -
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   45         -
            ))
   46         -
        }
   47         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
            "expected start object or null",
   49         -
        )),
   50         -
    }
   51         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_validation_exception_field_list.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_validation_exception_field_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::ValidationExceptionField>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   12         -
            let mut items = Vec::new();
   13         -
            loop {
   14         -
                match tokens.peek() {
   15         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   16         -
                        tokens.next().transpose().unwrap();
   17         -
                        break;
   18         -
                    }
   19         -
                    _ => {
   20         -
                        let value = crate::protocol_serde::shape_validation_exception_field::de_validation_exception_field(tokens, _value)?;
   21         -
                        if let Some(value) = value {
   22         -
                            items.push(value);
   23         -
                        } else {
   24         -
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   25         -
                                "dense list cannot contain null values",
   26         -
                            ));
   27         -
                        }
   28         -
                    }
   29         -
                }
   30         -
            }
   31         -
            Ok(Some(items))
   32         -
        }
   33         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   34         -
            "expected start array or null",
   35         -
        )),
   36         -
    }
   37         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/protocol_serde/shape_vec.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_vec(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Vec,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.pv_member {
    7         -
        object.key("pv_member").boolean(*var_1);
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/serde_util.rs

@@ -1,0 +21,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn validation_exception_correct_errors(
    3         -
    mut builder: crate::types::error::builders::ValidationExceptionBuilder,
    4         -
) -> crate::types::error::builders::ValidationExceptionBuilder {
    5         -
    if builder.message.is_none() {
    6         -
        builder.message = Some(Default::default())
    7         -
    }
    8         -
    builder
    9         -
}
   10         -
   11         -
pub(crate) fn validation_exception_field_correct_errors(
   12         -
    mut builder: crate::types::builders::ValidationExceptionFieldBuilder,
   13         -
) -> crate::types::builders::ValidationExceptionFieldBuilder {
   14         -
    if builder.path.is_none() {
   15         -
        builder.path = Some(Default::default())
   16         -
    }
   17         -
    if builder.message.is_none() {
   18         -
        builder.message = Some(Default::default())
   19         -
    }
   20         -
    builder
   21         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/serialization_settings.rs

@@ -1,0 +89,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/*
    3         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4         -
 * SPDX-License-Identifier: Apache-2.0
    5         -
 */
    6         -
    7         -
#![allow(dead_code)]
    8         -
    9         -
use aws_smithy_http::header::set_request_header_if_absent;
   10         -
use aws_smithy_types::config_bag::{Storable, StoreReplace};
   11         -
use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
   12         -
   13         -
/// Configuration for how default protocol headers are serialized
   14         -
#[derive(Clone, Debug, Default)]
   15         -
pub(crate) struct HeaderSerializationSettings {
   16         -
    omit_default_content_length: bool,
   17         -
    omit_default_content_type: bool,
   18         -
}
   19         -
   20         -
impl HeaderSerializationSettings {
   21         -
    /// Creates new [`HeaderSerializationSettings`]
   22         -
    pub(crate) fn new() -> Self {
   23         -
        Default::default()
   24         -
    }
   25         -
   26         -
    /// Omit the default `Content-Length` header during serialization
   27         -
    pub(crate) fn omit_default_content_length(self) -> Self {
   28         -
        Self {
   29         -
            omit_default_content_length: true,
   30         -
            ..self
   31         -
        }
   32         -
    }
   33         -
   34         -
    /// Omit the default `Content-Type` header during serialization
   35         -
    pub(crate) fn omit_default_content_type(self) -> Self {
   36         -
        Self {
   37         -
            omit_default_content_type: true,
   38         -
            ..self
   39         -
        }
   40         -
    }
   41         -
   42         -
    /// Returns true if the given default header name should be serialized
   43         -
    fn include_header(&self, header: &HeaderName) -> bool {
   44         -
        (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE)
   45         -
    }
   46         -
   47         -
    /// Sets a default header on the given request builder if it should be serialized
   48         -
    pub(crate) fn set_default_header(
   49         -
        &self,
   50         -
        mut request: http_1x::request::Builder,
   51         -
        header_name: HeaderName,
   52         -
        value: &str,
   53         -
    ) -> http_1x::request::Builder {
   54         -
        if self.include_header(&header_name) {
   55         -
            request = set_request_header_if_absent(request, header_name, value);
   56         -
        }
   57         -
        request
   58         -
    }
   59         -
}
   60         -
   61         -
impl Storable for HeaderSerializationSettings {
   62         -
    type Storer = StoreReplace<Self>;
   63         -
}
   64         -
   65         -
#[cfg(test)]
   66         -
mod tests {
   67         -
    use super::*;
   68         -
   69         -
    #[test]
   70         -
    fn test_include_header() {
   71         -
        let settings = HeaderSerializationSettings::default();
   72         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   73         -
        assert!(settings.include_header(&CONTENT_TYPE));
   74         -
   75         -
        let settings = HeaderSerializationSettings::default().omit_default_content_length();
   76         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   77         -
        assert!(settings.include_header(&CONTENT_TYPE));
   78         -
   79         -
        let settings = HeaderSerializationSettings::default().omit_default_content_type();
   80         -
        assert!(settings.include_header(&CONTENT_LENGTH));
   81         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   82         -
   83         -
        let settings = HeaderSerializationSettings::default()
   84         -
            .omit_default_content_type()
   85         -
            .omit_default_content_length();
   86         -
        assert!(!settings.include_header(&CONTENT_LENGTH));
   87         -
        assert!(!settings.include_header(&CONTENT_TYPE));
   88         -
    }
   89         -
}

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/types/_validation_exception_field.rs

@@ -47,47 +135,148 @@
   67     67   
        }
   68     68   
        {
   69     69   
            let val = &self.message;
   70     70   
            ser.write_string(&VALIDATIONEXCEPTIONFIELD_MEMBER_MESSAGE, val)?;
   71     71   
        }
   72     72   
        Ok(())
   73     73   
    }
   74     74   
}
   75     75   
impl ValidationExceptionField {
   76     76   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   77         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   78         -
        deserializer: &mut D,
          77  +
    pub fn deserialize(
          78  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   79     79   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   80     80   
        #[allow(unused_variables, unused_mut)]
   81     81   
        let mut builder = Self::builder();
   82     82   
        #[allow(
   83     83   
            unused_variables,
   84     84   
            unreachable_code,
   85     85   
            clippy::single_match,
   86     86   
            clippy::match_single_binding,
   87     87   
            clippy::diverging_sub_expression
   88     88   
        )]
   89         -
        deserializer.read_struct(&VALIDATIONEXCEPTIONFIELD_SCHEMA, (), |_, member, deser| {
          89  +
        deserializer.read_struct(&VALIDATIONEXCEPTIONFIELD_SCHEMA, &mut |member, deser| {
   90     90   
            match member.member_index() {
   91     91   
                Some(0) => {
   92     92   
                    builder.path = Some(deser.read_string(member)?);
   93     93   
                }
   94     94   
                Some(1) => {
   95     95   
                    builder.message = Some(deser.read_string(member)?);
   96     96   
                }
   97     97   
                _ => {}
   98     98   
            }
   99     99   
            Ok(())
  100    100   
        })?;
         101  +
        builder.path = builder.path.or(Some(String::new()));
         102  +
        builder.message = builder.message.or(Some(String::new()));
  101    103   
        builder
  102    104   
            .build()
  103    105   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  104    106   
    }
  105    107   
}
         108  +
impl ValidationExceptionField {
         109  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         110  +
    pub fn deserialize_with_response(
         111  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         112  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         113  +
        _status: u16,
         114  +
        _body: &[u8],
         115  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         116  +
        Self::deserialize(deserializer)
         117  +
    }
         118  +
}
  106    119   
impl ValidationExceptionField {
  107    120   
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
  108    121   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
  109    122   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
  110    123   
    }
  111    124   
}
  112    125   
  113    126   
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
  114    127   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  115    128   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/types/_vec.rs

@@ -12,12 +95,106 @@
   32     32   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   33     33   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   34     34   
        if let Some(ref val) = self.pv_member {
   35     35   
            ser.write_boolean(&VEC_MEMBER_PV_MEMBER, *val)?;
   36     36   
        }
   37     37   
        Ok(())
   38     38   
    }
   39     39   
}
   40     40   
impl Vec {
   41     41   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   42         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   43         -
        deserializer: &mut D,
          42  +
    pub fn deserialize(
          43  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   44     44   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        #[allow(unused_variables, unused_mut)]
   46     46   
        let mut builder = Self::builder();
   47     47   
        #[allow(
   48     48   
            unused_variables,
   49     49   
            unreachable_code,
   50     50   
            clippy::single_match,
   51     51   
            clippy::match_single_binding,
   52     52   
            clippy::diverging_sub_expression
   53     53   
        )]
   54         -
        deserializer.read_struct(&VEC_SCHEMA, (), |_, member, deser| {
          54  +
        deserializer.read_struct(&VEC_SCHEMA, &mut |member, deser| {
   55     55   
            match member.member_index() {
   56     56   
                Some(0) => {
   57     57   
                    builder.pv_member = Some(deser.read_boolean(member)?);
   58     58   
                }
   59     59   
                _ => {}
   60     60   
            }
   61     61   
            Ok(())
   62     62   
        })?;
   63     63   
        Ok(builder.build())
   64     64   
    }
   65     65   
}
          66  +
impl Vec {
          67  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          68  +
    pub fn deserialize_with_response(
          69  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        Self::deserialize(deserializer)
          75  +
    }
          76  +
}
   66     77   
impl Vec {
   67     78   
    /// Creates a new builder-style object to manufacture [`Vec`](crate::types::Vec).
   68     79   
    pub fn builder() -> crate::types::builders::VecBuilder {
   69     80   
        crate::types::builders::VecBuilder::default()
   70     81   
    }
   71     82   
}
   72     83   
   73     84   
/// A builder for [`Vec`](crate::types::Vec).
   74     85   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   75     86   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/types/error/_colliding_error.rs

@@ -1,1 +94,105 @@
    5      5   
pub struct CollidingError {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub message: ::std::option::Option<::std::string::String>,
    8      8   
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
    9      9   
}
   10     10   
static COLLIDINGERROR_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   11     11   
    ::aws_smithy_schema::ShapeId::from_static("crate#CollidingError", "crate", "CollidingError");
   12     12   
static COLLIDINGERROR_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   13     13   
    ::aws_smithy_schema::ShapeId::from_static("crate#CollidingError$Message", "crate", "CollidingError"),
   14     14   
    ::aws_smithy_schema::ShapeType::String,
   15         -
    "message",
          15  +
    "Message",
   16     16   
    0,
   17     17   
);
   18     18   
static COLLIDINGERROR_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   19     19   
    COLLIDINGERROR_SCHEMA_ID,
   20     20   
    ::aws_smithy_schema::ShapeType::Structure,
   21     21   
    &[&COLLIDINGERROR_MEMBER_MESSAGE],
   22     22   
);
   23     23   
impl CollidingError {
   24     24   
    /// The schema for this shape.
   25     25   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COLLIDINGERROR_SCHEMA;
   26     26   
}
   27     27   
impl ::aws_smithy_schema::serde::SerializableStruct for CollidingError {
   28     28   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   29     29   
    fn serialize_members(
   30     30   
        &self,
   31     31   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   32     32   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   33     33   
        if let Some(ref val) = self.message {
   34     34   
            ser.write_string(&COLLIDINGERROR_MEMBER_MESSAGE, val)?;
   35     35   
        }
   36     36   
        Ok(())
   37     37   
    }
   38     38   
}
   39     39   
impl CollidingError {
   40     40   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   41         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   42         -
        deserializer: &mut D,
          41  +
    pub fn deserialize(
          42  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   43     43   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   44     44   
        #[allow(unused_variables, unused_mut)]
   45     45   
        let mut builder = Self::builder();
   46     46   
        #[allow(
   47     47   
            unused_variables,
   48     48   
            unreachable_code,
   49     49   
            clippy::single_match,
   50     50   
            clippy::match_single_binding,
   51     51   
            clippy::diverging_sub_expression
   52     52   
        )]
   53         -
        deserializer.read_struct(&COLLIDINGERROR_SCHEMA, (), |_, member, deser| {
          53  +
        deserializer.read_struct(&COLLIDINGERROR_SCHEMA, &mut |member, deser| {
   54     54   
            match member.member_index() {
   55     55   
                Some(0) => {
   56     56   
                    builder.message = Some(deser.read_string(member)?);
   57     57   
                }
   58     58   
                _ => {}
   59     59   
            }
   60     60   
            Ok(())
   61     61   
        })?;
   62     62   
        Ok(builder.build())
   63     63   
    }
   64     64   
}
          65  +
impl CollidingError {
          66  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          67  +
    pub fn deserialize_with_response(
          68  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          69  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          70  +
        _status: u16,
          71  +
        _body: &[u8],
          72  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          73  +
        Self::deserialize(deserializer)
          74  +
    }
          75  +
}
   65     76   
impl CollidingError {
   66     77   
    /// Returns the error message.
   67     78   
    pub fn message(&self) -> ::std::option::Option<&str> {
   68     79   
        self.message.as_deref()
   69     80   
    }
   70     81   
}
   71     82   
impl ::std::fmt::Display for CollidingError {
   72     83   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   73     84   
        ::std::write!(f, "CollidingError")?;
   74     85   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/types/error/_colliding_exception.rs

@@ -1,1 +95,106 @@
    6      6   
pub struct CollidingException {
    7      7   
    #[allow(missing_docs)] // documentation missing in model
    8      8   
    pub message: ::std::option::Option<::std::string::String>,
    9      9   
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
   10     10   
}
   11     11   
static COLLIDINGEXCEPTION_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   12     12   
    ::aws_smithy_schema::ShapeId::from_static("crate#CollidingException", "crate", "CollidingException");
   13     13   
static COLLIDINGEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   14     14   
    ::aws_smithy_schema::ShapeId::from_static("crate#CollidingException$Message", "crate", "CollidingException"),
   15     15   
    ::aws_smithy_schema::ShapeType::String,
   16         -
    "message",
          16  +
    "Message",
   17     17   
    0,
   18     18   
);
   19     19   
static COLLIDINGEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   20     20   
    COLLIDINGEXCEPTION_SCHEMA_ID,
   21     21   
    ::aws_smithy_schema::ShapeType::Structure,
   22     22   
    &[&COLLIDINGEXCEPTION_MEMBER_MESSAGE],
   23     23   
);
   24     24   
impl CollidingException {
   25     25   
    /// The schema for this shape.
   26     26   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COLLIDINGEXCEPTION_SCHEMA;
   27     27   
}
   28     28   
impl ::aws_smithy_schema::serde::SerializableStruct for CollidingException {
   29     29   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   30     30   
    fn serialize_members(
   31     31   
        &self,
   32     32   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   33     33   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   34     34   
        if let Some(ref val) = self.message {
   35     35   
            ser.write_string(&COLLIDINGEXCEPTION_MEMBER_MESSAGE, val)?;
   36     36   
        }
   37     37   
        Ok(())
   38     38   
    }
   39     39   
}
   40     40   
impl CollidingException {
   41     41   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   42         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   43         -
        deserializer: &mut D,
          42  +
    pub fn deserialize(
          43  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   44     44   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        #[allow(unused_variables, unused_mut)]
   46     46   
        let mut builder = Self::builder();
   47     47   
        #[allow(
   48     48   
            unused_variables,
   49     49   
            unreachable_code,
   50     50   
            clippy::single_match,
   51     51   
            clippy::match_single_binding,
   52     52   
            clippy::diverging_sub_expression
   53     53   
        )]
   54         -
        deserializer.read_struct(&COLLIDINGEXCEPTION_SCHEMA, (), |_, member, deser| {
          54  +
        deserializer.read_struct(&COLLIDINGEXCEPTION_SCHEMA, &mut |member, deser| {
   55     55   
            match member.member_index() {
   56     56   
                Some(0) => {
   57     57   
                    builder.message = Some(deser.read_string(member)?);
   58     58   
                }
   59     59   
                _ => {}
   60     60   
            }
   61     61   
            Ok(())
   62     62   
        })?;
   63     63   
        Ok(builder.build())
   64     64   
    }
   65     65   
}
          66  +
impl CollidingException {
          67  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          68  +
    pub fn deserialize_with_response(
          69  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        Self::deserialize(deserializer)
          75  +
    }
          76  +
}
   66     77   
impl CollidingException {
   67     78   
    /// Returns the error message.
   68     79   
    pub fn message(&self) -> ::std::option::Option<&str> {
   69     80   
        self.message.as_deref()
   70     81   
    }
   71     82   
}
   72     83   
impl ::std::fmt::Display for CollidingException {
   73     84   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   74     85   
        ::std::write!(f, "CollidingException")?;
   75     86   
        if let ::std::option::Option::Some(inner_1) = &self.message {

tmp-codegen-diff/codegen-client-test/naming_test_ops/rust-client-codegen/src/types/error/_validation_exception.rs

@@ -6,6 +142,151 @@
   26     26   
    "message",
   27     27   
    0,
   28     28   
);
   29     29   
static VALIDATIONEXCEPTION_MEMBER_FIELD_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "smithy.framework#ValidationException$fieldList",
   32     32   
        "smithy.framework",
   33     33   
        "ValidationException",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::List,
   36         -
    "field_list",
          36  +
    "fieldList",
   37     37   
    1,
   38     38   
);
   39     39   
static VALIDATIONEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   40     40   
    VALIDATIONEXCEPTION_SCHEMA_ID,
   41     41   
    ::aws_smithy_schema::ShapeType::Structure,
   42     42   
    &[&VALIDATIONEXCEPTION_MEMBER_MESSAGE, &VALIDATIONEXCEPTION_MEMBER_FIELD_LIST],
   43     43   
);
   44     44   
impl ValidationException {
   45     45   
    /// The schema for this shape.
   46     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &VALIDATIONEXCEPTION_SCHEMA;
   47     47   
}
   48     48   
impl ::aws_smithy_schema::serde::SerializableStruct for ValidationException {
   49     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   50     50   
    fn serialize_members(
   51     51   
        &self,
   52     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   53     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   54     54   
        {
   55     55   
            let val = &self.message;
   56     56   
            ser.write_string(&VALIDATIONEXCEPTION_MEMBER_MESSAGE, val)?;
   57     57   
        }
   58     58   
        if let Some(ref val) = self.field_list {
   59     59   
            ser.write_list(
   60     60   
                &VALIDATIONEXCEPTION_MEMBER_FIELD_LIST,
   61     61   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   62     62   
                    for item in val {
   63     63   
                        ser.write_struct(crate::types::ValidationExceptionField::SCHEMA, item)?;
   64     64   
                    }
   65     65   
                    Ok(())
   66     66   
                },
   67     67   
            )?;
   68     68   
        }
   69     69   
        Ok(())
   70     70   
    }
   71     71   
}
   72     72   
impl ValidationException {
   73     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   74         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   75         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   76     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   77     77   
        #[allow(unused_variables, unused_mut)]
   78     78   
        let mut builder = Self::builder();
   79     79   
        #[allow(
   80     80   
            unused_variables,
   81     81   
            unreachable_code,
   82     82   
            clippy::single_match,
   83     83   
            clippy::match_single_binding,
   84     84   
            clippy::diverging_sub_expression
   85     85   
        )]
   86         -
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&VALIDATIONEXCEPTION_SCHEMA, &mut |member, deser| {
   87     87   
            match member.member_index() {
   88     88   
                Some(0) => {
   89     89   
                    builder.message = Some(deser.read_string(member)?);
   90     90   
                }
   91     91   
                Some(1) => {
   92     92   
                    builder.field_list = Some({
   93         -
                        let container = if let Some(cap) = deser.container_size() {
   94         -
                            Vec::with_capacity(cap)
   95         -
                        } else {
   96         -
                            Vec::new()
   97         -
                        };
   98         -
                        deser.read_list(member, container, |mut list, deser| {
   99         -
                            list.push(crate::types::ValidationExceptionField::deserialize(deser)?);
  100         -
                            Ok(list)
  101         -
                        })?
          93  +
                        let mut container = Vec::new();
          94  +
                        deser.read_list(member, &mut |deser| {
          95  +
                            container.push(crate::types::ValidationExceptionField::deserialize(deser)?);
          96  +
                            Ok(())
          97  +
                        })?;
          98  +
                        container
  102     99   
                    });
  103    100   
                }
  104    101   
                _ => {}
  105    102   
            }
  106    103   
            Ok(())
  107    104   
        })?;
         105  +
        builder.message = builder.message.or(Some(String::new()));
  108    106   
        builder
  109    107   
            .build()
  110    108   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  111    109   
    }
  112    110   
}
         111  +
impl ValidationException {
         112  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         113  +
    pub fn deserialize_with_response(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         116  +
        _status: u16,
         117  +
        _body: &[u8],
         118  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         119  +
        Self::deserialize(deserializer)
         120  +
    }
         121  +
}
  113    122   
impl ValidationException {
  114    123   
    /// Returns the error message.
  115    124   
    pub fn message(&self) -> &str {
  116    125   
        &self.message
  117    126   
    }
  118    127   
}
  119    128   
impl ::std::fmt::Display for ValidationException {
  120    129   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  121    130   
        ::std::write!(f, "ValidationException")?;
  122    131   
        {

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/Cargo.toml

@@ -1,1 +45,43 @@
    4      4   
version = "0.0.1"
    5      5   
authors = ["protocoltest@example.com"]
    6      6   
description = "test"
    7      7   
edition = "2021"
    8      8   
    9      9   
[package.metadata.smithy]
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#awsJson1_1"
   12     12   
[dependencies.aws-smithy-async]
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-async"
   14         -
[dependencies.aws-smithy-http]
   15         -
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   16     14   
[dependencies.aws-smithy-json]
   17     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   18     16   
[dependencies.aws-smithy-runtime]
   19     17   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   20     18   
features = ["client"]
   21     19   
[dependencies.aws-smithy-runtime-api]
   22     20   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   23     21   
features = ["client", "http-1x"]
   24     22   
[dependencies.aws-smithy-schema]
   25     23   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-schema"

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/src/config.rs

@@ -10,10 +69,73 @@
   30     30   
            config: self.cloneable.clone(),
   31     31   
            runtime_components: self.runtime_components.clone(),
   32     32   
            runtime_plugins: self.runtime_plugins.clone(),
   33     33   
            behavior_version: self.behavior_version,
   34     34   
        }
   35     35   
    }
   36     36   
    /// Return a reference to the stalled stream protection configuration contained in this config, if any.
   37     37   
    pub fn stalled_stream_protection(&self) -> ::std::option::Option<&crate::config::StalledStreamProtectionConfig> {
   38     38   
        self.config.load::<crate::config::StalledStreamProtectionConfig>()
   39     39   
    }
          40  +
    /// Returns the client protocol used for serialization and deserialization.
          41  +
    pub fn protocol(&self) -> ::std::option::Option<&::aws_smithy_schema::protocol::SharedClientProtocol> {
          42  +
        self.config.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
          43  +
    }
   40     44   
    /// Return the [`SharedHttpClient`](crate::config::SharedHttpClient) to use when making requests, if any.
   41     45   
    pub fn http_client(&self) -> Option<crate::config::SharedHttpClient> {
   42     46   
        self.runtime_components.http_client()
   43     47   
    }
   44     48   
    /// Return the auth schemes configured on this service config
   45     49   
    pub fn auth_schemes(&self) -> impl Iterator<Item = ::aws_smithy_runtime_api::client::auth::SharedAuthScheme> + '_ {
   46     50   
        self.runtime_components.auth_schemes()
   47     51   
    }
   48     52   
   49     53   
    /// Return the auth scheme resolver configured on this service config
@@ -105,109 +185,208 @@
  125    129   
    ///
  126    130   
    pub fn new() -> Self {
  127    131   
        Self::default()
  128    132   
    }
  129    133   
    /// Constructs a config builder from the given `config_bag`, setting only fields stored in the config bag,
  130    134   
    /// but not those in runtime components.
  131    135   
    #[allow(unused)]
  132    136   
    pub(crate) fn from_config_bag(config_bag: &::aws_smithy_types::config_bag::ConfigBag) -> Self {
  133    137   
        let mut builder = Self::new();
  134    138   
        builder.set_stalled_stream_protection(config_bag.load::<crate::config::StalledStreamProtectionConfig>().cloned());
         139  +
        if let ::std::option::Option::Some(protocol) = config_bag.load::<::aws_smithy_schema::protocol::SharedClientProtocol>().cloned() {
         140  +
            builder.set_protocol(::std::option::Option::Some(protocol));
         141  +
        }
  135    142   
        builder.set_auth_scheme_preference(config_bag.load::<::aws_smithy_runtime_api::client::auth::AuthSchemePreference>().cloned());
  136    143   
        builder.set_retry_config(config_bag.load::<::aws_smithy_types::retry::RetryConfig>().cloned());
  137    144   
        builder.set_timeout_config(config_bag.load::<::aws_smithy_types::timeout::TimeoutConfig>().cloned());
  138    145   
        builder.set_retry_partition(config_bag.load::<::aws_smithy_runtime::client::retries::RetryPartition>().cloned());
  139    146   
        builder
  140    147   
    }
  141    148   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  142    149   
    /// to configure protection for stalled streams.
  143    150   
    pub fn stalled_stream_protection(mut self, stalled_stream_protection_config: crate::config::StalledStreamProtectionConfig) -> Self {
  144    151   
        self.set_stalled_stream_protection(::std::option::Option::Some(stalled_stream_protection_config));
  145    152   
        self
  146    153   
    }
  147    154   
    /// Set the [`StalledStreamProtectionConfig`](crate::config::StalledStreamProtectionConfig)
  148    155   
    /// to configure protection for stalled streams.
  149    156   
    pub fn set_stalled_stream_protection(
  150    157   
        &mut self,
  151    158   
        stalled_stream_protection_config: ::std::option::Option<crate::config::StalledStreamProtectionConfig>,
  152    159   
    ) -> &mut Self {
  153    160   
        self.config.store_or_unset(stalled_stream_protection_config);
  154    161   
        self
  155    162   
    }
         163  +
    /// Sets the client protocol to use for serialization and deserialization.
         164  +
    ///
         165  +
    /// This overrides the default protocol determined by the service model,
         166  +
    /// enabling runtime protocol selection.
         167  +
    pub fn protocol(mut self, protocol: impl ::aws_smithy_schema::protocol::ClientProtocol + 'static) -> Self {
         168  +
        self.set_protocol(::std::option::Option::Some(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         169  +
            protocol,
         170  +
        )));
         171  +
        self
         172  +
    }
         173  +
         174  +
    /// Sets the client protocol to use for serialization and deserialization.
         175  +
    pub fn set_protocol(&mut self, protocol: ::std::option::Option<::aws_smithy_schema::protocol::SharedClientProtocol>) -> &mut Self {
         176  +
        self.config.store_or_unset(protocol);
         177  +
        self
         178  +
    }
  156    179   
    /// Sets the HTTP client to use when making requests.
  157    180   
    ///
  158    181   
    /// # Examples
  159    182   
    /// ```no_run
  160    183   
    /// # #[cfg(test)]
  161    184   
    /// # mod tests {
  162    185   
    /// # #[test]
  163    186   
    /// # fn example() {
  164    187   
    /// use std::time::Duration;
  165    188   
    /// use naming_test_structs::config::Config;
@@ -1116,1139 +1175,1203 @@
 1136   1159   
#[derive(::std::fmt::Debug)]
 1137   1160   
pub(crate) struct ServiceRuntimePlugin {
 1138   1161   
    config: ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer>,
 1139   1162   
    runtime_components: ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
 1140   1163   
}
 1141   1164   
 1142   1165   
impl ServiceRuntimePlugin {
 1143   1166   
    pub fn new(_service_config: crate::config::Config) -> Self {
 1144   1167   
        let config = {
 1145   1168   
            let mut cfg = ::aws_smithy_types::config_bag::Layer::new("NamingObstacleCourseStructs");
        1169  +
            if _service_config.protocol().is_none() {
        1170  +
                cfg.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
        1171  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("NamingObstacleCourseStructs"),
        1172  +
                ));
        1173  +
            }
 1146   1174   
            cfg.store_put(::aws_smithy_runtime::client::orchestrator::AuthSchemeAndEndpointOrchestrationV2);
 1147   1175   
            ::std::option::Option::Some(cfg.freeze())
 1148   1176   
        };
 1149   1177   
        let mut runtime_components = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ServiceRuntimePlugin");
 1150   1178   
        runtime_components.set_auth_scheme_option_resolver(::std::option::Option::Some({
 1151   1179   
            use crate::config::auth::ResolveAuthScheme;
 1152   1180   
            crate::config::auth::DefaultAuthSchemeResolver::default().into_shared_resolver()
 1153   1181   
        }));
 1154   1182   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1155   1183   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());

tmp-codegen-diff/codegen-client-test/naming_test_structs/rust-client-codegen/src/lib.rs

@@ -79,79 +113,111 @@
   99     99   
/// Data structures used by operation inputs/outputs.
  100    100   
pub mod types;
  101    101   
  102    102   
/// All operations that this crate can perform.
  103    103   
pub mod operation;
  104    104   
  105    105   
pub(crate) mod protocol_serde;
  106    106   
  107    107   
mod sdk_feature_tracker;
  108    108   
  109         -
mod serialization_settings;
  110         -
  111    109   
mod json_errors;
  112    110   
  113    111   
pub use client::Client;