Client Test

Client Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c

Files changed:

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

@@ -0,1 +0,94 @@
           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 Dialog {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub language: ::std::option::Option<::std::string::String>,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub greeting: ::std::string::String,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub farewell: ::std::option::Option<crate::types::Farewell>,
          12  +
}
          13  +
impl Dialog {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn language(&self) -> ::std::option::Option<&str> {
          16  +
        self.language.as_deref()
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn greeting(&self) -> &str {
          20  +
        use std::ops::Deref;
          21  +
        self.greeting.deref()
          22  +
    }
          23  +
    #[allow(missing_docs)] // documentation missing in model
          24  +
    pub fn farewell(&self) -> ::std::option::Option<&crate::types::Farewell> {
          25  +
        self.farewell.as_ref()
          26  +
    }
          27  +
}
          28  +
impl Dialog {
          29  +
    /// Creates a new builder-style object to manufacture [`Dialog`](crate::types::Dialog).
          30  +
    pub fn builder() -> crate::types::builders::DialogBuilder {
          31  +
        crate::types::builders::DialogBuilder::default()
          32  +
    }
          33  +
}
          34  +
          35  +
/// A builder for [`Dialog`](crate::types::Dialog).
          36  +
#[non_exhaustive]
          37  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          38  +
pub struct DialogBuilder {
          39  +
    pub(crate) language: ::std::option::Option<::std::string::String>,
          40  +
    pub(crate) greeting: ::std::option::Option<::std::string::String>,
          41  +
    pub(crate) farewell: ::std::option::Option<crate::types::Farewell>,
          42  +
}
          43  +
impl DialogBuilder {
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          46  +
        self.language = ::std::option::Option::Some(input.into());
          47  +
        self
          48  +
    }
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          51  +
        self.language = input;
          52  +
        self
          53  +
    }
          54  +
    #[allow(missing_docs)] // documentation missing in model
          55  +
    pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
          56  +
        &self.language
          57  +
    }
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    pub fn greeting(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          60  +
        self.greeting = ::std::option::Option::Some(input.into());
          61  +
        self
          62  +
    }
          63  +
    #[allow(missing_docs)] // documentation missing in model
          64  +
    pub fn set_greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          65  +
        self.greeting = input;
          66  +
        self
          67  +
    }
          68  +
    #[allow(missing_docs)] // documentation missing in model
          69  +
    pub fn get_greeting(&self) -> &::std::option::Option<::std::string::String> {
          70  +
        &self.greeting
          71  +
    }
          72  +
    #[allow(missing_docs)] // documentation missing in model
          73  +
    pub fn farewell(mut self, input: crate::types::Farewell) -> Self {
          74  +
        self.farewell = ::std::option::Option::Some(input);
          75  +
        self
          76  +
    }
          77  +
    #[allow(missing_docs)] // documentation missing in model
          78  +
    pub fn set_farewell(mut self, input: ::std::option::Option<crate::types::Farewell>) -> Self {
          79  +
        self.farewell = input;
          80  +
        self
          81  +
    }
          82  +
    #[allow(missing_docs)] // documentation missing in model
          83  +
    pub fn get_farewell(&self) -> &::std::option::Option<crate::types::Farewell> {
          84  +
        &self.farewell
          85  +
    }
          86  +
    /// Consumes the builder and constructs a [`Dialog`](crate::types::Dialog).
          87  +
    pub fn build(self) -> crate::types::Dialog {
          88  +
        crate::types::Dialog {
          89  +
            language: self.language,
          90  +
            greeting: self.greeting.unwrap_or_else(|| "hi".to_owned()),
          91  +
            farewell: self.farewell,
          92  +
        }
          93  +
    }
          94  +
}

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

@@ -0,1 +0,50 @@
           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 Farewell {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub phrase: ::std::string::String,
           8  +
}
           9  +
impl Farewell {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn phrase(&self) -> &str {
          12  +
        use std::ops::Deref;
          13  +
        self.phrase.deref()
          14  +
    }
          15  +
}
          16  +
impl Farewell {
          17  +
    /// Creates a new builder-style object to manufacture [`Farewell`](crate::types::Farewell).
          18  +
    pub fn builder() -> crate::types::builders::FarewellBuilder {
          19  +
        crate::types::builders::FarewellBuilder::default()
          20  +
    }
          21  +
}
          22  +
          23  +
/// A builder for [`Farewell`](crate::types::Farewell).
          24  +
#[non_exhaustive]
          25  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          26  +
pub struct FarewellBuilder {
          27  +
    pub(crate) phrase: ::std::option::Option<::std::string::String>,
          28  +
}
          29  +
