Client Test

Client Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,203 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct HeadersEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub boolean_header: ::std::option::Option<bool>,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub byte_header: ::std::option::Option<i8>,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub short_header: ::std::option::Option<i16>,
          12  +
    #[allow(missing_docs)] // documentation missing in model
          13  +
    pub int_header: ::std::option::Option<i32>,
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub long_header: ::std::option::Option<i64>,
          16  +
    #[allow(missing_docs)] // documentation missing in model
          17  +
    pub blob_header: ::std::option::Option<::aws_smithy_types::Blob>,
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub string_header: ::std::option::Option<::std::string::String>,
          20  +
    #[allow(missing_docs)] // documentation missing in model
          21  +
    pub timestamp_header: ::std::option::Option<::aws_smithy_types::DateTime>,
          22  +
}
          23  +
impl HeadersEvent {
          24  +
    #[allow(missing_docs)] // documentation missing in model
          25  +
    pub fn boolean_header(&self) -> ::std::option::Option<bool> {
          26  +
        self.boolean_header
          27  +
    }
          28  +
    #[allow(missing_docs)] // documentation missing in model
          29  +
    pub fn byte_header(&self) -> ::std::option::Option<i8> {
          30  +
        self.byte_header
          31  +
    }
          32  +
    #[allow(missing_docs)] // documentation missing in model
          33  +
    pub fn short_header(&self) -> ::std::option::Option<i16> {
          34  +
        self.short_header
          35  +
    }
          36  +
    #[allow(missing_docs)] // documentation missing in model
          37  +
    pub fn int_header(&self) -> ::std::option::Option<i32> {
          38  +
        self.int_header
          39  +
    }
          40  +
    #[allow(missing_docs)] // documentation missing in model
          41  +
    pub fn long_header(&self) -> ::std::option::Option<i64> {
          42  +
        self.long_header
          43  +
    }
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    pub fn blob_header(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
          46  +
        self.blob_header.as_ref()
          47  +
    }
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn string_header(&self) -> ::std::option::Option<&str> {
          50  +
        self.string_header.as_deref()
          51  +
    }
          52  +
    #[allow(missing_docs)] // documentation missing in model
          53  +
    pub fn timestamp_header(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        self.timestamp_header.as_ref()
          55  +
    }
          56  +
}
          57  +
impl HeadersEvent {
          58  +
    /// Creates a new builder-style object to manufacture [`HeadersEvent`](crate::types::HeadersEvent).
          59  +
    pub fn builder() -> crate::types::builders::HeadersEventBuilder {
          60  +
        crate::types::builders::HeadersEventBuilder::default()
          61  +
    }
          62  +
}
          63  +
          64  +
/// A builder for [`HeadersEvent`](crate::types::HeadersEvent).
          65  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          66  +
#[non_exhaustive]
          67  +
pub struct HeadersEventBuilder {
          68  +
    pub(crate) boolean_header: ::std::option::Option<bool>,
          69  +
    pub(crate) byte_header: ::std::option::Option<i8>,
          70  +
    pub(crate) short_header: ::std::option::Option<i16>,
          71  +
    pub(crate) int_header: ::std::option::Option<i32>,
          72  +
    pub(crate) long_header: ::std::option::Option<i64>,
          73  +
    pub(crate) blob_header: ::std::option::Option<::aws_smithy_types::Blob>,
          74  +
    pub(crate) string_header: ::std::option::Option<::std::string::String>,
          75  +
    pub(crate) timestamp_header: ::std::option::Option<::aws_smithy_types::DateTime>,
          76  +
}
          77  +
