Client Test

Client Test

rev. 03f9d3736bb06bbe282d7bfe7c28721562f20a05 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_kitchen_sink_operation.rs

@@ -2,2 +79,73 @@
   22     22   
        "ErrorWithMembers" => crate::operation::kitchen_sink_operation::KitchenSinkOperationError::ErrorWithMembers({
   23     23   
            #[allow(unused_mut)]
   24     24   
            let mut tmp = {
   25     25   
                #[allow(unused_mut)]
   26     26   
                let mut output = crate::types::error::builders::ErrorWithMembersBuilder::default();
   27     27   
                output = crate::protocol_serde::shape_error_with_members::de_error_with_members_json_err(_response_body, output)
   28     28   
                    .map_err(crate::operation::kitchen_sink_operation::KitchenSinkOperationError::unhandled)?;
   29     29   
                let output = output.meta(generic);
   30     30   
                output.build()
   31     31   
            };
   32         -
            if tmp.message.is_none() {
   33         -
                tmp.message = _error_message;
   34         -
            }
   35     32   
            tmp
   36     33   
        }),
   37     34   
        "ErrorWithoutMembers" => crate::operation::kitchen_sink_operation::KitchenSinkOperationError::ErrorWithoutMembers({
   38     35   
            #[allow(unused_mut)]
   39     36   
            let mut tmp = {
   40     37   
                #[allow(unused_mut)]
   41     38   
                let mut output = crate::types::error::builders::ErrorWithoutMembersBuilder::default();
   42     39   
                output = crate::protocol_serde::shape_error_without_members::de_error_without_members_json_err(_response_body, output)
   43     40   
                    .map_err(crate::operation::kitchen_sink_operation::KitchenSinkOperationError::unhandled)?;
   44     41   
                let output = output.meta(generic);
   45     42   
                output.build()
   46     43   
            };
   47         -
            if tmp.message.is_none() {
   48         -
                tmp.message = _error_message;
   49         -
            }
   50     44   
            tmp
   51     45   
        }),
   52     46   
        _ => crate::operation::kitchen_sink_operation::KitchenSinkOperationError::generic(generic),
   53     47   
    })
   54     48   
}
   55     49   
   56     50   
#[allow(clippy::unnecessary_wraps)]
   57     51   
pub fn de_kitchen_sink_operation_http_response(
   58     52   
    _response_status: u16,
   59     53   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/types/_complex_nested_error_data.rs

@@ -1,1 +44,55 @@
    5      5   
pub struct ComplexNestedErrorData {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub foo: ::std::option::Option<::std::string::String>,
    8      8   
}
    9      9   
impl ComplexNestedErrorData {
   10     10   
    #[allow(missing_docs)] // documentation missing in model
   11     11   
    pub fn foo(&self) -> ::std::option::Option<&str> {
   12     12   
        self.foo.as_deref()
   13     13   
    }
   14     14   
}
          15  +
impl ::std::fmt::Display for ComplexNestedErrorData {
          16  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          17  +
        ::std::write!(f, "ComplexNestedErrorData {{")?;
          18  +
        if let ::std::option::Option::Some(inner) = &self.foo {
          19  +
            ::std::write!(f, "foo=Some({})", inner)?;
          20  +
        } else {
          21  +
            ::std::write!(f, "foo=None")?;
          22  +
        }
          23  +
        ::std::write!(f, "}}")
          24  +
    }
          25  +
}
   15     26   
impl ComplexNestedErrorData {
   16     27   
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   17     28   
    pub fn builder() -> crate::types::builders::ComplexNestedErrorDataBuilder {
   18     29   
        crate::types::builders::ComplexNestedErrorDataBuilder::default()
   19     30   
    }
   20     31   
}
   21     32   
   22     33   
/// A builder for [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   23     34   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   24     35   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/types/_empty_struct.rs

@@ -1,1 +22,28 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct EmptyStruct {}
           6  +
impl ::std::fmt::Display for EmptyStruct {
           7  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
           8  +
        ::std::write!(f, "EmptyStruct {{")?;
           9  +
        ::std::write!(f, "}}")
          10  +
    }
          11  +
}
    6     12   
impl EmptyStruct {
    7     13   
    /// Creates a new builder-style object to manufacture [`EmptyStruct`](crate::types::EmptyStruct).
    8     14   
    pub fn builder() -> crate::types::builders::EmptyStructBuilder {
    9     15   
        crate::types::builders::EmptyStructBuilder::default()
   10     16   
    }
   11     17   
}
   12     18   
   13     19   