impl FarewellBuilder {
          30  +
    #[allow(missing_docs)] // documentation missing in model
          31  +
    pub fn phrase(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          32  +
        self.phrase = ::std::option::Option::Some(input.into());
          33  +
        self
          34  +
    }
          35  +
    #[allow(missing_docs)] // documentation missing in model
          36  +
    pub fn set_phrase(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          37  +
        self.phrase = input;
          38  +
        self
          39  +
    }
          40  +
    #[allow(missing_docs)] // documentation missing in model
          41  +
    pub fn get_phrase(&self) -> &::std::option::Option<::std::string::String> {
          42  +
        &self.phrase
          43  +
    }
          44  +
    /// Consumes the builder and constructs a [`Farewell`](crate::types::Farewell).
          45  +
    pub fn build(self) -> crate::types::Farewell {
          46  +
        crate::types::Farewell {
          47  +
            phrase: self.phrase.unwrap_or_else(|| "bye".to_owned()),
          48  +
        }
          49  +
    }
          50  +
}

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

@@ -0,1 +0,113 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// When writing a match expression against `TestEnum`, it is important to ensure
           4  +
/// your code is forward-compatible. That is, if a match arm handles a case for a
           5  +
/// feature that is supported by the service but has not been represented as an enum
           6  +
/// variant in a current version of SDK, your code should continue to work when you
           7  +
/// upgrade SDK to a future version in which the enum does include a variant for that
           8  +
/// feature.
           9  +
///
          10  +
/// Here is an example of how you can make a match expression forward-compatible:
          11  +
///
          12  +
/// ```text
          13  +
/// # let testenum = unimplemented!();
          14  +
/// match testenum {
          15  +
///     TestEnum::Bar => { /* ... */ },
          16  +
///     TestEnum::Baz => { /* ... */ },
          17  +
///     TestEnum::Foo => { /* ... */ },
          18  +
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          19  +
///     _ => { /* ... */ },
          20  +
/// }
          21  +
/// ```
          22  +
/// The above code demonstrates that when `testenum` represents
          23  +
/// `NewFeature`, the execution path will lead to the second last match arm,
          24  +
/// even though the enum does not contain a variant `TestEnum::NewFeature`
          25  +
/// in the current version of SDK. The reason is that the variable `other`,
          26  +
/// created by the `@` operator, is bound to
          27  +
/// `TestEnum::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
          28  +
/// and calling `as_str` on it yields `"NewFeature"`.
          29  +
/// This match expression is forward-compatible when executed with a newer
          30  +
/// version of SDK where the variant `TestEnum::NewFeature` is defined.
          31  +
/// Specifically, when `testenum` represents `NewFeature`,
          32  +
/// the execution path will hit the second last match arm as before by virtue of
          33  +
/// calling `as_str` on `TestEnum::NewFeature` also yielding `"NewFeature"`.
          34  +
///
          35  +
/// Explicitly matching on the `Unknown` variant should
          36  +
/// be avoided for two reasons:
          37  +
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
          38  +
/// - It might inadvertently shadow other intended match arms.
          39  +
#[allow(missing_docs)] // documentation missing in model
          40  +
#[non_exhaustive]
          41  +
#[derive(
          42  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
          43  +
)]
          44  +
pub enum TestEnum {
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    Bar,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    Baz,
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    Foo,
          51  +
    /// `Unknown` contains new variants that have been added since this code was generated.
          52  +
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
          53  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          54  +
}
          55  +
impl ::std::convert::From<&str> for TestEnum {
          56  +
    fn from(s: &str) -> Self {
          57  +
        match s {
          58  +
            "BAR" => TestEnum::Bar,
          59  +
            "BAZ" => TestEnum::Baz,
          60  +
            "FOO" => TestEnum::Foo,
          61  +
            other => TestEnum::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
          62  +
        }
          63  +
    }
          64  +
}
          65  +
impl ::std::str::FromStr for TestEnum {
          66  +
    type Err = ::std::convert::Infallible;
          67  +
          68  +
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
          69  +
        ::std::result::Result::Ok(TestEnum::from(s))
          70  +
    }
          71  +
}
          72  +
impl TestEnum {
          73  +
    /// Returns the `&str` value of the enum member.
          74  +
    pub fn as_str(&self) -> &str {
          75  +
        match self {
          76  +
            TestEnum::Bar => "BAR",
          77  +
            TestEnum::Baz => "BAZ",
          78  +
            TestEnum::Foo => "FOO",
          79  +
            TestEnum::Unknown(value) => value.as_str(),
          80  +
        }
          81  +
    }
          82  +
    /// Returns all the `&str` representations of the enum members.
          83  +
    pub const fn values() -> &'static [&'static str] {
          84  +
        &["BAR", "BAZ", "FOO"]
          85  +
    }
          86  +
}
          87  +
impl ::std::convert::AsRef<str> for TestEnum {
          88  +
    fn as_ref(&self) -> &str {
          89  +
        self.as_str()
          90  +
    }
          91  +
}
          92  +