impl HeadersEventBuilder {
          78  +
    #[allow(missing_docs)] // documentation missing in model
          79  +
    pub fn boolean_header(mut self, input: bool) -> Self {
          80  +
        self.boolean_header = ::std::option::Option::Some(input);
          81  +
        self
          82  +
    }
          83  +
    #[allow(missing_docs)] // documentation missing in model
          84  +
    pub fn set_boolean_header(mut self, input: ::std::option::Option<bool>) -> Self {
          85  +
        self.boolean_header = input;
          86  +
        self
          87  +
    }
          88  +
    #[allow(missing_docs)] // documentation missing in model
          89  +
    pub fn get_boolean_header(&self) -> &::std::option::Option<bool> {
          90  +
        &self.boolean_header
          91  +
    }
          92  +
    #[allow(missing_docs)] // documentation missing in model
          93  +
    pub fn byte_header(mut self, input: i8) -> Self {
          94  +
        self.byte_header = ::std::option::Option::Some(input);
          95  +
        self
          96  +
    }
          97  +
    #[allow(missing_docs)] // documentation missing in model
          98  +
    pub fn set_byte_header(mut self, input: ::std::option::Option<i8>) -> Self {
          99  +
        self.byte_header = input;
         100  +
        self
         101  +
    }
         102  +
    #[allow(missing_docs)] // documentation missing in model
         103  +
    pub fn get_byte_header(&self) -> &::std::option::Option<i8> {
         104  +
        &self.byte_header
         105  +
    }
         106  +
    #[allow(missing_docs)] // documentation missing in model
         107  +
    pub fn short_header(mut self, input: i16) -> Self {
         108  +
        self.short_header = ::std::option::Option::Some(input);
         109  +
        self
         110  +
    }
         111  +
    #[allow(missing_docs)] // documentation missing in model
         112  +
    pub fn set_short_header(mut self, input: ::std::option::Option<i16>) -> Self {
         113  +
        self.short_header = input;
         114  +
        self
         115  +
    }
         116  +
    #[allow(missing_docs)] // documentation missing in model
         117  +
    pub fn get_short_header(&self) -> &::std::option::Option<i16> {
         118  +
        &self.short_header
         119  +
    }
         120  +
    #[allow(missing_docs)] // documentation missing in model
         121  +
    pub fn int_header(mut self, input: i32) -> Self {
         122  +
        self.int_header = ::std::option::Option::Some(input);
         123  +
        self
         124  +
    }
         125  +
    #[allow(missing_docs)] // documentation missing in model
         126  +
    pub fn set_int_header(mut self, input: ::std::option::Option<i32>) -> Self {
         127  +
        self.int_header = input;
         128  +
        self
         129  +
    }
         130  +
    #[allow(missing_docs)] // documentation missing in model
         131  +
    pub fn get_int_header(&self) -> &::std::option::Option<i32> {
         132  +
        &self.int_header
         133  +
    }
         134  +
    #[allow(missing_docs)] // documentation missing in model
         135  +
    pub fn long_header(mut self, input: i64) -> Self {
         136  +
        self.long_header = ::std::option::Option::Some(input);
         137  +
        self
         138  +
    }
         139  +
    #[allow(missing_docs)] // documentation missing in model
         140  +
    pub fn set_long_header(mut self, input: ::std::option::Option<i64>) -> Self {
         141  +
        self.long_header = input;
         142  +
        self
         143  +
    }
         144  +
    #[allow(missing_docs)] // documentation missing in model
         145  +
    pub fn get_long_header(&self) -> &::std::option::Option<i64> {
         146  +
        &self.long_header
         147  +
    }
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub fn blob_header(mut self, input: ::aws_smithy_types::Blob) -> Self {
         150  +
        self.blob_header = ::std::option::Option::Some(input);
         151  +
        self
         152  +
    }
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub fn set_blob_header(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
         155  +
        self.blob_header = input;
         156  +
        self
         157  +
    }
         158  +
    #[allow(missing_docs)] // documentation missing in model
         159  +
    pub fn get_blob_header(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
         160  +
        &self.blob_header
         161  +
    }
         162  +
    #[allow(missing_docs)] // documentation missing in model
         163  +
    pub fn string_header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         164  +
        self.string_header = ::std::option::Option::Some(input.into());
         165  +
        self
         166  +
    }
         167  +
    #[allow(missing_docs)] // documentation missing in model
         168  +
    pub fn set_string_header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         169  +
        self.string_header = input;
         170  +
        self
         171  +
    }
         172  +
    #[allow(missing_docs)] // documentation missing in model
         173  +
    pub fn get_string_header(&self) -> &::std::option::Option<::std::string::String> {
         174  +
        &self.string_header
         175  +
    }
         176  +
    #[allow(missing_docs)] // documentation missing in model
         177  +
    pub fn timestamp_header(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         178  +
        self.timestamp_header = ::std::option::Option::Some(input);
         179  +
        self
         180  +
    }
         181  +
    #[allow(missing_docs)] // documentation missing in model
         182  +
    pub fn set_timestamp_header(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         183  +
        self.timestamp_header = input;
         184  +
        self
         185  +
    }
         186  +
    #[allow(missing_docs)] // documentation missing in model
         187  +
    pub fn get_timestamp_header(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         188  +
        &self.timestamp_header
         189  +
    }
         190  +
    /// Consumes the builder and constructs a [`HeadersEvent`](crate::types::HeadersEvent).
         191  +
    pub fn build(self) -> crate::types::HeadersEvent {
         192  +
        crate::types::HeadersEvent {
         193  +
            boolean_header: self.boolean_header,
         194  +
            byte_header: self.byte_header,
         195  +
            short_header: self.short_header,
         196  +
            int_header: self.int_header,
         197  +
            long_header: self.long_header,
         198  +
            blob_header: self.blob_header,
         199  +
            string_header: self.string_header,
         200  +
            timestamp_header: self.timestamp_header,
         201  +
        }
         202  +
    }
         203  +
}

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