/// A builder for [`EmptyStruct`](crate::types::EmptyStruct).
   14     20   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   15     21   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/types/_kitchen_sink.rs

@@ -153,153 +212,348 @@
  173    173   
    }
  174    174   
    #[allow(missing_docs)] // documentation missing in model
  175    175   
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
  176    176   
        self.timestamp.as_ref()
  177    177   
    }
  178    178   
    #[allow(missing_docs)] // documentation missing in model
  179    179   
    pub fn unix_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
  180    180   
        self.unix_timestamp.as_ref()
  181    181   
    }
  182    182   
}
         183  +
impl ::std::fmt::Display for KitchenSink {
         184  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         185  +
        ::std::write!(f, "KitchenSink {{")?;
         186  +
        if let ::std::option::Option::Some(_) = &self.blob {
         187  +
            ::std::write!(f, "blob=Some()")?;
         188  +
        } else {
         189  +
            ::std::write!(f, "blob=None")?;
         190  +
        }
         191  +
        if let ::std::option::Option::Some(inner) = &self.boolean {
         192  +
            ::std::write!(f, ", boolean=Some({})", inner)?;
         193  +
        } else {
         194  +
            ::std::write!(f, ", boolean=None")?;
         195  +
        }
         196  +
        if let ::std::option::Option::Some(inner) = &self.double {
         197  +
            ::std::write!(f, ", double=Some({})", inner)?;
         198  +
        } else {
         199  +
            ::std::write!(f, ", double=None")?;
         200  +
        }
         201  +
        if let ::std::option::Option::Some(inner) = &self.empty_struct {
         202  +
            ::std::write!(f, ", empty_struct=Some({})", inner)?;
         203  +
        } else {
         204  +
            ::std::write!(f, ", empty_struct=None")?;
         205  +
        }
         206  +
        if let ::std::option::Option::Some(inner) = &self.float {
         207  +
            ::std::write!(f, ", float=Some({})", inner)?;
         208  +
        } else {
         209  +
            ::std::write!(f, ", float=None")?;
         210  +
        }
         211  +
        if let ::std::option::Option::Some(inner) = &self.httpdate_timestamp {
         212  +
            ::std::write!(f, ", httpdate_timestamp=Some({})", inner)?;
         213  +
        } else {
         214  +
            ::std::write!(f, ", httpdate_timestamp=None")?;
         215  +
        }
         216  +
        if let ::std::option::Option::Some(inner) = &self.integer {
         217  +
            ::std::write!(f, ", integer=Some({})", inner)?;
         218  +
        } else {
         219  +
            ::std::write!(f, ", integer=None")?;
         220  +
        }
         221  +
        if let ::std::option::Option::Some(inner) = &self.iso8601_timestamp {
         222  +
            ::std::write!(f, ", iso8601_timestamp=Some({})", inner)?;
         223  +
        } else {
         224  +
            ::std::write!(f, ", iso8601_timestamp=None")?;
         225  +
        }
         226  +
        if let ::std::option::Option::Some(inner) = &self.json_value {
         227  +
            ::std::write!(f, ", json_value=Some({})", inner)?;
         228  +
        } else {
         229  +
            ::std::write!(f, ", json_value=None")?;
         230  +
        }
         231  +
        if let ::std::option::Option::Some(_) = &self.list_of_lists {
         232  +
            ::std::write!(f, ", list_of_lists=Some()")?;
         233  +
        } else {
         234  +
            ::std::write!(f, ", list_of_lists=None")?;
         235  +
        }
         236  +
        if let ::std::option::Option::Some(_) = &self.list_of_maps_of_strings {
         237  +
            ::std::write!(f, ", list_of_maps_of_strings=Some()")?;
         238  +
        } else {
         239  +
            ::std::write!(f, ", list_of_maps_of_strings=None")?;
         240  +
        }
         241  +
        if let ::std::option::Option::Some(_) = &self.list_of_strings {
         242  +
            ::std::write!(f, ", list_of_strings=Some()")?;
         243  +
        } else {
         244  +
            ::std::write!(f, ", list_of_strings=None")?;
         245  +
        }
         246  +
        if let ::std::option::Option::Some(_) = &self.list_of_structs {
         247  +
            ::std::write!(f, ", list_of_structs=Some()")?;
         248  +
        } else {
         249  +
            ::std::write!(f, ", list_of_structs=None")?;
         250  +
        }
         251  +
        if let ::std::option::Option::Some(inner) = &self.long {
         252  +
            ::std::write!(f, ", long=Some({})", inner)?;
         253  +
        } else {
         254  +
            ::std::write!(f, ", long=None")?;
         255  +
        }
         256  +
        if let ::std::option::Option::Some(_) = &self.map_of_lists_of_strings {
         257  +
            ::std::write!(f, ", map_of_lists_of_strings=Some()")?;
         258  +
        } else {
         259  +
            ::std::write!(f, ", map_of_lists_of_strings=None")?;
         260  +
        }
         261  +
        if let ::std::option::Option::Some(_) = &self.map_of_maps {
         262  +
            ::std::write!(f, ", map_of_maps=Some()")?;
         263  +
        } else {
         264  +
            ::std::write!(f, ", map_of_maps=None")?;
         265  +
        }
         266  +
        if let ::std::option::Option::Some(_) = &self.map_of_strings {
         267  +
            ::std::write!(f, ", map_of_strings=Some()")?;
         268  +
        } else {
         269  +
            ::std::write!(f, ", map_of_strings=None")?;
         270  +
        }
         271  +
        if let ::std::option::Option::Some(_) = &self.map_of_structs {
         272  +
            ::std::write!(f, ", map_of_structs=Some()")?;
         273  +
        } else {
         274  +
            ::std::write!(f, ", map_of_structs=None")?;
         275  +
        }
         276  +
        if let ::std::option::Option::Some(_) = &self.recursive_list {
         277  +
            ::std::write!(f, ", recursive_list=Some()")?;
         278  +
        } else {
         279  +
            ::std::write!(f, ", recursive_list=None")?;
         280  +
        }
         281  +
        if let ::std::option::Option::Some(_) = &self.recursive_map {
         282  +
            ::std::write!(f, ", recursive_map=Some()")?;
         283  +
        } else {
         284  +
            ::std::write!(f, ", recursive_map=None")?;
         285  +
        }
         286  +
        if let ::std::option::Option::Some(inner) = &self.recursive_struct {
         287  +
            ::std::write!(f, ", recursive_struct=Some({})", inner)?;
         288  +
        } else {
         289  +
            ::std::write!(f, ", recursive_struct=None")?;
         290  +
        }
         291  +
        if let ::std::option::Option::Some(inner) = &self.simple_struct {
         292  +
            ::std::write!(f, ", simple_struct=Some({})", inner)?;
         293  +
        } else {
         294  +
            ::std::write!(f, ", simple_struct=None")?;
         295  +
        }
         296  +
        if let ::std::option::Option::Some(inner) = &self.string {
         297  +
            ::std::write!(f, ", string=Some({})", inner)?;
         298  +
        } else {
         299  +
            ::std::write!(f, ", string=None")?;
         300  +
        }
         301  +
        if let ::std::option::Option::Some(inner) = &self.struct_with_json_name {
         302  +
            ::std::write!(f, ", struct_with_json_name=Some({})", inner)?;
         303  +
        } else {
         304  +
            ::std::write!(f, ", struct_with_json_name=None")?;
         305  +
        }
         306  +
        if let ::std::option::Option::Some(inner) = &self.timestamp {
         307  +
            ::std::write!(f, ", timestamp=Some({})", inner)?;
         308  +
        } else {
         309  +
            ::std::write!(f, ", timestamp=None")?;
         310  +
        }
         311  +
        if let ::std::option::Option::Some(inner) = &self.unix_timestamp {
         312  +
            ::std::write!(f, ", unix_timestamp=Some({})", inner)?;
         313  +
        } else {
         314  +
            ::std::write!(f, ", unix_timestamp=None")?;
         315  +
        }
         316  +
        ::std::write!(f, "}}")
         317  +
    }
         318  +
}
  183    319   