impl TestEnum {
          93  +
    /// Parses the enum value while disallowing unknown variants.
          94  +
    ///
          95  +
    /// Unknown variants will result in an error.
          96  +
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
          97  +
        match Self::from(value) {
          98  +
            #[allow(deprecated)]
          99  +
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
         100  +
            known => Ok(known),
         101  +
        }
         102  +
    }
         103  +
}
         104  +
impl ::std::fmt::Display for TestEnum {
         105  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
         106  +
        match self {
         107  +
            TestEnum::Bar => write!(f, "BAR"),
         108  +
            TestEnum::Baz => write!(f, "BAZ"),
         109  +
            TestEnum::Foo => write!(f, "FOO"),
         110  +
            TestEnum::Unknown(value) => write!(f, "{}", value),
         111  +
        }
         112  +
    }
         113  +
}

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

@@ -0,1 +0,112 @@
           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 TopLevel {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub dialog: crate::types::Dialog,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub dialog_list: ::std::vec::Vec<crate::types::Dialog>,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::types::Dialog>,
          12  +
}
          13  +
impl TopLevel {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn dialog(&self) -> &crate::types::Dialog {
          16  +
        &self.dialog
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn dialog_list(&self) -> &[crate::types::Dialog] {
          20  +
        use std::ops::Deref;
          21  +
        self.dialog_list.deref()
          22  +
    }
          23  +
    #[allow(missing_docs)] // documentation missing in model
          24  +
    pub fn dialog_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::Dialog> {
          25  +
        &self.dialog_map
          26  +
    }
          27  +
}
          28  +
impl TopLevel {
          29  +
    /// Creates a new builder-style object to manufacture [`TopLevel`](crate::types::TopLevel).
          30  +
    pub fn builder() -> crate::types::builders::TopLevelBuilder {
          31  +
        crate::types::builders::TopLevelBuilder::default()
          32  +
    }
          33  +
}
          34  +
          35  +
/// A builder for [`TopLevel`](crate::types::TopLevel).
          36  +
#[non_exhaustive]
          37  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          38  +
pub struct TopLevelBuilder {
          39  +
    pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
          40  +
    pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          41  +
    pub(crate) dialog_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>,
          42  +
}
          43  +
impl TopLevelBuilder {
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    /// This field is required.
          46  +
    pub fn dialog(mut self, input: crate::types::Dialog) -> Self {
          47  +
        self.dialog = ::std::option::Option::Some(input);
          48  +
        self
          49  +
    }
          50  +
    #[allow(missing_docs)] // documentation missing in model
          51  +
    pub fn set_dialog(mut self, input: ::std::option::Option<crate::types::Dialog>) -> Self {
          52  +
        self.dialog = input;
          53  +
        self
          54  +
    }
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    pub fn get_dialog(&self) -> &::std::option::Option<crate::types::Dialog> {
          57  +
        &self.dialog
          58  +
    }
          59  +
    /// Appends an item to `dialog_list`.
          60  +
    ///
          61  +
    /// To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
          62  +
    ///
          63  +
    pub fn dialog_list(mut self, input: crate::types::Dialog) -> Self {
          64  +
        let mut v = self.dialog_list.unwrap_or_default();
          65  +
        v.push(input);
          66  +
        self.dialog_list = ::std::option::Option::Some(v);
          67  +
        self
          68  +
    }
          69  +
    #[allow(missing_docs)] // documentation missing in model
          70  +
    pub fn set_dialog_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>) -> Self {
          71  +
        self.dialog_list = input;
          72  +
        self
          73  +
    }
          74  +
    #[allow(missing_docs)] // documentation missing in model
          75  +
    pub fn get_dialog_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Dialog>> {
          76  +
        &self.dialog_list
          77  +
    }
          78  +
    /// Adds a key-value pair to `dialog_map`.
          79  +
    ///
          80  +
    /// To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
          81  +
    ///
          82  +
    pub fn dialog_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Dialog) -> Self {
          83  +
        let mut hash_map = self.dialog_map.unwrap_or_default();
          84  +
        hash_map.insert(k.into(), v);
          85  +
        self.dialog_map = ::std::option::Option::Some(hash_map);
          86  +
        self
          87  +
    }
          88  +
    #[allow(missing_docs)] // documentation missing in model
          89  +
    pub fn set_dialog_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>) -> Self {
          90  +
        self.dialog_map = input;
          91  +
        self
          92  +
    }
          93  +
    #[allow(missing_docs)] // documentation missing in model
          94  +
    pub fn get_dialog_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>> {
          95  +
        &self.dialog_map
          96  +
    }
          97  +
    /// Consumes the builder and constructs a [`TopLevel`](crate::types::TopLevel).
          98  +
    /// This method will fail if any of the following fields are not set:
          99  +
    /// - [`dialog`](crate::types::builders::TopLevelBuilder::dialog)
         100  +
    pub fn build(self) -> ::std::result::Result<crate::types::TopLevel, ::aws_smithy_types::error::operation::BuildError> {
         101  +
        ::std::result::Result::Ok(crate::types::TopLevel {
         102  +
            dialog: self.dialog.ok_or_else(|| {
         103  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         104  +
                    "dialog",
         105  +
                    "dialog was not specified but it is required when building TopLevel",
         106  +
                )
         107  +
            })?,
         108  +
            dialog_list: self.dialog_list.unwrap_or_default(),
         109  +
            dialog_map: self.dialog_map.unwrap_or_default(),
         110  +
        })
         111  +
    }
         112  +
}

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