@@ -0,1 +0,49 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct PayloadStructure {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub structure_member: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl PayloadStructure {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn structure_member(&self) -> ::std::option::Option<&str> {
          12  +
        self.structure_member.as_deref()
          13  +
    }
          14  +
}
          15  +
impl PayloadStructure {
          16  +
    /// Creates a new builder-style object to manufacture [`PayloadStructure`](crate::types::PayloadStructure).
          17  +
    pub fn builder() -> crate::types::builders::PayloadStructureBuilder {
          18  +
        crate::types::builders::PayloadStructureBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`PayloadStructure`](crate::types::PayloadStructure).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct PayloadStructureBuilder {
          26  +
    pub(crate) structure_member: ::std::option::Option<::std::string::String>,
          27  +
}
          28  +
impl PayloadStructureBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn structure_member(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          31  +
        self.structure_member = ::std::option::Option::Some(input.into());
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_structure_member(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          36  +
        self.structure_member = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_structure_member(&self) -> &::std::option::Option<::std::string::String> {
          41  +
        &self.structure_member
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`PayloadStructure`](crate::types::PayloadStructure).
          44  +
    pub fn build(self) -> crate::types::PayloadStructure {
          45  +
        crate::types::PayloadStructure {
          46  +
            structure_member: self.structure_member,
          47  +
        }
          48  +
    }
          49  +
}

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

@@ -0,1 +0,37 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub enum PayloadUnion {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    UnionMember(::std::string::String),
           8  +
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
           9  +
    /// An unknown enum variant
          10  +
    ///
          11  +
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          12  +
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          13  +
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          14  +
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          15  +
    #[non_exhaustive]
          16  +
    Unknown,
          17  +
}
          18  +
impl PayloadUnion {
          19  +
    #[allow(irrefutable_let_patterns)]
          20  +
    /// Tries to convert the enum instance into [`UnionMember`](crate::types::PayloadUnion::UnionMember), extracting the inner [`String`](::std::string::String).
          21  +
    /// Returns `Err(&Self)` if it can't be converted.
          22  +
    pub fn as_union_member(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          23  +
        if let PayloadUnion::UnionMember(val) = &self {
          24  +
            ::std::result::Result::Ok(val)
          25  +
        } else {
          26  +
            ::std::result::Result::Err(self)
          27  +
        }
          28  +
    }
          29  +
    /// Returns true if this is a [`UnionMember`](crate::types::PayloadUnion::UnionMember).
          30  +
    pub fn is_union_member(&self) -> bool {
          31  +
        self.as_union_member().is_ok()
          32  +
    }
          33  +
    /// Returns true if the enum instance is the `Unknown` variant.
          34  +
    pub fn is_unknown(&self) -> bool {
          35  +
        matches!(self, Self::Unknown)
          36  +
    }
          37  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct SingletonEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub value: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl SingletonEvent {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn value(&self) -> ::std::option::Option<&str> {
          12  +
        self.value.as_deref()
          13  +
    }
          14  +
}
          15  +
impl SingletonEvent {
          16  +
    /// Creates a new builder-style object to manufacture [`SingletonEvent`](crate::types::SingletonEvent).
          17  +
    pub fn builder() -> crate::types::builders::SingletonEventBuilder {
          18  +
        crate::types::builders::SingletonEventBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`SingletonEvent`](crate::types::SingletonEvent).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct SingletonEventBuilder {
          26  +
    pub(crate) value: ::std::option::Option<::std::string::String>,
          27  +
}
          28  +
impl SingletonEventBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          31  +
        self.value = ::std::option::Option::Some(input.into());
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          36  +
        self.value = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
          41  +
        &self.value
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`SingletonEvent`](crate::types::SingletonEvent).
          44  +
    pub fn build(self) -> crate::types::SingletonEvent {
          45  +
        crate::types::SingletonEvent { value: self.value }
          46  +
    }
          47  +
}

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

@@ -0,1 +0,37 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub enum SingletonEventStream {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    Singleton(crate::types::SingletonEvent),
           8  +
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
           9  +
    /// An unknown enum variant
          10  +
    ///
          11  +
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          12  +
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          13  +
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          14  +
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          15  +
    #[non_exhaustive]
          16  +
    Unknown,
          17  +
}
          18  +
impl SingletonEventStream {
          19  +
    #[allow(irrefutable_let_patterns)]
          20  +
    /// Tries to convert the enum instance into [`Singleton`](crate::types::SingletonEventStream::Singleton), extracting the inner [`SingletonEvent`](crate::types::SingletonEvent).
          21  +
    /// Returns `Err(&Self)` if it can't be converted.
          22  +
    pub fn as_singleton(&self) -> ::std::result::Result<&crate::types::SingletonEvent, &Self> {
          23  +
        if let SingletonEventStream::Singleton(val) = &self {
          24  +
            ::std::result::Result::Ok(val)
          25  +
        } else {
          26  +
            ::std::result::Result::Err(self)
          27  +
        }
          28  +
    }
          29  +
    /// Returns true if this is a [`Singleton`](crate::types::SingletonEventStream::Singleton).
          30  +
    pub fn is_singleton(&self) -> bool {
          31  +
        self.as_singleton().is_ok()
          32  +
    }
          33  +
    /// Returns true if the enum instance is the `Unknown` variant.
          34  +
    pub fn is_unknown(&self) -> bool {
          35  +
        matches!(self, Self::Unknown)
          36  +
    }
          37  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct StringPayloadEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub payload: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl StringPayloadEvent {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
          12  +
        self.payload.as_deref()
          13  +
    }
          14  +
}
          15  +
impl StringPayloadEvent {
          16  +
    /// Creates a new builder-style object to manufacture [`StringPayloadEvent`](crate::types::StringPayloadEvent).
          17  +
    pub fn builder() -> crate::types::builders::StringPayloadEventBuilder {
          18  +
        crate::types::builders::StringPayloadEventBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`StringPayloadEvent`](crate::types::StringPayloadEvent).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct StringPayloadEventBuilder {
          26  +
    pub(crate) payload: ::std::option::Option<::std::string::String>,
          27  +
}
          28  +
impl StringPayloadEventBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          31  +
        self.payload = ::std::option::Option::Some(input.into());
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          36  +
        self.payload = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_payload(&self) -> &::std::option::Option<::std::string::String> {
          41  +
        &self.payload
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`StringPayloadEvent`](crate::types::StringPayloadEvent).
          44  +
    pub fn build(self) -> crate::types::StringPayloadEvent {
          45  +
        crate::types::StringPayloadEvent { payload: self.payload }
          46  +
    }
          47  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct StructurePayloadEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub payload: ::std::option::Option<crate::types::PayloadStructure>,
           8  +
}
           9  +
impl StructurePayloadEvent {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn payload(&self) -> ::std::option::Option<&crate::types::PayloadStructure> {
          12  +
        self.payload.as_ref()
          13  +
    }
          14  +
}
          15  +
impl StructurePayloadEvent {
          16  +
    /// Creates a new builder-style object to manufacture [`StructurePayloadEvent`](crate::types::StructurePayloadEvent).
          17  +
    pub fn builder() -> crate::types::builders::StructurePayloadEventBuilder {
          18  +
        crate::types::builders::StructurePayloadEventBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`StructurePayloadEvent`](crate::types::StructurePayloadEvent).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct StructurePayloadEventBuilder {
          26  +
    pub(crate) payload: ::std::option::Option<crate::types::PayloadStructure>,
          27  +
}
          28  +
impl StructurePayloadEventBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn payload(mut self, input: crate::types::PayloadStructure) -> Self {
          31  +
        self.payload = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_payload(mut self, input: ::std::option::Option<crate::types::PayloadStructure>) -> Self {
          36  +
        self.payload = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_payload(&self) -> &::std::option::Option<crate::types::PayloadStructure> {
          41  +
        &self.payload
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`StructurePayloadEvent`](crate::types::StructurePayloadEvent).
          44  +
    pub fn build(self) -> crate::types::StructurePayloadEvent {
          45  +
        crate::types::StructurePayloadEvent { payload: self.payload }
          46  +
    }
          47  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct UnionPayloadEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub payload: ::std::option::Option<crate::types::PayloadUnion>,
           8  +
}
           9  +
impl UnionPayloadEvent {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn payload(&self) -> ::std::option::Option<&crate::types::PayloadUnion> {
          12  +
        self.payload.as_ref()
          13  +
    }
          14  +
}
          15  +
impl UnionPayloadEvent {
          16  +
    /// Creates a new builder-style object to manufacture [`UnionPayloadEvent`](crate::types::UnionPayloadEvent).
          17  +
    pub fn builder() -> crate::types::builders::UnionPayloadEventBuilder {
          18  +
        crate::types::builders::UnionPayloadEventBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`UnionPayloadEvent`](crate::types::UnionPayloadEvent).
          23  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
#[non_exhaustive]
          25  +
pub struct UnionPayloadEventBuilder {
          26  +
    pub(crate) payload: ::std::option::Option<crate::types::PayloadUnion>,
          27  +
}
          28  +
impl UnionPayloadEventBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn payload(mut self, input: crate::types::PayloadUnion) -> Self {
          31  +
        self.payload = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_payload(mut self, input: ::std::option::Option<crate::types::PayloadUnion>) -> Self {
          36  +
        self.payload = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_payload(&self) -> &::std::option::Option<crate::types::PayloadUnion> {
          41  +
        &self.payload
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`UnionPayloadEvent`](crate::types::UnionPayloadEvent).
          44  +
    pub fn build(self) -> crate::types::UnionPayloadEvent {
          45  +
        crate::types::UnionPayloadEvent { payload: self.payload }
          46  +
    }
          47  +
}

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

@@ -1,1 +0,48 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_dialog::DialogBuilder;
           2  +
pub use crate::types::_nested_payload::NestedPayloadBuilder;
    3      3   
    4         -
pub use crate::types::_farewell::FarewellBuilder;
           4  +
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
    5      5   
    6         -
pub use crate::types::_top_level::TopLevelBuilder;
           6  +
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1Builder;
    7      7   
    8         -
pub use crate::types::_client_optional_defaults::ClientOptionalDefaultsBuilder;
           8  +
pub use crate::types::_test_config::TestConfigBuilder;
           9  +
          10  +
pub use crate::types::_payload_config::PayloadConfigBuilder;
    9     11   
   10     12   
pub use crate::types::_defaults::DefaultsBuilder;
   11     13   
   12         -
pub use crate::types::_payload_config::PayloadConfigBuilder;
          14  +
pub use crate::types::_client_optional_defaults::ClientOptionalDefaultsBuilder;
   13     15   
   14         -
pub use crate::types::_test_config::TestConfigBuilder;
          16  +
pub use crate::types::_top_level::TopLevelBuilder;
   15     17   
   16         -
pub use crate::types::_unit::UnitBuilder;
          18  +
pub use crate::types::_dialog::DialogBuilder;
   17     19   
   18         -
pub use crate::types::_renamed_greeting::RenamedGreetingBuilder;
          20  +
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;
          21  +
          22  +
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
   19     23   
   20     24   
pub use crate::types::_greeting_struct::GreetingStructBuilder;
   21     25   
   22         -
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
          26  +
pub use crate::types::_renamed_greeting::RenamedGreetingBuilder;
   23     27   
   24         -
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1Builder;
          28  +
pub use crate::types::_unit::UnitBuilder;
   25     29   
   26         -
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;
          30  +
pub use crate::types::_farewell::FarewellBuilder;
   27     31   
   28         -
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
          32  +
pub use crate::types::_headers_event::HeadersEventBuilder;
   29     33   
   30         -
pub use crate::types::_nested_payload::NestedPayloadBuilder;
          34  +
pub use crate::types::_blob_payload_event::BlobPayloadEventBuilder;
          35  +
          36  +
pub use crate::types::_string_payload_event::StringPayloadEventBuilder;
          37  +
          38  +
pub use crate::types::_structure_payload_event::StructurePayloadEventBuilder;
          39  +
          40  +
pub use crate::types::_union_payload_event::UnionPayloadEventBuilder;
          41  +
          42  +
pub use crate::types::_headers_and_explicit_payload_event::HeadersAndExplicitPayloadEventBuilder;
          43  +
          44  +
pub use crate::types::_headers_and_implicit_payload_event::HeadersAndImplicitPayloadEventBuilder;
          45  +
          46  +
pub use crate::types::_singleton_event::SingletonEventBuilder;
          47  +
          48  +
pub use crate::types::_payload_structure::PayloadStructureBuilder;

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

@@ -1,1 +15,121 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_foo_error::FooError;
           2  +
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
    3      3   
    4      4   
pub use crate::types::error::_complex_error::ComplexError;
    5      5   
    6         -
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
           6  +
pub use crate::types::error::_foo_error::FooError;
           7  +
           8  +
pub use crate::types::error::_error_event::ErrorEvent;
           9  +
          10  +
pub use crate::types::error::_service_unavailable_error::ServiceUnavailableError;
          11  +
          12  +
/// Error type for the `EventStreamError` operation.
          13  +
#[non_exhaustive]
          14  +
#[derive(::std::fmt::Debug)]
          15  +
pub enum EventStreamError {
          16  +
    #[allow(missing_docs)] // documentation missing in model
          17  +
    ErrorEvent(crate::types::error::ErrorEvent),
          18  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
          19  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
          20  +
    variable wildcard pattern and check `.code()`:
          21  +
     \
          22  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
          23  +
     \
          24  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-EventStreamError) for what information is available for the error.")]
          25  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
          26  +
}
          27  +
impl EventStreamError {
          28  +
    /// Creates the `EventStreamError::Unhandled` variant from any error type.
          29  +
    pub fn unhandled(
          30  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
          31  +
    ) -> Self {
          32  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
          33  +
            source: err.into(),
          34  +
            meta: ::std::default::Default::default(),
          35  +
        })
          36  +
    }
          37  +
          38  +
    /// Creates the `EventStreamError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
          39  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
          40  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
          41  +
            source: err.clone().into(),
          42  +
            meta: err,
          43  +
        })
          44  +
    }
          45  +
    ///
          46  +
    /// Returns error metadata, which includes the error code, message,
          47  +
    /// request ID, and potentially additional information.
          48  +
    ///
          49  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
          50  +
        match self {
          51  +
            Self::ErrorEvent(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
          52  +
            Self::Unhandled(e) => &e.meta,
          53  +
        }
          54  +
    }
          55  +
    /// Returns `true` if the error kind is `EventStreamError::ErrorEvent`.
          56  +
    pub fn is_error_event(&self) -> bool {
          57  +
        matches!(self, Self::ErrorEvent(_))
          58  +
    }
          59  +
}
          60  +
impl ::std::error::Error for EventStreamError {
          61  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
          62  +
        match self {
          63  +
            Self::ErrorEvent(_inner) => ::std::option::Option::Some(_inner),
          64  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
          65  +
        }
          66  +
    }
          67  +
}
          68  +
