Client Test

Client Test

rev. 03f9d3736bb06bbe282d7bfe7c28721562f20a05

Files changed:

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

@@ -2,2 +79,73 @@
   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_cbor_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_cbor_err(_response_body, output)
   43     40   
                    .map_err(crate::operation::greeting_with_errors::GreetingWithErrorsError::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::greeting_with_errors::GreetingWithErrorsError::generic(generic),
   53     47   
    })
   54     48   
}
   55     49   
   56     50   
#[allow(clippy::unnecessary_wraps)]
   57     51   
pub fn de_greeting_with_errors_http_response(
   58     52   
    _response_status: u16,
   59     53   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/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/rpcv2Cbor/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/rpcv2Cbor_extras/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]