@@ -1,1 +20,30 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::types::_dialog::DialogBuilder;
           3  +
           4  +
pub use crate::types::_farewell::FarewellBuilder;
           5  +
           6  +
pub use crate::types::_top_level::TopLevelBuilder;
           7  +
           8  +
pub use crate::types::_client_optional_defaults::ClientOptionalDefaultsBuilder;
           9  +
          10  +
pub use crate::types::_defaults::DefaultsBuilder;
          11  +
    2     12   
pub use crate::types::_payload_config::PayloadConfigBuilder;
    3     13   
    4     14   
pub use crate::types::_test_config::TestConfigBuilder;
    5     15   
    6     16   
pub use crate::types::_unit::UnitBuilder;
    7     17   
    8     18   
pub use crate::types::_renamed_greeting::RenamedGreetingBuilder;
    9     19   
   10     20   
pub use crate::types::_greeting_struct::GreetingStructBuilder;
   11     21   

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

@@ -112,112 +162,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_enum_payload2;
  143         -
  144         -
mod http_payload_traits2;
  145         -
  146         -
mod http_string_payload2;
  147         -
  148         -
mod malformed_content_type_with_body2;
  149         -
  150    142   
mod map_with_enum_key_op;
  151    143   
  152    144   
mod null_in_non_sparse;
  153    145   
  154    146   
mod primitive_int_header;
  155    147   
  156    148   
mod primitive_int_op;
  157    149   
  158    150   
mod query_precedence;
  159    151   

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
impl super::Client {
    3         -
    /// Constructs a fluent builder for the [`HttpEnumPayload2`](crate::operation::http_enum_payload2::builders::HttpEnumPayload2FluentBuilder) operation.
    4         -
    ///
    5         -
    /// - The fluent builder is configurable:
    6         -
    ///   - [`payload(StringEnum)`](crate::operation::http_enum_payload2::builders::HttpEnumPayload2FluentBuilder::payload) / [`set_payload(Option<StringEnum>)`](crate::operation::http_enum_payload2::builders::HttpEnumPayload2FluentBuilder::set_payload):<br>required: **false**<br>(undocumented)<br>
    7         -
    /// - On success, responds with [`HttpEnumPayload2Output`](crate::operation::http_enum_payload2::HttpEnumPayload2Output) with field(s):
    8         -
    ///   - [`payload(Option<StringEnum>)`](crate::operation::http_enum_payload2::HttpEnumPayload2Output::payload): (undocumented)
    9         -
    /// - On failure, responds with [`SdkError<HttpEnumPayload2Error>`](crate::operation::http_enum_payload2::HttpEnumPayload2Error)
   10         -
    pub fn http_enum_payload2(&self) -> crate::operation::http_enum_payload2::builders::HttpEnumPayload2FluentBuilder {
   11         -
        crate::operation::http_enum_payload2::builders::HttpEnumPayload2FluentBuilder::new(self.handle.clone())
   12         -
    }
   13         -
}

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