impl KitchenSink {
  184    320   
    /// Creates a new builder-style object to manufacture [`KitchenSink`](crate::types::KitchenSink).
  185    321   
    pub fn builder() -> crate::types::builders::KitchenSinkBuilder {
  186    322   
        crate::types::builders::KitchenSinkBuilder::default()
  187    323   
    }
  188    324   
}
  189    325   
  190    326   
/// A builder for [`KitchenSink`](crate::types::KitchenSink).
  191    327   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  192    328   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/types/_simple_struct.rs

@@ -1,1 +44,55 @@
    5      5   
pub struct SimpleStruct {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub value: ::std::option::Option<::std::string::String>,
    8      8   
}
    9      9   
impl SimpleStruct {
   10     10   
    #[allow(missing_docs)] // documentation missing in model
   11     11   
    pub fn value(&self) -> ::std::option::Option<&str> {
   12     12   
        self.value.as_deref()
   13     13   
    }
   14     14   
}
          15  +
impl ::std::fmt::Display for SimpleStruct {
          16  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          17  +
        ::std::write!(f, "SimpleStruct {{")?;
          18  +
        if let ::std::option::Option::Some(inner) = &self.value {
          19  +
            ::std::write!(f, "value=Some({})", inner)?;
          20  +
        } else {
          21  +
            ::std::write!(f, "value=None")?;
          22  +
        }
          23  +
        ::std::write!(f, "}}")
          24  +
    }
          25  +
}
   15     26   