impl ::std::fmt::Display for EventStreamError {
          69  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          70  +
        match self {
          71  +
            Self::ErrorEvent(_inner) => _inner.fmt(f),
          72  +
            Self::Unhandled(_inner) => {
          73  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
          74  +
                    write!(f, "unhandled error ({code})")
          75  +
                } else {
          76  +
                    f.write_str("unhandled error")
          77  +
                }
          78  +
            }
          79  +
        }
          80  +
    }
          81  +
}
          82  +
impl ::aws_smithy_types::retry::ProvideErrorKind for EventStreamError {
          83  +
    fn code(&self) -> ::std::option::Option<&str> {
          84  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
          85  +
    }
          86  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
          87  +
        ::std::option::Option::None
          88  +
    }
          89  +
}
          90  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for EventStreamError {
          91  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
          92  +
        match self {
          93  +
            Self::ErrorEvent(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
          94  +
            Self::Unhandled(_inner) => &_inner.meta,
          95  +
        }
          96  +
    }
          97  +
}
          98  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for EventStreamError {
          99  +
    fn create_unhandled_error(
         100  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         101  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         102  +
    ) -> Self {
         103  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         104  +
            source,
         105  +
            meta: meta.unwrap_or_default(),
         106  +
        })
         107  +
    }
         108  +
}
    7    109   
    8    110   