@@ -1,0 +15,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
impl super::Client {
    3         -
    /// Constructs a fluent builder for the [`HttpPayloadTraits2`](crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder) operation.
    4         -
    ///
    5         -
    /// - The fluent builder is configurable:
    6         -
    ///   - [`foo(impl Into<String>)`](crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder::foo) / [`set_foo(Option<String>)`](crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder::set_foo):<br>required: **false**<br>(undocumented)<br>
    7         -
    ///   - [`blob(Blob)`](crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder::blob) / [`set_blob(Option<Blob>)`](crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder::set_blob):<br>required: **false**<br>(undocumented)<br>
    8         -
    /// - On success, responds with [`HttpPayloadTraits2Output`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output) with field(s):
    9         -
    ///   - [`foo(Option<String>)`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output::foo): (undocumented)
   10         -
    ///   - [`blob(Option<Blob>)`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output::blob): (undocumented)
   11         -
    /// - On failure, responds with [`SdkError<HttpPayloadTraits2Error>`](crate::operation::http_payload_traits2::HttpPayloadTraits2Error)
   12         -
    pub fn http_payload_traits2(&self) -> crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder {
   13         -
        crate::operation::http_payload_traits2::builders::HttpPayloadTraits2FluentBuilder::new(self.handle.clone())
   14         -
    }
   15         -
}

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

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
impl super::Client {
    3         -
    /// Constructs a fluent builder for the [`HttpStringPayload2`](crate::operation::http_string_payload2::builders::HttpStringPayload2FluentBuilder) operation.
    4         -
    ///
    5         -
    /// - The fluent builder is configurable:
    6         -
    ///   - [`payload(impl Into<String>)`](crate::operation::http_string_payload2::builders::HttpStringPayload2FluentBuilder::payload) / [`set_payload(Option<String>)`](crate::operation::http_string_payload2::builders::HttpStringPayload2FluentBuilder::set_payload):<br>required: **false**<br>(undocumented)<br>
    7         -
    /// - On success, responds with [`HttpStringPayload2Output`](crate::operation::http_string_payload2::HttpStringPayload2Output) with field(s):
    8         -
    ///   - [`payload(Option<String>)`](crate::operation::http_string_payload2::HttpStringPayload2Output::payload): (undocumented)
    9         -
    /// - On failure, responds with [`SdkError<HttpStringPayload2Error>`](crate::operation::http_string_payload2::HttpStringPayload2Error)
   10         -
    pub fn http_string_payload2(&self) -> crate::operation::http_string_payload2::builders::HttpStringPayload2FluentBuilder {
   11         -
        crate::operation::http_string_payload2::builders::HttpStringPayload2FluentBuilder::new(self.handle.clone())
   12         -
    }
   13         -
}

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

@@ -1,0 +14,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
impl super::Client {
    3         -
    /// Constructs a fluent builder for the [`MalformedContentTypeWithBody2`](crate::operation::malformed_content_type_with_body2::builders::MalformedContentTypeWithBody2FluentBuilder) operation.
    4         -
    ///
    5         -
    /// - The fluent builder is configurable:
    6         -
    ///   - [`salutation(impl Into<String>)`](crate::operation::malformed_content_type_with_body2::builders::MalformedContentTypeWithBody2FluentBuilder::salutation) / [`set_salutation(Option<String>)`](crate::operation::malformed_content_type_with_body2::builders::MalformedContentTypeWithBody2FluentBuilder::set_salutation):<br>required: **false**<br>(undocumented)<br>
    7         -
    /// - On success, responds with [`MalformedContentTypeWithBody2Output`](crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Output)
    8         -
    /// - On failure, responds with [`SdkError<MalformedContentTypeWithBody2Error>`](crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error)
    9         -
    pub fn malformed_content_type_with_body2(
   10         -
        &self,
   11         -
    ) -> crate::operation::malformed_content_type_with_body2::builders::MalformedContentTypeWithBody2FluentBuilder {
   12         -
        crate::operation::malformed_content_type_with_body2::builders::MalformedContentTypeWithBody2FluentBuilder::new(self.handle.clone())
   13         -
    }
   14         -
}

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

@@ -139,139 +298,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> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_enum_payload2::HttpEnumPayload2Error, R>> for Error
  170         -
where
  171         -
    R: Send + Sync + std::fmt::Debug + 'static,
  172         -
{
  173         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_enum_payload2::HttpEnumPayload2Error, R>) -> Self {
  174         -
        match err {
  175         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  176         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  177         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  178         -
                source: err.into(),
  179         -
            }),
  180         -
        }
  181         -
    }
  182         -
}
  183         -
impl From<crate::operation::http_enum_payload2::HttpEnumPayload2Error> for Error {
  184         -
    fn from(err: crate::operation::http_enum_payload2::HttpEnumPayload2Error) -> Self {
  185         -
        match err {
  186         -
            crate::operation::http_enum_payload2::HttpEnumPayload2Error::ValidationError(inner) => Error::ValidationError(inner),
  187         -
            crate::operation::http_enum_payload2::HttpEnumPayload2Error::ExtraError(inner) => Error::ExtraError(inner),
  188         -
            crate::operation::http_enum_payload2::HttpEnumPayload2Error::Unhandled(inner) => Error::Unhandled(inner),
  189         -
        }
  190         -
    }
  191         -
}
  192         -
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_payload_traits2::HttpPayloadTraits2Error, R>> for Error
  193         -
where
  194         -
    R: Send + Sync + std::fmt::Debug + 'static,
  195         -
{
  196         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_payload_traits2::HttpPayloadTraits2Error, R>) -> Self {
  197         -
        match err {
  198         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  199         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  200         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  201         -
                source: err.into(),
  202         -
            }),
  203         -
        }
  204         -
    }
  205         -
}
  206         -