impl SimpleStruct {
   16     27   
    /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::types::SimpleStruct).
   17     28   
    pub fn builder() -> crate::types::builders::SimpleStructBuilder {
   18     29   
        crate::types::builders::SimpleStructBuilder::default()
   19     30   
    }
   20     31   
}
   21     32   
   22     33   
/// A builder for [`SimpleStruct`](crate::types::SimpleStruct).
   23     34   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   24     35   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/types/_struct_with_json_name.rs

@@ -1,1 +44,55 @@
    5      5   
pub struct StructWithJsonName {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub value: ::std::option::Option<::std::string::String>,
    8      8   
}
    9      9   
impl StructWithJsonName {
   10     10   
    #[allow(missing_docs)] // documentation missing in model
   11     11   
    pub fn value(&self) -> ::std::option::Option<&str> {
   12     12   
        self.value.as_deref()
   13     13   
    }
   14     14   
}
          15  +
impl ::std::fmt::Display for StructWithJsonName {
          16  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          17  +
        ::std::write!(f, "StructWithJsonName {{")?;
          18  +
        if let ::std::option::Option::Some(inner) = &self.value {
          19  +
            ::std::write!(f, "value=Some({})", inner)?;
          20  +
        } else {
          21  +
            ::std::write!(f, "value=None")?;
          22  +
        }
          23  +
        ::std::write!(f, "}}")
          24  +
    }
          25  +
}
   15     26   
impl StructWithJsonName {
   16     27   
    /// Creates a new builder-style object to manufacture [`StructWithJsonName`](crate::types::StructWithJsonName).
   17     28   
    pub fn builder() -> crate::types::builders::StructWithJsonNameBuilder {
   18     29   
        crate::types::builders::StructWithJsonNameBuilder::default()
   19     30   
    }
   20     31   
}
   21     32   
   22     33   
/// A builder for [`StructWithJsonName`](crate::types::StructWithJsonName).
   23     34   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   24     35   
#[non_exhaustive]

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

@@ -1,1 +53,61 @@
   14     14   
    pub fn path(&self) -> &str {
   15     15   
        use std::ops::Deref;
   16     16   
        self.path.deref()
   17     17   
    }
   18     18   
    /// A detailed description of the validation failure.
   19     19   
    pub fn message(&self) -> &str {
   20     20   
        use std::ops::Deref;
   21     21   
        self.message.deref()
   22     22   
    }
   23     23   
}
          24  +
impl ::std::fmt::Display for ValidationExceptionField {
          25  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          26  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          27  +
        ::std::write!(f, "path={}", &self.path)?;
          28  +
        ::std::write!(f, ", message={}", &self.message)?;
          29  +
        ::std::write!(f, "}}")
          30  +
    }
          31  +
}
   24     32   
impl ValidationExceptionField {
   25     33   
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   26     34   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
   27     35   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
   28     36   
    }
   29     37   
}
   30     38   
   31     39   
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   32     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   33     41   
#[non_exhaustive]

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