mod _complex_error;
    9    111   
         112  +
mod _error_event;
         113  +
   10    114   
mod _foo_error;
   11    115   
   12    116   
mod _invalid_greeting;
   13    117   
         118  +
mod _service_unavailable_error;
         119  +
   14    120   
/// Builders
   15    121   
pub mod builders;

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

@@ -0,1 +0,80 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct ErrorEvent {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub message: ::std::option::Option<::std::string::String>,
           8  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
           9  +
}
          10  +
impl ErrorEvent {
          11  +
    /// Returns the error message.
          12  +
    pub fn message(&self) -> ::std::option::Option<&str> {
          13  +
        self.message.as_deref()
          14  +
    }
          15  +
}
          16  +
impl ::std::fmt::Display for ErrorEvent {
          17  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          18  +
        ::std::write!(f, "ErrorEvent")?;
          19  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
          20  +
            {
          21  +
                ::std::write!(f, ": {inner_1}")?;
          22  +
            }
          23  +
        }
          24  +
        Ok(())
          25  +
    }
          26  +
}
          27  +
impl ::std::error::Error for ErrorEvent {}
          28  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ErrorEvent {
          29  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
          30  +
        &self.meta
          31  +
    }
          32  +
}
          33  +
impl ErrorEvent {
          34  +
    /// Creates a new builder-style object to manufacture [`ErrorEvent`](crate::types::error::ErrorEvent).
          35  +
    pub fn builder() -> crate::types::error::builders::ErrorEventBuilder {
          36  +
        crate::types::error::builders::ErrorEventBuilder::default()
          37  +
    }
          38  +
}
          39  +
          40  +