impl From<crate::operation::http_payload_traits2::HttpPayloadTraits2Error> for Error {
  207         -
    fn from(err: crate::operation::http_payload_traits2::HttpPayloadTraits2Error) -> Self {
  208         -
        match err {
  209         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error::ExtraError(inner) => Error::ExtraError(inner),
  210         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error::Unhandled(inner) => Error::Unhandled(inner),
  211         -
        }
  212         -
    }
  213         -
}
  214         -
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_string_payload2::HttpStringPayload2Error, R>> for Error
  215         -
where
  216         -
    R: Send + Sync + std::fmt::Debug + 'static,
  217         -
{
  218         -
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_string_payload2::HttpStringPayload2Error, R>) -> Self {
  219         -
        match err {
  220         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  221         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  222         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  223         -
                source: err.into(),
  224         -
            }),
  225         -
        }
  226         -
    }
  227         -
}
  228         -
impl From<crate::operation::http_string_payload2::HttpStringPayload2Error> for Error {
  229         -
    fn from(err: crate::operation::http_string_payload2::HttpStringPayload2Error) -> Self {
  230         -
        match err {
  231         -
            crate::operation::http_string_payload2::HttpStringPayload2Error::ExtraError(inner) => Error::ExtraError(inner),
  232         -
            crate::operation::http_string_payload2::HttpStringPayload2Error::Unhandled(inner) => Error::Unhandled(inner),
  233         -
        }
  234         -
    }
  235         -
}
  236         -
impl<R>
  237         -
    From<
  238         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  239         -
            crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error,
  240         -
            R,
  241         -
        >,
  242         -
    > for Error
  243         -
where
  244         -
    R: Send + Sync + std::fmt::Debug + 'static,
  245         -
{
  246         -
    fn from(
  247         -
        err: ::aws_smithy_runtime_api::client::result::SdkError<
  248         -
            crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error,
  249         -
            R,
  250         -
        >,
  251         -
    ) -> Self {
  252         -
        match err {
  253         -
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  254         -
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  255         -
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  256         -
                source: err.into(),
  257         -
            }),
  258         -
        }
  259         -
    }
  260         -
}
  261         -
impl From<crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error> for Error {
  262         -
    fn from(err: crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error) -> Self {
  263         -
        match err {
  264         -
            crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error::ExtraError(inner) => Error::ExtraError(inner),
  265         -
            crate::operation::malformed_content_type_with_body2::MalformedContentTypeWithBody2Error::Unhandled(inner) => Error::Unhandled(inner),
  266         -
        }
  267         -
    }
  268         -
}
  269    169   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::map_with_enum_key_op::MapWithEnumKeyOpError, R>> for Error
  270    170   