@@ -1,1 +70,64 @@
   19     19   
        "CollidingError" => crate::operation::err_collisions::ErrCollisionsError::CollidingError({
   20     20   
            #[allow(unused_mut)]
   21     21   
            let mut tmp = {
   22     22   
                #[allow(unused_mut)]
   23     23   
                let mut output = crate::types::error::builders::CollidingErrorBuilder::default();
   24     24   
                output = crate::protocol_serde::shape_colliding_error::de_colliding_error_json_err(_response_body, output)
   25     25   
                    .map_err(crate::operation::err_collisions::ErrCollisionsError::unhandled)?;
   26     26   
                let output = output.meta(generic);
   27     27   
                output.build()
   28     28   
            };
   29         -
            if tmp.message.is_none() {
   30         -
                tmp.message = _error_message;
   31         -
            }
   32     29   
            tmp
   33     30   
        }),
   34     31   
        "CollidingException" => crate::operation::err_collisions::ErrCollisionsError::CollidingException({
   35     32   
            #[allow(unused_mut)]
   36     33   
            let mut tmp = {
   37     34   
                #[allow(unused_mut)]
   38     35   
                let mut output = crate::types::error::builders::CollidingExceptionBuilder::default();
   39     36   
                output = crate::protocol_serde::shape_colliding_exception::de_colliding_exception_json_err(_response_body, output)
   40     37   
                    .map_err(crate::operation::err_collisions::ErrCollisionsError::unhandled)?;
   41     38   
                let output = output.meta(generic);
   42     39   
                output.build()
   43     40   
            };
   44         -
            if tmp.message.is_none() {
   45         -
                tmp.message = _error_message;
   46         -
            }
   47     41   
            tmp
   48     42   
        }),
   49     43   
        _ => crate::operation::err_collisions::ErrCollisionsError::generic(generic),
   50     44   
    })
   51     45   
}
   52     46   
   53     47   
#[allow(clippy::unnecessary_wraps)]
   54     48   
pub fn de_err_collisions_http_response(
   55     49   
    _response_status: u16,
   56     50   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,

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

@@ -1,1 +53,61 @@
   14     14   
    pub fn path(&self) -> &str {
   15     15   
        use std::ops::Deref;
   16     16   
        self.path.deref()
   17     17   
    }
   18     18   
    /// A detailed description of the validation failure.
   19     19   
    pub fn message(&self) -> &str {
   20     20   
        use std::ops::Deref;
   21     21   
        self.message.deref()
   22     22   
    }
   23     23   
}
          24  +
impl ::std::fmt::Display for ValidationExceptionField {
          25  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          26  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          27  +
        ::std::write!(f, "path={}", &self.path)?;
          28  +
        ::std::write!(f, ", message={}", &self.message)?;
          29  +
        ::std::write!(f, "}}")
          30  +
    }
          31  +
}
   24     32   
impl ValidationExceptionField {
   25     33   
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   26     34   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
   27     35   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
   28     36   
    }
   29     37   
}
   30     38   
   31     39   
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   32     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   33     41   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_capture_pokemon.rs

@@ -35,35 +121,109 @@
   55     55   
        "MasterBallUnsuccessful" => crate::operation::capture_pokemon::CapturePokemonError::MasterBallUnsuccessful({
   56     56   
            #[allow(unused_mut)]
   57     57   
            let mut tmp = {
   58     58   
                #[allow(unused_mut)]
   59     59   
                let mut output = crate::types::error::builders::MasterBallUnsuccessfulBuilder::default();
   60     60   
                output = crate::protocol_serde::shape_master_ball_unsuccessful::de_master_ball_unsuccessful_json_err(_response_body, output)
   61     61   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   62     62   
                let output = output.meta(generic);
   63     63   
                output.build()
   64     64   
            };
   65         -
            if tmp.message.is_none() {
   66         -
                tmp.message = _error_message;
   67         -
            }
   68     65   
            tmp
   69     66   
        }),
   70     67   
        "InvalidPokeballError" => crate::operation::capture_pokemon::CapturePokemonError::InvalidPokeballError({
   71     68   
            #[allow(unused_mut)]
   72     69   
            let mut tmp = {
   73     70   
                #[allow(unused_mut)]
   74     71   
                let mut output = crate::types::error::builders::InvalidPokeballErrorBuilder::default();
   75     72   
                output = crate::protocol_serde::shape_invalid_pokeball_error::de_invalid_pokeball_error_json_err(_response_body, output)
   76     73   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   77     74   
                let output = output.meta(generic);
   78     75   
                crate::serde_util::invalid_pokeball_error_correct_errors(output)
   79     76   
                    .build()
   80     77   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?
   81     78   
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85     79   
            tmp
   86     80   
        }),
   87     81   
        "ThrottlingError" => crate::operation::capture_pokemon::CapturePokemonError::ThrottlingError({
   88     82   
            #[allow(unused_mut)]
   89     83   
            let mut tmp = {
   90     84   
                #[allow(unused_mut)]
   91     85   
                let mut output = crate::types::error::builders::ThrottlingErrorBuilder::default();
   92     86   
                output = crate::protocol_serde::shape_throttling_error::de_throttling_error_json_err(_response_body, output)
   93     87   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   94     88   
                let output = output.meta(generic);
   95     89   
                output.build()
   96     90   
            };
   97         -
            if tmp.message.is_none() {
   98         -
                tmp.message = _error_message;
   99         -
            }
  100     91   
            tmp
  101     92   
        }),
  102     93   
        "UnsupportedRegionError" => crate::operation::capture_pokemon::CapturePokemonError::UnsupportedRegionError({
  103     94   
            #[allow(unused_mut)]
  104     95   
            let mut tmp = {
  105     96   
                #[allow(unused_mut)]
  106     97   
                let mut output = crate::types::error::builders::UnsupportedRegionErrorBuilder::default();
  107     98   
                output = crate::protocol_serde::shape_unsupported_region_error::de_unsupported_region_error_json_err(_response_body, output)
  108     99   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
  109    100   
                let output = output.meta(generic);
  110    101   
                crate::serde_util::unsupported_region_error_correct_errors(output)
  111    102   
                    .build()
  112    103   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?
  113    104   
            };
  114         -
            if tmp.message.is_none() {
  115         -
                tmp.message = _error_message;
  116         -
            }
  117    105   
            tmp
  118    106   
        }),
  119    107   
        _ => crate::operation::capture_pokemon::CapturePokemonError::generic(generic),
  120    108   
    })
  121    109   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/types/_validation_exception_field.rs