/// A builder for [`ErrorEvent`](crate::types::error::ErrorEvent).
          41  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          42  +
#[non_exhaustive]
          43  +
pub struct ErrorEventBuilder {
          44  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
          45  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          46  +
}
          47  +
impl ErrorEventBuilder {
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          50  +
        self.message = ::std::option::Option::Some(input.into());
          51  +
        self
          52  +
    }
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          55  +
        self.message = input;
          56  +
        self
          57  +
    }
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
          60  +
        &self.message
          61  +
    }
          62  +
    /// Sets error metadata
          63  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
          64  +
        self.meta = Some(meta);
          65  +
        self
          66  +
    }
          67  +
          68  +
    /// Sets error metadata
          69  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
          70  +
        self.meta = meta;
          71  +
        self
          72  +
    }
          73  +
    /// Consumes the builder and constructs a [`ErrorEvent`](crate::types::error::ErrorEvent).
          74  +
    pub fn build(self) -> crate::types::error::ErrorEvent {
          75  +
        crate::types::error::ErrorEvent {
          76  +
            message: self.message,
          77  +
            meta: self.meta.unwrap_or_default(),
          78  +
        }
          79  +
    }
          80  +
}

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

@@ -0,1 +0,80 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct ServiceUnavailableError {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub message: ::std::option::Option<::std::string::String>,
           8  +
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
           9  +
}
          10  +