where
  271    171   
    R: Send + Sync + std::fmt::Debug + 'static,
  272    172   
{
  273    173   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::map_with_enum_key_op::MapWithEnumKeyOpError, R>) -> Self {
  274    174   
        match err {
  275    175   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  276    176   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  277    177   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  278    178   
                source: err.into(),

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

@@ -1,1 +46,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 `HttpEnumPayload2` operation.
   16         -
pub mod http_enum_payload2;
   17         -
   18         -
/// Types for the `HttpPayloadTraits2` operation.
   19         -
pub mod http_payload_traits2;
   20         -
   21         -
/// Types for the `HttpStringPayload2` operation.
   22         -
pub mod http_string_payload2;
   23         -
   24         -
/// Types for the `MalformedContentTypeWithBody2` operation.
   25         -
pub mod malformed_content_type_with_body2;
   26         -
   27     15   
/// Types for the `MapWithEnumKeyOp` operation.
   28     16   
pub mod map_with_enum_key_op;
   29     17   
   30     18   
/// Types for the `NullInNonSparse` operation.
   31     19   
pub mod null_in_non_sparse;
   32     20   
   33     21   
/// Types for the `PrimitiveIntHeader` operation.
   34     22   
pub mod primitive_int_header;
   35     23   
   36     24   
/// Types for the `PrimitiveIntOp` operation.

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

@@ -1,0 +49,0 @@
    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 HttpEnumPayload2Input {
    6         -
    #[allow(missing_docs)] // documentation missing in model
    7         -
    pub payload: ::std::option::Option<crate::types::StringEnum>,
    8         -
}
    9         -
impl HttpEnumPayload2Input {
   10         -
    #[allow(missing_docs)] // documentation missing in model
   11         -
    pub fn payload(&self) -> ::std::option::Option<&crate::types::StringEnum> {
   12         -
        self.payload.as_ref()
   13         -
    }
   14         -
}
   15         -
impl HttpEnumPayload2Input {
   16         -
    /// Creates a new builder-style object to manufacture [`HttpEnumPayload2Input`](crate::operation::http_enum_payload2::HttpEnumPayload2Input).
   17         -
    pub fn builder() -> crate::operation::http_enum_payload2::builders::HttpEnumPayload2InputBuilder {
   18         -
        crate::operation::http_enum_payload2::builders::HttpEnumPayload2InputBuilder::default()
   19         -
    }
   20         -
}
   21         -
   22         -
/// A builder for [`HttpEnumPayload2Input`](crate::operation::http_enum_payload2::HttpEnumPayload2Input).
   23         -
#[non_exhaustive]
   24         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   25         -
pub struct HttpEnumPayload2InputBuilder {
   26         -
    pub(crate) payload: ::std::option::Option<crate::types::StringEnum>,
   27         -
}
   28         -
impl HttpEnumPayload2InputBuilder {
   29         -
    #[allow(missing_docs)] // documentation missing in model
   30         -
    pub fn payload(mut self, input: crate::types::StringEnum) -> 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::StringEnum>) -> 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::StringEnum> {
   41         -
        &self.payload
   42         -
    }
   43         -
    /// Consumes the builder and constructs a [`HttpEnumPayload2Input`](crate::operation::http_enum_payload2::HttpEnumPayload2Input).
   44         -
    pub fn build(
   45         -
        self,
   46         -
    ) -> ::std::result::Result<crate::operation::http_enum_payload2::HttpEnumPayload2Input, ::aws_smithy_types::error::operation::BuildError> {
   47         -
        ::std::result::Result::Ok(crate::operation::http_enum_payload2::HttpEnumPayload2Input { payload: self.payload })
   48         -
    }
   49         -
}

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

@@ -1,0 +47,0 @@
    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 HttpEnumPayload2Output {
    6         -
    #[allow(missing_docs)] // documentation missing in model
    7         -
    pub payload: ::std::option::Option<crate::types::StringEnum>,
    8         -
}
    9         -
impl HttpEnumPayload2Output {
   10         -
    #[allow(missing_docs)] // documentation missing in model
   11         -
    pub fn payload(&self) -> ::std::option::Option<&crate::types::StringEnum> {
   12         -
        self.payload.as_ref()
   13         -
    }
   14         -
}
   15         -
impl HttpEnumPayload2Output {
   16         -
    /// Creates a new builder-style object to manufacture [`HttpEnumPayload2Output`](crate::operation::http_enum_payload2::HttpEnumPayload2Output).
   17         -
    pub fn builder() -> crate::operation::http_enum_payload2::builders::HttpEnumPayload2OutputBuilder {
   18         -
        crate::operation::http_enum_payload2::builders::HttpEnumPayload2OutputBuilder::default()
   19         -
    }
   20         -
}
   21         -
   22         -
/// A builder for [`HttpEnumPayload2Output`](crate::operation::http_enum_payload2::HttpEnumPayload2Output).
   23         -
#[non_exhaustive]
   24         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   25         -
pub struct HttpEnumPayload2OutputBuilder {
   26         -
    pub(crate) payload: ::std::option::Option<crate::types::StringEnum>,
   27         -
}
   28         -
impl HttpEnumPayload2OutputBuilder {
   29         -
    #[allow(missing_docs)] // documentation missing in model
   30         -
    pub fn payload(mut self, input: crate::types::StringEnum) -> 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::StringEnum>) -> 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::StringEnum> {
   41         -
        &self.payload
   42         -
    }
   43         -
    /// Consumes the builder and constructs a [`HttpEnumPayload2Output`](crate::operation::http_enum_payload2::HttpEnumPayload2Output).
   44         -
    pub fn build(self) -> crate::operation::http_enum_payload2::HttpEnumPayload2Output {
   45         -
        crate::operation::http_enum_payload2::HttpEnumPayload2Output { payload: self.payload }
   46         -
    }
   47         -
}

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

@@ -1,0 +74,0 @@
    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 HttpPayloadTraits2Input {
    6         -
    #[allow(missing_docs)] // documentation missing in model
    7         -
    pub foo: ::std::option::Option<::std::string::String>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
    9         -
    pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
   10         -
}
   11         -
impl HttpPayloadTraits2Input {
   12         -
    #[allow(missing_docs)] // documentation missing in model
   13         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
   14         -
        self.foo.as_deref()
   15         -
    }
   16         -
    #[allow(missing_docs)] // documentation missing in model
   17         -
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
   18         -
        self.blob.as_ref()
   19         -
    }
   20         -
}
   21         -