@@ -1,1 +53,61 @@
   14     14   
    pub fn path(&self) -> &str {
   15     15   
        use std::ops::Deref;
   16     16   
        self.path.deref()
   17     17   
    }
   18     18   
    /// A detailed description of the validation failure.
   19     19   
    pub fn message(&self) -> &str {
   20     20   
        use std::ops::Deref;
   21     21   
        self.message.deref()
   22     22   
    }
   23     23   
}
          24  +
impl ::std::fmt::Display for ValidationExceptionField {
          25  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          26  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          27  +
        ::std::write!(f, "path={}", &self.path)?;
          28  +
        ::std::write!(f, ", message={}", &self.message)?;
          29  +
        ::std::write!(f, "}}")
          30  +
    }
          31  +
}
   24     32   
impl ValidationExceptionField {
   25     33   
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   26     34   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
   27     35   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
   28     36   
    }
   29     37   
}
   30     38   
   31     39   
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   32     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   33     41   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/protocol_serde/shape_capture_pokemon.rs

@@ -35,35 +121,109 @@
   55     55   
        "MasterBallUnsuccessful" => crate::operation::capture_pokemon::CapturePokemonError::MasterBallUnsuccessful({
   56     56   
            #[allow(unused_mut)]
   57     57   
            let mut tmp = {
   58     58   
                #[allow(unused_mut)]
   59     59   
                let mut output = crate::types::error::builders::MasterBallUnsuccessfulBuilder::default();
   60     60   
                output = crate::protocol_serde::shape_master_ball_unsuccessful::de_master_ball_unsuccessful_json_err(_response_body, output)
   61     61   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   62     62   
                let output = output.meta(generic);
   63     63   
                output.build()
   64     64   
            };
   65         -
            if tmp.message.is_none() {
   66         -
                tmp.message = _error_message;
   67         -
            }
   68     65   
            tmp
   69     66   
        }),
   70     67   
        "InvalidPokeballError" => crate::operation::capture_pokemon::CapturePokemonError::InvalidPokeballError({
   71     68   
            #[allow(unused_mut)]
   72     69   
            let mut tmp = {
   73     70   
                #[allow(unused_mut)]
   74     71   
                let mut output = crate::types::error::builders::InvalidPokeballErrorBuilder::default();
   75     72   
                output = crate::protocol_serde::shape_invalid_pokeball_error::de_invalid_pokeball_error_json_err(_response_body, output)
   76     73   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   77     74   
                let output = output.meta(generic);
   78     75   
                crate::serde_util::invalid_pokeball_error_correct_errors(output)
   79     76   
                    .build()
   80     77   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?
   81     78   
            };
   82         -
            if tmp.message.is_none() {
   83         -
                tmp.message = _error_message;
   84         -
            }
   85     79   
            tmp
   86     80   
        }),
   87     81   
        "ThrottlingError" => crate::operation::capture_pokemon::CapturePokemonError::ThrottlingError({
   88     82   
            #[allow(unused_mut)]
   89     83   
            let mut tmp = {
   90     84   
                #[allow(unused_mut)]
   91     85   
                let mut output = crate::types::error::builders::ThrottlingErrorBuilder::default();
   92     86   
                output = crate::protocol_serde::shape_throttling_error::de_throttling_error_json_err(_response_body, output)
   93     87   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
   94     88   
                let output = output.meta(generic);
   95     89   
                output.build()
   96     90   
            };
   97         -
            if tmp.message.is_none() {
   98         -
                tmp.message = _error_message;
   99         -
            }
  100     91   
            tmp
  101     92   
        }),
  102     93   
        "UnsupportedRegionError" => crate::operation::capture_pokemon::CapturePokemonError::UnsupportedRegionError({
  103     94   
            #[allow(unused_mut)]
  104     95   
            let mut tmp = {
  105     96   
                #[allow(unused_mut)]
  106     97   
                let mut output = crate::types::error::builders::UnsupportedRegionErrorBuilder::default();
  107     98   
                output = crate::protocol_serde::shape_unsupported_region_error::de_unsupported_region_error_json_err(_response_body, output)
  108     99   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?;
  109    100   
                let output = output.meta(generic);
  110    101   
                crate::serde_util::unsupported_region_error_correct_errors(output)
  111    102   
                    .build()
  112    103   
                    .map_err(crate::operation::capture_pokemon::CapturePokemonError::unhandled)?
  113    104   
            };
  114         -
            if tmp.message.is_none() {
  115         -
                tmp.message = _error_message;
  116         -
            }
  117    105   
            tmp
  118    106   
        }),
  119    107   
        _ => crate::operation::capture_pokemon::CapturePokemonError::generic(generic),
  120    108   
    })
  121    109   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/protocol_serde/shape_get_storage.rs