impl ServiceUnavailableError {
          11  +
    /// Returns the error message.
          12  +
    pub fn message(&self) -> ::std::option::Option<&str> {
          13  +
        self.message.as_deref()
          14  +
    }
          15  +
}
          16  +
impl ::std::fmt::Display for ServiceUnavailableError {
          17  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          18  +
        ::std::write!(f, "ServiceUnavailableError")?;
          19  +
        if let ::std::option::Option::Some(inner_1) = &self.message {
          20  +
            {
          21  +
                ::std::write!(f, ": {inner_1}")?;
          22  +
            }
          23  +
        }
          24  +
        Ok(())
          25  +
    }
          26  +
}
          27  +
impl ::std::error::Error for ServiceUnavailableError {}
          28  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ServiceUnavailableError {
          29  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
          30  +
        &self.meta
          31  +
    }
          32  +
}
          33  +
impl ServiceUnavailableError {
          34  +
    /// Creates a new builder-style object to manufacture [`ServiceUnavailableError`](crate::types::error::ServiceUnavailableError).
          35  +
    pub fn builder() -> crate::types::error::builders::ServiceUnavailableErrorBuilder {
          36  +
        crate::types::error::builders::ServiceUnavailableErrorBuilder::default()
          37  +
    }
          38  +
}
          39  +
          40  +
/// A builder for [`ServiceUnavailableError`](crate::types::error::ServiceUnavailableError).
          41  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          42  +
#[non_exhaustive]
          43  +
pub struct ServiceUnavailableErrorBuilder {
          44  +
    pub(crate) message: ::std::option::Option<::std::string::String>,
          45  +
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          46  +
}
          47  +
impl ServiceUnavailableErrorBuilder {
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          50  +
        self.message = ::std::option::Option::Some(input.into());
          51  +
        self
          52  +
    }
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          55  +
        self.message = input;
          56  +
        self
          57  +
    }
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
          60  +
        &self.message
          61  +
    }
          62  +
    /// Sets error metadata
          63  +
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
          64  +
        self.meta = Some(meta);
          65  +
        self
          66  +
    }
          67  +
          68  +
    /// Sets error metadata
          69  +
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
          70  +
        self.meta = meta;
          71  +
        self
          72  +
    }
          73  +
    /// Consumes the builder and constructs a [`ServiceUnavailableError`](crate::types::error::ServiceUnavailableError).
          74  +
    pub fn build(self) -> crate::types::error::ServiceUnavailableError {
          75  +
        crate::types::error::ServiceUnavailableError {
          76  +
            message: self.message,
          77  +
            meta: self.meta.unwrap_or_default(),
          78  +
        }
          79  +
    }
          80  +
}

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

@@ -1,1 +0,10 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_foo_error::FooErrorBuilder;
           2  +