impl HttpPayloadTraits2Input {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpPayloadTraits2Input`](crate::operation::http_payload_traits2::HttpPayloadTraits2Input).
   23         -
    pub fn builder() -> crate::operation::http_payload_traits2::builders::HttpPayloadTraits2InputBuilder {
   24         -
        crate::operation::http_payload_traits2::builders::HttpPayloadTraits2InputBuilder::default()
   25         -
    }
   26         -
}
   27         -
   28         -
/// A builder for [`HttpPayloadTraits2Input`](crate::operation::http_payload_traits2::HttpPayloadTraits2Input).
   29         -
#[non_exhaustive]
   30         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   31         -
pub struct HttpPayloadTraits2InputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
   34         -
}
   35         -
impl HttpPayloadTraits2InputBuilder {
   36         -
    #[allow(missing_docs)] // documentation missing in model
   37         -
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
   38         -
        self.foo = ::std::option::Option::Some(input.into());
   39         -
        self
   40         -
    }
   41         -
    #[allow(missing_docs)] // documentation missing in model
   42         -
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
   43         -
        self.foo = input;
   44         -
        self
   45         -
    }
   46         -
    #[allow(missing_docs)] // documentation missing in model
   47         -
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
   48         -
        &self.foo
   49         -
    }
   50         -
    #[allow(missing_docs)] // documentation missing in model
   51         -
    pub fn blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
   52         -
        self.blob = ::std::option::Option::Some(input);
   53         -
        self
   54         -
    }
   55         -
    #[allow(missing_docs)] // documentation missing in model
   56         -
    pub fn set_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
   57         -
        self.blob = input;
   58         -
        self
   59         -
    }
   60         -
    #[allow(missing_docs)] // documentation missing in model
   61         -
    pub fn get_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
   62         -
        &self.blob
   63         -
    }
   64         -
    /// Consumes the builder and constructs a [`HttpPayloadTraits2Input`](crate::operation::http_payload_traits2::HttpPayloadTraits2Input).
   65         -
    pub fn build(
   66         -
        self,
   67         -
    ) -> ::std::result::Result<crate::operation::http_payload_traits2::HttpPayloadTraits2Input, ::aws_smithy_types::error::operation::BuildError>
   68         -
    {
   69         -
        ::std::result::Result::Ok(crate::operation::http_payload_traits2::HttpPayloadTraits2Input {
   70         -
            foo: self.foo,
   71         -
            blob: self.blob,
   72         -
        })
   73         -
    }
   74         -
}

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

@@ -1,0 +71,0 @@
    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 HttpPayloadTraits2Output {
    6         -
    #[allow(missing_docs)] // documentation missing in model
    7         -
    pub foo: ::std::option::Option<::std::string::String>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
    9         -
    pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
   10         -
}
   11         -
impl HttpPayloadTraits2Output {
   12         -
    #[allow(missing_docs)] // documentation missing in model
   13         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
   14         -
        self.foo.as_deref()
   15         -
    }
   16         -
    #[allow(missing_docs)] // documentation missing in model
   17         -
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
   18         -
        self.blob.as_ref()
   19         -
    }
   20         -
}
   21         -
impl HttpPayloadTraits2Output {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpPayloadTraits2Output`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output).
   23         -
    pub fn builder() -> crate::operation::http_payload_traits2::builders::HttpPayloadTraits2OutputBuilder {
   24         -
        crate::operation::http_payload_traits2::builders::HttpPayloadTraits2OutputBuilder::default()
   25         -
    }
   26         -
}
   27         -
   28         -
/// A builder for [`HttpPayloadTraits2Output`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output).
   29         -
#[non_exhaustive]
   30         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   31         -
pub struct HttpPayloadTraits2OutputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
   34         -
}
   35         -
impl HttpPayloadTraits2OutputBuilder {
   36         -
    #[allow(missing_docs)] // documentation missing in model
   37         -
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
   38         -
        self.foo = ::std::option::Option::Some(input.into());
   39         -
        self
   40         -
    }
   41         -
    #[allow(missing_docs)] // documentation missing in model
   42         -
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
   43         -
        self.foo = input;
   44         -
        self
   45         -
    }
   46         -
    #[allow(missing_docs)] // documentation missing in model
   47         -
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
   48         -
        &self.foo
   49         -
    }
   50         -
    #[allow(missing_docs)] // documentation missing in model
   51         -
    pub fn blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
   52         -
        self.blob = ::std::option::Option::Some(input);
   53         -
        self
   54         -
    }
   55         -
    #[allow(missing_docs)] // documentation missing in model
   56         -
    pub fn set_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
   57         -
        self.blob = input;
   58         -
        self
   59         -
    }
   60         -
    #[allow(missing_docs)] // documentation missing in model
   61         -
    pub fn get_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
   62         -
        &self.blob
   63         -
    }
   64         -
    /// Consumes the builder and constructs a [`HttpPayloadTraits2Output`](crate::operation::http_payload_traits2::HttpPayloadTraits2Output).
   65         -
    pub fn build(self) -> crate::operation::http_payload_traits2::HttpPayloadTraits2Output {
   66         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output {
   67         -
            foo: self.foo,
   68         -
            blob: self.blob,
   69         -
        }
   70         -
    }
   71         -
}