@@ -14,14 +76,73 @@
   34     34   
            #[allow(unused_mut)]
   35     35   
            let mut tmp = {
   36     36   
                #[allow(unused_mut)]
   37     37   
                let mut output = crate::types::error::builders::StorageAccessNotAuthorizedBuilder::default();
   38     38   
                output =
   39     39   
                    crate::protocol_serde::shape_storage_access_not_authorized::de_storage_access_not_authorized_json_err(_response_body, output)
   40     40   
                        .map_err(crate::operation::get_storage::GetStorageError::unhandled)?;
   41     41   
                let output = output.meta(generic);
   42     42   
                output.build()
   43     43   
            };
   44         -
            if tmp.message.is_none() {
   45         -
                tmp.message = _error_message;
   46         -
            }
   47     44   
            tmp
   48     45   
        }),
   49     46   
        "ResourceNotFoundException" => crate::operation::get_storage::GetStorageError::ResourceNotFoundError({
   50     47   
            #[allow(unused_mut)]
   51     48   
            let mut tmp = {
   52     49   
                #[allow(unused_mut)]
   53     50   
                let mut output = crate::types::error::builders::ResourceNotFoundErrorBuilder::default();
   54     51   
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   55     52   
                    .map_err(crate::operation::get_storage::GetStorageError::unhandled)?;
   56     53   
                let output = output.meta(generic);

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

@@ -1,1 +53,61 @@
   14     14   
    pub fn path(&self) -> &str {
   15     15   
        use std::ops::Deref;
   16     16   
        self.path.deref()
   17     17   
    }
   18     18   
    /// A detailed description of the validation failure.
   19     19   
    pub fn message(&self) -> &str {
   20     20   
        use std::ops::Deref;
   21     21   
        self.message.deref()
   22     22   
    }
   23     23   
}
          24  +
impl ::std::fmt::Display for ValidationExceptionField {
          25  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          26  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          27  +
        ::std::write!(f, "path={}", &self.path)?;
          28  +
        ::std::write!(f, ", message={}", &self.message)?;
          29  +
        ::std::write!(f, "}}")
          30  +
    }
          31  +
}
   24     32   
impl ValidationExceptionField {
   25     33   
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   26     34   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
   27     35   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
   28     36   
    }
   29     37   
}
   30     38   
   31     39   
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   32     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   33     41   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_greeting_with_errors.rs