pub use crate::types::error::_invalid_greeting::InvalidGreetingBuilder;
    3      3   
    4      4   
pub use crate::types::error::_complex_error::ComplexErrorBuilder;
    5      5   
    6         -
pub use crate::types::error::_invalid_greeting::InvalidGreetingBuilder;
           6  +
pub use crate::types::error::_foo_error::FooErrorBuilder;
           7  +
           8  +
pub use crate::types::error::_error_event::ErrorEventBuilder;
           9  +
          10  +
pub use crate::types::error::_service_unavailable_error::ServiceUnavailableErrorBuilder;

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/client.rs

@@ -112,112 +156,154 @@
  132    132   
/// # }
  133    133   
/// ```
  134    134   
pub mod customize;
  135    135   
  136    136   
mod empty_struct_with_content_on_wire_op;
  137    137   
  138    138   
mod enum_query;
  139    139   
  140    140   
mod escaped_string_values;
  141    141   
  142         -
mod http_query_params_only_operation;
  143         -
  144    142   
mod map_with_enum_key_op;
  145    143   
  146    144   
mod null_in_non_sparse;
  147    145   
  148    146   
mod primitive_int_header;
  149    147   
  150    148   
mod primitive_int_op;
  151    149   
  152    150   
mod query_precedence;
  153    151   

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/error_meta.rs

@@ -139,139 +227,198 @@
  159    159   
}
  160    160   
impl From<crate::operation::escaped_string_values::EscapedStringValuesError> for Error {
  161    161   
    fn from(err: crate::operation::escaped_string_values::EscapedStringValuesError) -> Self {
  162    162   
        match err {
  163    163   
            crate::operation::escaped_string_values::EscapedStringValuesError::ValidationError(inner) => Error::ValidationError(inner),
  164    164   
            crate::operation::escaped_string_values::EscapedStringValuesError::ExtraError(inner) => Error::ExtraError(inner),
  165    165   
            crate::operation::escaped_string_values::EscapedStringValuesError::Unhandled(inner) => Error::Unhandled(inner),
  166    166   
        }
  167    167   
    }
  168    168   
}
  169         -
impl<R>
  170         -
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError, R>>
  171         -
    for Error
  172         -
where
  173         -
    R: Send + Sync + std::fmt::Debug + 'static,
  174         -
{
  175         -
    fn from(
  176         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  177         -
            crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError,
  178         -
            R,
  179         -
        >,
  180         -
    ) -> Self {
  181         -
        match err {
  182         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  183         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  184         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  185         -
                source: err.into(),
  186         -
            }),
  187         -
        }
  188         -
    }
  189         -
}
  190         -
impl From<crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError> for Error {
  191         -
    fn from(err: crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError) -> Self {
  192         -
        match err {
  193         -
            crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError::ExtraError(inner) => Error::ExtraError(inner),
  194         -
            crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError::Unhandled(inner) => Error::Unhandled(inner),
  195         -
        }
  196         -
    }
  197         -
}
  198    169   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::map_with_enum_key_op::MapWithEnumKeyOpError, R>> for Error
  199    170   
where
  200    171   
    R: Send + Sync + std::fmt::Debug + 'static,
  201    172   
{
  202    173   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::map_with_enum_key_op::MapWithEnumKeyOpError, R>) -> Self {
  203    174   
        match err {
  204    175   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  205    176   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  206    177   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  207    178   
                source: err.into(),

tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation.rs

@@ -1,1 +37,34 @@
    5      5   
    6      6   
/// Types for the `EmptyStructWithContentOnWireOp` operation.
    7      7   
pub mod empty_struct_with_content_on_wire_op;
    8      8   
    9      9   
/// Types for the `EnumQuery` operation.
   10     10   
pub mod enum_query;
   11     11   
   12     12   
/// Types for the `EscapedStringValues` operation.
   13     13   
pub mod escaped_string_values;
   14     14   
   15         -
/// Types for the `HttpQueryParamsOnlyOperation` operation.
   16         -
pub mod http_query_params_only_operation;
   17         -
   18     15   
/// Types for the `MapWithEnumKeyOp` operation.
   19     16   
pub mod map_with_enum_key_op;
   20     17   
   21     18   
/// Types for the `NullInNonSparse` operation.
   22     19   
pub mod null_in_non_sparse;
   23     20   
   24     21   
/// Types for the `PrimitiveIntHeader` operation.
   25     22   
pub mod primitive_int_header;
   26     23   
   27     24   
/// Types for the `PrimitiveIntOp` operation.