@@ -2,2 +95,86 @@
   22     22   
        "InvalidGreeting" => crate::operation::greeting_with_errors::GreetingWithErrorsError::InvalidGreeting({
   23     23   
            #[allow(unused_mut)]
   24     24   
            let mut tmp = {
   25     25   
                #[allow(unused_mut)]
   26     26   
                let mut output = crate::types::error::builders::InvalidGreetingBuilder::default();
   27     27   
                output = crate::protocol_serde::shape_invalid_greeting::de_invalid_greeting_json_err(_response_body, output)
   28     28   
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   29     29   
                let output = output.meta(generic);
   30     30   
                output.build()
   31     31   
            };
   32         -
            if tmp.message.is_none() {
   33         -
                tmp.message = _error_message;
   34         -
            }
   35     32   
            tmp
   36     33   
        }),
   37     34   
        "ComplexError" => crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError({
   38     35   
            #[allow(unused_mut)]
   39     36   
            let mut tmp = {
   40     37   
                #[allow(unused_mut)]
   41     38   
                let mut output = crate::types::error::builders::ComplexErrorBuilder::default();
   42     39   
                output = crate::protocol_serde::shape_complex_error::de_complex_error_json_err(_response_body, output)
   43     40   
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   44     41   
                output = output.set_header(
   45     42   
                    crate::protocol_serde::shape_complex_error::de_header_header(_response_headers).map_err(|_| {
   46     43   
                        crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled("Failed to parse Header from header `X-Header")
   47     44   
                    })?,
   48     45   
                );
   49     46   
                let output = output.meta(generic);
   50     47   
                output.build()
   51     48   
            };
   52         -
            if tmp.message.is_none() {
   53         -
                tmp.message = _error_message;
   54         -
            }
   55     49   
            tmp
   56     50   
        }),
   57     51   
        "FooError" => crate::operation::greeting_with_errors::GreetingWithErrorsError::FooError({
   58     52   
            #[allow(unused_mut)]
   59     53   
            let mut tmp = {
   60     54   
                #[allow(unused_mut)]
   61     55   
                let mut output = crate::types::error::builders::FooErrorBuilder::default();
   62     56   
                output = crate::protocol_serde::shape_foo_error::de_foo_error_json_err(_response_body, output)
   63     57   
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::unhandled)?;
   64     58   
                let output = output.meta(generic);
   65     59   
                output.build()
   66     60   
            };
   67         -
            if tmp.message.is_none() {
   68         -
                tmp.message = _error_message;
   69         -
            }
   70     61   
            tmp
   71     62   
        }),
   72     63   
        _ => crate::operation::greeting_with_errors::GreetingWithErrorsError::generic(generic),
   73     64   
    })
   74     65   
}
   75     66   
   76     67   
#[allow(clippy::unnecessary_wraps)]
   77     68   
pub fn de_greeting_with_errors_http_response(
   78     69   
    _response_status: u16,
   79     70   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/types/_complex_nested_error_data.rs

@@ -1,1 +44,55 @@
    5      5   
pub struct ComplexNestedErrorData {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub foo: ::std::option::Option<::std::string::String>,
    8      8   
}
    9      9   
impl ComplexNestedErrorData {
   10     10   
    #[allow(missing_docs)] // documentation missing in model
   11     11   
    pub fn foo(&self) -> ::std::option::Option<&str> {
   12     12   
        self.foo.as_deref()
   13     13   
    }
   14     14   
}
          15  +
impl ::std::fmt::Display for ComplexNestedErrorData {
          16  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          17  +
        ::std::write!(f, "ComplexNestedErrorData {{")?;
          18  +
        if let ::std::option::Option::Some(inner) = &self.foo {
          19  +
            ::std::write!(f, "foo=Some({})", inner)?;
          20  +
        } else {
          21  +
            ::std::write!(f, "foo=None")?;
          22  +
        }
          23  +
        ::std::write!(f, "}}")
          24  +
    }
          25  +
}
   15     26   
impl ComplexNestedErrorData {
   16     27   
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   17     28   
    pub fn builder() -> crate::types::builders::ComplexNestedErrorDataBuilder {
   18     29   
        crate::types::builders::ComplexNestedErrorDataBuilder::default()
   19     30   
    }
   20     31   
}
   21     32   
   22     33   
/// A builder for [`ComplexNestedErrorData`](crate::types::ComplexNestedErrorData).
   23     34   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   24     35   
#[non_exhaustive]