Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_recursive_shapes_input_output_nested2.rs

@@ -1,1 +71,130 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct RecursiveShapesInputOutputNested2 {
           8  +
pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested2 {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub bar: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub recursive_member: ::std::option::Option<crate::types::RecursiveShapesInputOutputNested1>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl RecursiveShapesInputOutputNested2 {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn bar(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.bar.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn recursive_member(&self) -> ::std::option::Option<&crate::types::RecursiveShapesInputOutputNested1> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.recursive_member.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl RecursiveShapesInputOutputNested2 {
   22         -
    /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::RecursiveShapesInputOutputNested2Builder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::RecursiveShapesInputOutputNested2Builder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct RecursiveShapesInputOutputNested2Builder {
   32         -
    pub(crate) bar: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) bar: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) recursive_member: ::std::option::Option<crate::types::RecursiveShapesInputOutputNested1>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl RecursiveShapesInputOutputNested2Builder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn bar(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.bar = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.bar = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_bar(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.bar
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:286 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:291 */
   51     93   
    pub fn recursive_member(mut self, input: crate::types::RecursiveShapesInputOutputNested1) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   52     95   
        self.recursive_member = ::std::option::Option::Some(input);
          96  +
        /* BuilderGenerator.kt:293 */
   53     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   54     99   
    }
         100  +
    /* BuilderGenerator.kt:312 */
   55    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:314 */
   56    103   
    pub fn set_recursive_member(mut self, input: ::std::option::Option<crate::types::RecursiveShapesInputOutputNested1>) -> Self {
         104  +
        /* BuilderGenerator.kt:315 */
   57    105   
        self.recursive_member = input;
   58    106   
        self
         107  +
        /* BuilderGenerator.kt:314 */
   59    108   
    }
         109  +
    /* BuilderGenerator.kt:334 */
   60    110   
    #[allow(missing_docs)] // documentation missing in model
         111  +
                           /* BuilderGenerator.kt:336 */
   61    112   
    pub fn get_recursive_member(&self) -> &::std::option::Option<crate::types::RecursiveShapesInputOutputNested1> {
         113  +
        /* BuilderGenerator.kt:337 */
   62    114   
        &self.recursive_member
         115  +
        /* BuilderGenerator.kt:336 */
   63    116   
    }
   64         -
    /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
         117  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::types::RecursiveShapesInputOutputNested2).
         118  +
    /* BuilderGenerator.kt:253 */
   65    119   
    pub fn build(self) -> crate::types::RecursiveShapesInputOutputNested2 {
         120  +
        /* BuilderGenerator.kt:477 */
   66    121   
        crate::types::RecursiveShapesInputOutputNested2 {
   67         -
            bar: self.bar,
         122  +
            /* BuilderGenerator.kt:481 */ bar: self.bar,
         123  +
            /* BuilderGenerator.kt:481 */
   68    124   
            recursive_member: self.recursive_member,
         125  +
            /* BuilderGenerator.kt:477 */
   69    126   
        }
         127  +
        /* BuilderGenerator.kt:253 */
   70    128   
    }
         129  +
    /* BuilderGenerator.kt:355 */
   71    130   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_string_enum.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_structure_list_member.rs

@@ -1,1 +68,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct StructureListMember {
           8  +
pub /* StructureGenerator.kt:201 */ struct StructureListMember {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl StructureListMember {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn a(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.a.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn b(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.b.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl StructureListMember {
   22         -
    /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::types::StructureListMember).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::types::StructureListMember).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::StructureListMemberBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::StructureListMemberBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`StructureListMember`](crate::types::StructureListMember).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`StructureListMember`](crate::types::StructureListMember).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct StructureListMemberBuilder {
   32         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl StructureListMemberBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.a = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.a = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.a
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.b = ::std::option::Option::Some(input.into());
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.b = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.b
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`StructureListMember`](crate::types::StructureListMember).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StructureListMember`](crate::types::StructureListMember).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::types::StructureListMember {
   66         -
        crate::types::StructureListMember { a: self.a, b: self.b }
         119  +
        /* BuilderGenerator.kt:477 */
         120  +
        crate::types::StructureListMember {
         121  +
            /* BuilderGenerator.kt:481 */ a: self.a,
         122  +
            /* BuilderGenerator.kt:481 */
         123  +
            b: self.b,
         124  +
            /* BuilderGenerator.kt:477 */
   67    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
         127  +
    }
         128  +
    /* BuilderGenerator.kt:355 */
   68    129   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_union_payload.rs

@@ -1,1 +37,67 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* UnionGenerator.kt:67 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub enum UnionPayload {
           8  +
pub /* UnionGenerator.kt:85 */ enum UnionPayload {
           9  +
    /* UnionGenerator.kt:90 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* UnionGenerator.kt:190 */
    7     12   
    Greeting(::std::string::String),
    8         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          13  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          14  +
    /* UnionGenerator.kt:97 */
    9     15   
    /// An unknown enum variant
          16  +
    /* UnionGenerator.kt:98 */
   10     17   
    ///
          18  +
    /* UnionGenerator.kt:99 */
   11     19   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          20  +
    /* UnionGenerator.kt:100 */
   12     21   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          22  +
    /* UnionGenerator.kt:101 */
   13     23   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          24  +
    /* UnionGenerator.kt:102 */
   14     25   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          26  +
    /* RustType.kt:516 */
   15     27   
    #[non_exhaustive]
          28  +
    /* UnionGenerator.kt:105 */
   16     29   
    Unknown,
          30  +
    /* UnionGenerator.kt:85 */
   17     31   
}
          32  +
/* UnionGenerator.kt:111 */
   18     33   
impl UnionPayload {
          34  +
    /* RustType.kt:516 */
   19     35   
    #[allow(irrefutable_let_patterns)]
          36  +
    /* UnionGenerator.kt:217 */
   20     37   
    /// Tries to convert the enum instance into [`Greeting`](crate::types::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
          38  +
    /* UnionGenerator.kt:222 */
   21     39   
    /// Returns `Err(&Self)` if it can't be converted.
          40  +
    /* UnionGenerator.kt:223 */
   22     41   
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          42  +
        /* UnionGenerator.kt:227 */
   23     43   
        if let UnionPayload::Greeting(val) = &self {
   24     44   
            ::std::result::Result::Ok(val)
   25     45   
        } else {
   26     46   
            ::std::result::Result::Err(self)
   27     47   
        }
          48  +
        /* UnionGenerator.kt:223 */
   28     49   
    }
          50  +
    /* UnionGenerator.kt:121 */
   29     51   
    /// Returns true if this is a [`Greeting`](crate::types::UnionPayload::Greeting).
          52  +
    /* UnionGenerator.kt:122 */
   30     53   
    pub fn is_greeting(&self) -> bool {
          54  +
        /* UnionGenerator.kt:123 */
   31     55   
        self.as_greeting().is_ok()
          56  +
        /* UnionGenerator.kt:122 */
   32     57   
    }
          58  +
    /* UnionGenerator.kt:127 */
   33     59   
    /// Returns true if the enum instance is the `Unknown` variant.
          60  +
    /* UnionGenerator.kt:128 */
   34     61   
    pub fn is_unknown(&self) -> bool {
          62  +
        /* UnionGenerator.kt:129 */
   35     63   
        matches!(self, Self::Unknown)
          64  +
        /* UnionGenerator.kt:128 */
   36     65   
    }
          66  +
    /* UnionGenerator.kt:111 */
   37     67   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_attributes_payload_request.rs

@@ -1,1 +71,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct XmlAttributesPayloadRequest {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlAttributesPayloadRequest {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub attr: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlAttributesPayloadRequest {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn attr(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.attr.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl XmlAttributesPayloadRequest {
   22         -
    /// Creates a new builder-style object to manufacture [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::XmlAttributesPayloadRequestBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::XmlAttributesPayloadRequestBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct XmlAttributesPayloadRequestBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) attr: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl XmlAttributesPayloadRequestBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.foo = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.foo = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.foo
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.attr = ::std::option::Option::Some(input.into());
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.attr = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_attr(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.attr
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlAttributesPayloadRequest`](crate::types::XmlAttributesPayloadRequest).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::types::XmlAttributesPayloadRequest {
         119  +
        /* BuilderGenerator.kt:477 */
   66    120   
        crate::types::XmlAttributesPayloadRequest {
   67         -
            foo: self.foo,
         121  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         122  +
            /* BuilderGenerator.kt:481 */
   68    123   
            attr: self.attr,
         124  +
            /* BuilderGenerator.kt:477 */
   69    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
   70    127   
    }
         128  +
    /* BuilderGenerator.kt:355 */
   71    129   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_attributes_payload_response.rs

@@ -1,1 +71,129 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct XmlAttributesPayloadResponse {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlAttributesPayloadResponse {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub attr: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlAttributesPayloadResponse {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn attr(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   18     32   
        self.attr.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl XmlAttributesPayloadResponse {
   22         -
    /// Creates a new builder-style object to manufacture [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::types::builders::XmlAttributesPayloadResponseBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::types::builders::XmlAttributesPayloadResponseBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct XmlAttributesPayloadResponseBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) attr: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) attr: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl XmlAttributesPayloadResponseBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.foo = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.foo = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.foo
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn attr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.attr = ::std::option::Option::Some(input.into());
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_attr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.attr = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_attr(&self) -> &::std::option::Option<::std::string::String> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.attr
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlAttributesPayloadResponse`](crate::types::XmlAttributesPayloadResponse).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::types::XmlAttributesPayloadResponse {
         119  +
        /* BuilderGenerator.kt:477 */
   66    120   
        crate::types::XmlAttributesPayloadResponse {
   67         -
            foo: self.foo,
         121  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         122  +
            /* BuilderGenerator.kt:481 */
   68    123   
            attr: self.attr,
         124  +
            /* BuilderGenerator.kt:477 */
   69    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
   70    127   
    }
         128  +
    /* BuilderGenerator.kt:355 */
   71    129   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_namespace_nested.rs

@@ -1,1 +78,140 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct XmlNamespaceNested {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlNamespaceNested {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl XmlNamespaceNested {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
   17         -
    ///
   18         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          29  +
    /// /* StructureGenerator.kt:162 */
          30  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.values.is_none()`.
          31  +
    /* StructureGenerator.kt:166 */
   19     32   
    pub fn values(&self) -> &[::std::string::String] {
   20         -
        self.values.as_deref().unwrap_or_default()
          33  +
        /* StructureGenerator.kt:169 */
          34  +
        self.values
          35  +
            .as_deref()
          36  +
            /* StructureGenerator.kt:175 */
          37  +
            .unwrap_or_default()
          38  +
        /* StructureGenerator.kt:166 */
   21     39   
    }
          40  +
    /* StructureGenerator.kt:135 */
   22     41   
}
          42  +
/* ClientCodegenVisitor.kt:237 */
   23     43   
impl XmlNamespaceNested {
   24         -
    /// Creates a new builder-style object to manufacture [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          44  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          45  +
    /* BuilderGenerator.kt:175 */
   25     46   
    pub fn builder() -> crate::types::builders::XmlNamespaceNestedBuilder {
          47  +
        /* BuilderGenerator.kt:176 */
   26     48   
        crate::types::builders::XmlNamespaceNestedBuilder::default()
          49  +
        /* BuilderGenerator.kt:175 */
   27     50   
    }
          51  +
    /* ClientCodegenVisitor.kt:237 */
   28     52   
}
   29     53   
   30         -
/// A builder for [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          54  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
          55  +
/* RustType.kt:516 */
   31     56   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          57  +
/* RustType.kt:516 */
   32     58   
#[non_exhaustive]
          59  +
/* BuilderGenerator.kt:345 */
   33     60   
pub struct XmlNamespaceNestedBuilder {
   34         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          61  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          62  +
    /* BuilderGenerator.kt:275 */
   35     63   
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          64  +
    /* BuilderGenerator.kt:345 */
   36     65   
}
          66  +
/* BuilderGenerator.kt:355 */
   37     67   
impl XmlNamespaceNestedBuilder {
          68  +
    /* BuilderGenerator.kt:286 */
   38     69   
    #[allow(missing_docs)] // documentation missing in model
          70  +
                           /* BuilderGenerator.kt:291 */
   39     71   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          72  +
        /* BuilderGenerator.kt:292 */
   40     73   
        self.foo = ::std::option::Option::Some(input.into());
          74  +
        /* BuilderGenerator.kt:293 */
   41     75   
        self
          76  +
        /* BuilderGenerator.kt:291 */
   42     77   
    }
          78  +
    /* BuilderGenerator.kt:312 */
   43     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:314 */
   44     81   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          82  +
        /* BuilderGenerator.kt:315 */
   45     83   
        self.foo = input;
   46     84   
        self
          85  +
        /* BuilderGenerator.kt:314 */
   47     86   
    }
          87  +
    /* BuilderGenerator.kt:334 */
   48     88   
    #[allow(missing_docs)] // documentation missing in model
          89  +
                           /* BuilderGenerator.kt:336 */
   49     90   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          91  +
        /* BuilderGenerator.kt:337 */
   50     92   
        &self.foo
          93  +
        /* BuilderGenerator.kt:336 */
   51     94   
    }
   52         -
    /// Appends an item to `values`.
          95  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `values`.
          96  +
    /* BuilderGenerator.kt:411 */
   53     97   
    ///
   54         -
    /// To override the contents of this collection use [`set_values`](Self::set_values).
          98  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_values`](Self::set_values).
          99  +
    /* BuilderGenerator.kt:413 */
   55    100   
    ///
         101  +
    /* BuilderGenerator.kt:418 */
   56    102   
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:419 */
   57    104   
        let mut v = self.values.unwrap_or_default();
   58    105   
        v.push(input.into());
   59    106   
        self.values = ::std::option::Option::Some(v);
   60    107   
        self
         108  +
        /* BuilderGenerator.kt:418 */
   61    109   
    }
         110  +
    /* BuilderGenerator.kt:312 */
   62    111   
    #[allow(missing_docs)] // documentation missing in model
         112  +
                           /* BuilderGenerator.kt:314 */
   63    113   
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         114  +
        /* BuilderGenerator.kt:315 */
   64    115   
        self.values = input;
   65    116   
        self
         117  +
        /* BuilderGenerator.kt:314 */
   66    118   
    }
         119  +
    /* BuilderGenerator.kt:334 */
   67    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* BuilderGenerator.kt:336 */
   68    122   
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         123  +
        /* BuilderGenerator.kt:337 */
   69    124   
        &self.values
         125  +
        /* BuilderGenerator.kt:336 */
   70    126   
    }
   71         -
    /// Consumes the builder and constructs a [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
         127  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlNamespaceNested`](crate::types::XmlNamespaceNested).
         128  +
    /* BuilderGenerator.kt:253 */
   72    129   
    pub fn build(self) -> crate::types::XmlNamespaceNested {
         130  +
        /* BuilderGenerator.kt:477 */
   73    131   
        crate::types::XmlNamespaceNested {
   74         -
            foo: self.foo,
         132  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         133  +
            /* BuilderGenerator.kt:481 */
   75    134   
            values: self.values,
         135  +
            /* BuilderGenerator.kt:477 */
   76    136   
        }
         137  +
        /* BuilderGenerator.kt:253 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:355 */
   78    140   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_nested_union_struct.rs

@@ -1,1 +203,370 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct XmlNestedUnionStruct {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlNestedUnionStruct {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub string_value: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub boolean_value: ::std::option::Option<bool>,
   10         -
    #[allow(missing_docs)] // documentation missing in model
          15  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   11     16   
    pub byte_value: ::std::option::Option<i8>,
   12         -
    #[allow(missing_docs)] // documentation missing in model
          17  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   13     18   
    pub short_value: ::std::option::Option<i16>,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          19  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     20   
    pub integer_value: ::std::option::Option<i32>,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          21  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     22   
    pub long_value: ::std::option::Option<i64>,
   18         -
    #[allow(missing_docs)] // documentation missing in model
          23  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   19     24   
    pub float_value: ::std::option::Option<f32>,
          25  +
    /* StructureGenerator.kt:231 */
   20     26   
    #[allow(missing_docs)] // documentation missing in model
   21     27   
    pub double_value: ::std::option::Option<f64>,
          28  +
    /* StructureGenerator.kt:201 */
   22     29   
}
          30  +
/* StructureGenerator.kt:135 */
   23     31   
impl XmlNestedUnionStruct {
          32  +
    /* StructureGenerator.kt:231 */
   24     33   
    #[allow(missing_docs)] // documentation missing in model
          34  +
                           /* StructureGenerator.kt:166 */
   25     35   
    pub fn string_value(&self) -> ::std::option::Option<&str> {
          36  +
        /* StructureGenerator.kt:169 */
   26     37   
        self.string_value.as_deref()
          38  +
        /* StructureGenerator.kt:166 */
   27     39   
    }
          40  +
    /* StructureGenerator.kt:231 */
   28     41   
    #[allow(missing_docs)] // documentation missing in model
          42  +
                           /* StructureGenerator.kt:166 */
   29     43   
    pub fn boolean_value(&self) -> ::std::option::Option<bool> {
          44  +
        /* StructureGenerator.kt:168 */
   30     45   
        self.boolean_value
          46  +
        /* StructureGenerator.kt:166 */
   31     47   
    }
          48  +
    /* StructureGenerator.kt:231 */
   32     49   
    #[allow(missing_docs)] // documentation missing in model
          50  +
                           /* StructureGenerator.kt:166 */
   33     51   
    pub fn byte_value(&self) -> ::std::option::Option<i8> {
          52  +
        /* StructureGenerator.kt:168 */
   34     53   
        self.byte_value
          54  +
        /* StructureGenerator.kt:166 */
   35     55   
    }
          56  +
    /* StructureGenerator.kt:231 */
   36     57   
    #[allow(missing_docs)] // documentation missing in model
          58  +
                           /* StructureGenerator.kt:166 */
   37     59   
    pub fn short_value(&self) -> ::std::option::Option<i16> {
          60  +
        /* StructureGenerator.kt:168 */
   38     61   
        self.short_value
          62  +
        /* StructureGenerator.kt:166 */
   39     63   
    }
          64  +
    /* StructureGenerator.kt:231 */
   40     65   
    #[allow(missing_docs)] // documentation missing in model
          66  +
                           /* StructureGenerator.kt:166 */
   41     67   
    pub fn integer_value(&self) -> ::std::option::Option<i32> {
          68  +
        /* StructureGenerator.kt:168 */
   42     69   
        self.integer_value
          70  +
        /* StructureGenerator.kt:166 */
   43     71   
    }
          72  +
    /* StructureGenerator.kt:231 */
   44     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* StructureGenerator.kt:166 */
   45     75   
    pub fn long_value(&self) -> ::std::option::Option<i64> {
          76  +
        /* StructureGenerator.kt:168 */
   46     77   
        self.long_value
          78  +
        /* StructureGenerator.kt:166 */
   47     79   
    }
          80  +
    /* StructureGenerator.kt:231 */
   48     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* StructureGenerator.kt:166 */
   49     83   
    pub fn float_value(&self) -> ::std::option::Option<f32> {
          84  +
        /* StructureGenerator.kt:168 */
   50     85   
        self.float_value
          86  +
        /* StructureGenerator.kt:166 */
   51     87   
    }
          88  +
    /* StructureGenerator.kt:231 */
   52     89   
    #[allow(missing_docs)] // documentation missing in model
          90  +
                           /* StructureGenerator.kt:166 */
   53     91   
    pub fn double_value(&self) -> ::std::option::Option<f64> {
          92  +
        /* StructureGenerator.kt:168 */
   54     93   
        self.double_value
          94  +
        /* StructureGenerator.kt:166 */
   55     95   
    }
          96  +
    /* StructureGenerator.kt:135 */
   56     97   
}
          98  +
/* ClientCodegenVisitor.kt:237 */
   57     99   
impl XmlNestedUnionStruct {
   58         -
    /// Creates a new builder-style object to manufacture [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         100  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         101  +
    /* BuilderGenerator.kt:175 */
   59    102   
    pub fn builder() -> crate::types::builders::XmlNestedUnionStructBuilder {
         103  +
        /* BuilderGenerator.kt:176 */
   60    104   
        crate::types::builders::XmlNestedUnionStructBuilder::default()
         105  +
        /* BuilderGenerator.kt:175 */
   61    106   
    }
         107  +
    /* ClientCodegenVisitor.kt:237 */
   62    108   
}
   63    109   
   64         -
/// A builder for [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         110  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         111  +
/* RustType.kt:516 */
   65    112   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         113  +
/* RustType.kt:516 */
   66    114   
#[non_exhaustive]
         115  +
/* BuilderGenerator.kt:345 */
   67    116   
pub struct XmlNestedUnionStructBuilder {
   68         -
    pub(crate) string_value: ::std::option::Option<::std::string::String>,
   69         -
    pub(crate) boolean_value: ::std::option::Option<bool>,
   70         -
    pub(crate) byte_value: ::std::option::Option<i8>,
   71         -
    pub(crate) short_value: ::std::option::Option<i16>,
   72         -
    pub(crate) integer_value: ::std::option::Option<i32>,
   73         -
    pub(crate) long_value: ::std::option::Option<i64>,
   74         -
    pub(crate) float_value: ::std::option::Option<f32>,
   75         -
    pub(crate) double_value: ::std::option::Option<f64>,
         117  +
    /* BuilderGenerator.kt:275 */ pub(crate) string_value: ::std::option::Option<::std::string::String>,
         118  +
    /* BuilderGenerator.kt:275 */ pub(crate) boolean_value: ::std::option::Option<bool>,
         119  +
    /* BuilderGenerator.kt:275 */ pub(crate) byte_value: ::std::option::Option<i8>,
         120  +
    /* BuilderGenerator.kt:275 */ pub(crate) short_value: ::std::option::Option<i16>,
         121  +
    /* BuilderGenerator.kt:275 */ pub(crate) integer_value: ::std::option::Option<i32>,
         122  +
    /* BuilderGenerator.kt:275 */ pub(crate) long_value: ::std::option::Option<i64>,
         123  +
    /* BuilderGenerator.kt:275 */ pub(crate) float_value: ::std::option::Option<f32>,
         124  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_value: ::std::option::Option<f64>,
         125  +
    /* BuilderGenerator.kt:345 */
   76    126   
}
         127  +
/* BuilderGenerator.kt:355 */
   77    128   
impl XmlNestedUnionStructBuilder {
         129  +
    /* BuilderGenerator.kt:286 */
   78    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* BuilderGenerator.kt:291 */
   79    132   
    pub fn string_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         133  +
        /* BuilderGenerator.kt:292 */
   80    134   
        self.string_value = ::std::option::Option::Some(input.into());
         135  +
        /* BuilderGenerator.kt:293 */
   81    136   
        self
         137  +
        /* BuilderGenerator.kt:291 */
   82    138   
    }
         139  +
    /* BuilderGenerator.kt:312 */
   83    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* BuilderGenerator.kt:314 */
   84    142   
    pub fn set_string_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         143  +
        /* BuilderGenerator.kt:315 */
   85    144   
        self.string_value = input;
   86    145   
        self
         146  +
        /* BuilderGenerator.kt:314 */
   87    147   
    }
         148  +
    /* BuilderGenerator.kt:334 */
   88    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* BuilderGenerator.kt:336 */
   89    151   
    pub fn get_string_value(&self) -> &::std::option::Option<::std::string::String> {
         152  +
        /* BuilderGenerator.kt:337 */
   90    153   
        &self.string_value
         154  +
        /* BuilderGenerator.kt:336 */
   91    155   
    }
         156  +
    /* BuilderGenerator.kt:286 */
   92    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* BuilderGenerator.kt:291 */
   93    159   
    pub fn boolean_value(mut self, input: bool) -> Self {
         160  +
        /* BuilderGenerator.kt:292 */
   94    161   
        self.boolean_value = ::std::option::Option::Some(input);
         162  +
        /* BuilderGenerator.kt:293 */
   95    163   
        self
         164  +
        /* BuilderGenerator.kt:291 */
   96    165   
    }
         166  +
    /* BuilderGenerator.kt:312 */
   97    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* BuilderGenerator.kt:314 */
   98    169   
    pub fn set_boolean_value(mut self, input: ::std::option::Option<bool>) -> Self {
         170  +
        /* BuilderGenerator.kt:315 */
   99    171   
        self.boolean_value = input;
  100    172   
        self
         173  +
        /* BuilderGenerator.kt:314 */
  101    174   
    }
         175  +
    /* BuilderGenerator.kt:334 */
  102    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* BuilderGenerator.kt:336 */
  103    178   
    pub fn get_boolean_value(&self) -> &::std::option::Option<bool> {
         179  +
        /* BuilderGenerator.kt:337 */
  104    180   
        &self.boolean_value
         181  +
        /* BuilderGenerator.kt:336 */
  105    182   
    }
         183  +
    /* BuilderGenerator.kt:286 */
  106    184   
    #[allow(missing_docs)] // documentation missing in model
         185  +
                           /* BuilderGenerator.kt:291 */
  107    186   
    pub fn byte_value(mut self, input: i8) -> Self {
         187  +
        /* BuilderGenerator.kt:292 */
  108    188   
        self.byte_value = ::std::option::Option::Some(input);
         189  +
        /* BuilderGenerator.kt:293 */
  109    190   
        self
         191  +
        /* BuilderGenerator.kt:291 */
  110    192   
    }
         193  +
    /* BuilderGenerator.kt:312 */
  111    194   
    #[allow(missing_docs)] // documentation missing in model
         195  +
                           /* BuilderGenerator.kt:314 */
  112    196   
    pub fn set_byte_value(mut self, input: ::std::option::Option<i8>) -> Self {
         197  +
        /* BuilderGenerator.kt:315 */
  113    198   
        self.byte_value = input;
  114    199   
        self
         200  +
        /* BuilderGenerator.kt:314 */
  115    201   
    }
         202  +
    /* BuilderGenerator.kt:334 */
  116    203   
    #[allow(missing_docs)] // documentation missing in model
         204  +
                           /* BuilderGenerator.kt:336 */
  117    205   
    pub fn get_byte_value(&self) -> &::std::option::Option<i8> {
         206  +
        /* BuilderGenerator.kt:337 */
  118    207   
        &self.byte_value
         208  +
        /* BuilderGenerator.kt:336 */
  119    209   
    }
         210  +
    /* BuilderGenerator.kt:286 */
  120    211   
    #[allow(missing_docs)] // documentation missing in model
         212  +
                           /* BuilderGenerator.kt:291 */
  121    213   
    pub fn short_value(mut self, input: i16) -> Self {
         214  +
        /* BuilderGenerator.kt:292 */
  122    215   
        self.short_value = ::std::option::Option::Some(input);
         216  +
        /* BuilderGenerator.kt:293 */
  123    217   
        self
         218  +
        /* BuilderGenerator.kt:291 */
  124    219   
    }
         220  +
    /* BuilderGenerator.kt:312 */
  125    221   
    #[allow(missing_docs)] // documentation missing in model
         222  +
                           /* BuilderGenerator.kt:314 */
  126    223   
    pub fn set_short_value(mut self, input: ::std::option::Option<i16>) -> Self {
         224  +
        /* BuilderGenerator.kt:315 */
  127    225   
        self.short_value = input;
  128    226   
        self
         227  +
        /* BuilderGenerator.kt:314 */
  129    228   
    }
         229  +
    /* BuilderGenerator.kt:334 */
  130    230   
    #[allow(missing_docs)] // documentation missing in model
         231  +
                           /* BuilderGenerator.kt:336 */
  131    232   
    pub fn get_short_value(&self) -> &::std::option::Option<i16> {
         233  +
        /* BuilderGenerator.kt:337 */
  132    234   
        &self.short_value
         235  +
        /* BuilderGenerator.kt:336 */
  133    236   
    }
         237  +
    /* BuilderGenerator.kt:286 */
  134    238   
    #[allow(missing_docs)] // documentation missing in model
         239  +
                           /* BuilderGenerator.kt:291 */
  135    240   
    pub fn integer_value(mut self, input: i32) -> Self {
         241  +
        /* BuilderGenerator.kt:292 */
  136    242   
        self.integer_value = ::std::option::Option::Some(input);
         243  +
        /* BuilderGenerator.kt:293 */
  137    244   
        self
         245  +
        /* BuilderGenerator.kt:291 */
  138    246   
    }
         247  +
    /* BuilderGenerator.kt:312 */
  139    248   
    #[allow(missing_docs)] // documentation missing in model
         249  +
                           /* BuilderGenerator.kt:314 */
  140    250   
    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
         251  +
        /* BuilderGenerator.kt:315 */
  141    252   
        self.integer_value = input;
  142    253   
        self
         254  +
        /* BuilderGenerator.kt:314 */
  143    255   
    }
         256  +
    /* BuilderGenerator.kt:334 */
  144    257   
    #[allow(missing_docs)] // documentation missing in model
         258  +
                           /* BuilderGenerator.kt:336 */
  145    259   
    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
         260  +
        /* BuilderGenerator.kt:337 */
  146    261   
        &self.integer_value
         262  +
        /* BuilderGenerator.kt:336 */
  147    263   
    }
         264  +
    /* BuilderGenerator.kt:286 */
  148    265   
    #[allow(missing_docs)] // documentation missing in model
         266  +
                           /* BuilderGenerator.kt:291 */
  149    267   
    pub fn long_value(mut self, input: i64) -> Self {
         268  +
        /* BuilderGenerator.kt:292 */
  150    269   
        self.long_value = ::std::option::Option::Some(input);
         270  +
        /* BuilderGenerator.kt:293 */
  151    271   
        self
         272  +
        /* BuilderGenerator.kt:291 */
  152    273   
    }
         274  +
    /* BuilderGenerator.kt:312 */
  153    275   
    #[allow(missing_docs)] // documentation missing in model
         276  +
                           /* BuilderGenerator.kt:314 */
  154    277   
    pub fn set_long_value(mut self, input: ::std::option::Option<i64>) -> Self {
         278  +
        /* BuilderGenerator.kt:315 */
  155    279   
        self.long_value = input;
  156    280   
        self
         281  +
        /* BuilderGenerator.kt:314 */
  157    282   
    }
         283  +
    /* BuilderGenerator.kt:334 */
  158    284   
    #[allow(missing_docs)] // documentation missing in model
         285  +
                           /* BuilderGenerator.kt:336 */
  159    286   
    pub fn get_long_value(&self) -> &::std::option::Option<i64> {
         287  +
        /* BuilderGenerator.kt:337 */
  160    288   
        &self.long_value
         289  +
        /* BuilderGenerator.kt:336 */
  161    290   
    }
         291  +
    /* BuilderGenerator.kt:286 */
  162    292   
    #[allow(missing_docs)] // documentation missing in model
         293  +
                           /* BuilderGenerator.kt:291 */
  163    294   
    pub fn float_value(mut self, input: f32) -> Self {
         295  +
        /* BuilderGenerator.kt:292 */
  164    296   
        self.float_value = ::std::option::Option::Some(input);
         297  +
        /* BuilderGenerator.kt:293 */
  165    298   
        self
         299  +
        /* BuilderGenerator.kt:291 */
  166    300   
    }
         301  +
    /* BuilderGenerator.kt:312 */
  167    302   
    #[allow(missing_docs)] // documentation missing in model
         303  +
                           /* BuilderGenerator.kt:314 */
  168    304   
    pub fn set_float_value(mut self, input: ::std::option::Option<f32>) -> Self {
         305  +
        /* BuilderGenerator.kt:315 */
  169    306   
        self.float_value = input;
  170    307   
        self
         308  +
        /* BuilderGenerator.kt:314 */
  171    309   
    }
         310  +
    /* BuilderGenerator.kt:334 */
  172    311   
    #[allow(missing_docs)] // documentation missing in model
         312  +
                           /* BuilderGenerator.kt:336 */
  173    313   
    pub fn get_float_value(&self) -> &::std::option::Option<f32> {
         314  +
        /* BuilderGenerator.kt:337 */
  174    315   
        &self.float_value
         316  +
        /* BuilderGenerator.kt:336 */
  175    317   
    }
         318  +
    /* BuilderGenerator.kt:286 */
  176    319   
    #[allow(missing_docs)] // documentation missing in model
         320  +
                           /* BuilderGenerator.kt:291 */
  177    321   
    pub fn double_value(mut self, input: f64) -> Self {
         322  +
        /* BuilderGenerator.kt:292 */
  178    323   
        self.double_value = ::std::option::Option::Some(input);
         324  +
        /* BuilderGenerator.kt:293 */
  179    325   
        self
         326  +
        /* BuilderGenerator.kt:291 */
  180    327   
    }
         328  +
    /* BuilderGenerator.kt:312 */
  181    329   
    #[allow(missing_docs)] // documentation missing in model
         330  +
                           /* BuilderGenerator.kt:314 */
  182    331   
    pub fn set_double_value(mut self, input: ::std::option::Option<f64>) -> Self {
         332  +
        /* BuilderGenerator.kt:315 */
  183    333   
        self.double_value = input;
  184    334   
        self
         335  +
        /* BuilderGenerator.kt:314 */
  185    336   
    }
         337  +
    /* BuilderGenerator.kt:334 */
  186    338   
    #[allow(missing_docs)] // documentation missing in model
         339  +
                           /* BuilderGenerator.kt:336 */
  187    340   
    pub fn get_double_value(&self) -> &::std::option::Option<f64> {
         341  +
        /* BuilderGenerator.kt:337 */
  188    342   
        &self.double_value
         343  +
        /* BuilderGenerator.kt:336 */
  189    344   
    }
  190         -
    /// Consumes the builder and constructs a [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         345  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         346  +
    /* BuilderGenerator.kt:253 */
  191    347   
    pub fn build(self) -> crate::types::XmlNestedUnionStruct {
         348  +
        /* BuilderGenerator.kt:477 */
  192    349   
        crate::types::XmlNestedUnionStruct {
  193         -
            string_value: self.string_value,
         350  +
            /* BuilderGenerator.kt:481 */ string_value: self.string_value,
         351  +
            /* BuilderGenerator.kt:481 */
  194    352   
            boolean_value: self.boolean_value,
         353  +
            /* BuilderGenerator.kt:481 */
  195    354   
            byte_value: self.byte_value,
         355  +
            /* BuilderGenerator.kt:481 */
  196    356   
            short_value: self.short_value,
         357  +
            /* BuilderGenerator.kt:481 */
  197    358   
            integer_value: self.integer_value,
         359  +
            /* BuilderGenerator.kt:481 */
  198    360   
            long_value: self.long_value,
         361  +
            /* BuilderGenerator.kt:481 */
  199    362   
            float_value: self.float_value,
         363  +
            /* BuilderGenerator.kt:481 */
  200    364   
            double_value: self.double_value,
         365  +
            /* BuilderGenerator.kt:477 */
  201    366   
        }
         367  +
        /* BuilderGenerator.kt:253 */
  202    368   
    }
         369  +
    /* BuilderGenerator.kt:355 */
  203    370   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/types/_xml_union_shape.rs

@@ -1,1 +171,293 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* UnionGenerator.kt:67 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub enum XmlUnionShape {
           8  +
pub /* UnionGenerator.kt:85 */ enum XmlUnionShape {
           9  +
    /* UnionGenerator.kt:90 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* UnionGenerator.kt:190 */
    7     12   
    BooleanValue(bool),
    8         -
    #[allow(missing_docs)] // documentation missing in model
          13  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          14  +
    /* UnionGenerator.kt:190 */
    9     15   
    ByteValue(i8),
   10         -
    #[allow(missing_docs)] // documentation missing in model
          16  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          17  +
    /* UnionGenerator.kt:190 */
   11     18   
    DoubleValue(f64),
   12         -
    #[allow(missing_docs)] // documentation missing in model
          19  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          20  +
    /* UnionGenerator.kt:190 */
   13     21   
    FloatValue(f32),
   14         -
    #[allow(missing_docs)] // documentation missing in model
          22  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          23  +
    /* UnionGenerator.kt:190 */
   15     24   
    IntegerValue(i32),
   16         -
    #[allow(missing_docs)] // documentation missing in model
          25  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          26  +
    /* UnionGenerator.kt:190 */
   17     27   
    LongValue(i64),
   18         -
    #[allow(missing_docs)] // documentation missing in model
          28  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          29  +
    /* UnionGenerator.kt:190 */
   19     30   
    ShortValue(i16),
          31  +
    /* UnionGenerator.kt:90 */
   20     32   
    #[allow(missing_docs)] // documentation missing in model
          33  +
    /* UnionGenerator.kt:190 */
   21     34   
    StringValue(::std::string::String),
          35  +
    /* UnionGenerator.kt:90 */
   22     36   
    #[allow(missing_docs)] // documentation missing in model
          37  +
    /* UnionGenerator.kt:190 */
   23     38   
    StructValue(crate::types::XmlNestedUnionStruct),
          39  +
    /* UnionGenerator.kt:90 */
   24     40   
    #[allow(missing_docs)] // documentation missing in model
          41  +
    /* UnionGenerator.kt:190 */
   25     42   
    UnionValue(::std::boxed::Box<crate::types::XmlUnionShape>),
   26         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          43  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          44  +
    /* UnionGenerator.kt:97 */
   27     45   
    /// An unknown enum variant
          46  +
    /* UnionGenerator.kt:98 */
   28     47   
    ///
          48  +
    /* UnionGenerator.kt:99 */
   29     49   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          50  +
    /* UnionGenerator.kt:100 */
   30     51   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          52  +
    /* UnionGenerator.kt:101 */
   31     53   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          54  +
    /* UnionGenerator.kt:102 */
   32     55   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          56  +
    /* RustType.kt:516 */
   33     57   
    #[non_exhaustive]
          58  +
    /* UnionGenerator.kt:105 */
   34     59   
    Unknown,
          60  +
    /* UnionGenerator.kt:85 */
   35     61   
}
          62  +
/* UnionGenerator.kt:111 */
   36     63   
impl XmlUnionShape {
          64  +
    /* UnionGenerator.kt:217 */
   37     65   
    /// Tries to convert the enum instance into [`BooleanValue`](crate::types::XmlUnionShape::BooleanValue), extracting the inner [`bool`](bool).
          66  +
    /* UnionGenerator.kt:222 */
   38     67   
    /// Returns `Err(&Self)` if it can't be converted.
          68  +
    /* UnionGenerator.kt:223 */
   39     69   
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
          70  +
        /* UnionGenerator.kt:227 */
   40     71   
        if let XmlUnionShape::BooleanValue(val) = &self {
   41     72   
            ::std::result::Result::Ok(val)
   42     73   
        } else {
   43     74   
            ::std::result::Result::Err(self)
   44     75   
        }
          76  +
        /* UnionGenerator.kt:223 */
   45     77   
    }
          78  +
    /* UnionGenerator.kt:121 */
   46     79   
    /// Returns true if this is a [`BooleanValue`](crate::types::XmlUnionShape::BooleanValue).
          80  +
    /* UnionGenerator.kt:122 */
   47     81   
    pub fn is_boolean_value(&self) -> bool {
          82  +
        /* UnionGenerator.kt:123 */
   48     83   
        self.as_boolean_value().is_ok()
          84  +
        /* UnionGenerator.kt:122 */
   49     85   
    }
          86  +
    /* UnionGenerator.kt:217 */
   50     87   
    /// Tries to convert the enum instance into [`ByteValue`](crate::types::XmlUnionShape::ByteValue), extracting the inner [`i8`](i8).
          88  +
    /* UnionGenerator.kt:222 */
   51     89   
    /// Returns `Err(&Self)` if it can't be converted.
          90  +
    /* UnionGenerator.kt:223 */
   52     91   
    pub fn as_byte_value(&self) -> ::std::result::Result<&i8, &Self> {
          92  +
        /* UnionGenerator.kt:227 */
   53     93   
        if let XmlUnionShape::ByteValue(val) = &self {
   54     94   
            ::std::result::Result::Ok(val)
   55     95   
        } else {
   56     96   
            ::std::result::Result::Err(self)
   57     97   
        }
          98  +
        /* UnionGenerator.kt:223 */
   58     99   
    }
         100  +
    /* UnionGenerator.kt:121 */
   59    101   
    /// Returns true if this is a [`ByteValue`](crate::types::XmlUnionShape::ByteValue).
         102  +
    /* UnionGenerator.kt:122 */
   60    103   
    pub fn is_byte_value(&self) -> bool {
         104  +
        /* UnionGenerator.kt:123 */
   61    105   
        self.as_byte_value().is_ok()
         106  +
        /* UnionGenerator.kt:122 */
   62    107   
    }
         108  +
    /* UnionGenerator.kt:217 */
   63    109   
    /// Tries to convert the enum instance into [`DoubleValue`](crate::types::XmlUnionShape::DoubleValue), extracting the inner [`f64`](f64).
         110  +
    /* UnionGenerator.kt:222 */
   64    111   
    /// Returns `Err(&Self)` if it can't be converted.
         112  +
    /* UnionGenerator.kt:223 */
   65    113   
    pub fn as_double_value(&self) -> ::std::result::Result<&f64, &Self> {
         114  +
        /* UnionGenerator.kt:227 */
   66    115   
        if let XmlUnionShape::DoubleValue(val) = &self {
   67    116   
            ::std::result::Result::Ok(val)
   68    117   
        } else {
   69    118   
            ::std::result::Result::Err(self)
   70    119   
        }
         120  +
        /* UnionGenerator.kt:223 */
   71    121   
    }
         122  +
    /* UnionGenerator.kt:121 */
   72    123   
    /// Returns true if this is a [`DoubleValue`](crate::types::XmlUnionShape::DoubleValue).
         124  +
    /* UnionGenerator.kt:122 */
   73    125   
    pub fn is_double_value(&self) -> bool {
         126  +
        /* UnionGenerator.kt:123 */
   74    127   
        self.as_double_value().is_ok()
         128  +
        /* UnionGenerator.kt:122 */
   75    129   
    }
         130  +
    /* UnionGenerator.kt:217 */
   76    131   
    /// Tries to convert the enum instance into [`FloatValue`](crate::types::XmlUnionShape::FloatValue), extracting the inner [`f32`](f32).
         132  +
    /* UnionGenerator.kt:222 */
   77    133   
    /// Returns `Err(&Self)` if it can't be converted.
         134  +
    /* UnionGenerator.kt:223 */
   78    135   
    pub fn as_float_value(&self) -> ::std::result::Result<&f32, &Self> {
         136  +
        /* UnionGenerator.kt:227 */
   79    137   
        if let XmlUnionShape::FloatValue(val) = &self {
   80    138   
            ::std::result::Result::Ok(val)
   81    139   
        } else {
   82    140   
            ::std::result::Result::Err(self)
   83    141   
        }
         142  +
        /* UnionGenerator.kt:223 */
   84    143   
    }
         144  +
    /* UnionGenerator.kt:121 */
   85    145   
    /// Returns true if this is a [`FloatValue`](crate::types::XmlUnionShape::FloatValue).
         146  +
    /* UnionGenerator.kt:122 */
   86    147   
    pub fn is_float_value(&self) -> bool {
         148  +
        /* UnionGenerator.kt:123 */
   87    149   
        self.as_float_value().is_ok()
         150  +
        /* UnionGenerator.kt:122 */
   88    151   
    }
         152  +
    /* UnionGenerator.kt:217 */
   89    153   
    /// Tries to convert the enum instance into [`IntegerValue`](crate::types::XmlUnionShape::IntegerValue), extracting the inner [`i32`](i32).
         154  +
    /* UnionGenerator.kt:222 */
   90    155   
    /// Returns `Err(&Self)` if it can't be converted.
         156  +
    /* UnionGenerator.kt:223 */
   91    157   
    pub fn as_integer_value(&self) -> ::std::result::Result<&i32, &Self> {
         158  +
        /* UnionGenerator.kt:227 */
   92    159   
        if let XmlUnionShape::IntegerValue(val) = &self {
   93    160   
            ::std::result::Result::Ok(val)
   94    161   
        } else {
   95    162   
            ::std::result::Result::Err(self)
   96    163   
        }
         164  +
        /* UnionGenerator.kt:223 */
   97    165   
    }
         166  +
    /* UnionGenerator.kt:121 */
   98    167   
    /// Returns true if this is a [`IntegerValue`](crate::types::XmlUnionShape::IntegerValue).
         168  +
    /* UnionGenerator.kt:122 */
   99    169   
    pub fn is_integer_value(&self) -> bool {
         170  +
        /* UnionGenerator.kt:123 */
  100    171   
        self.as_integer_value().is_ok()
         172  +
        /* UnionGenerator.kt:122 */
  101    173   
    }
         174  +
    /* UnionGenerator.kt:217 */
  102    175   
    /// Tries to convert the enum instance into [`LongValue`](crate::types::XmlUnionShape::LongValue), extracting the inner [`i64`](i64).
         176  +
    /* UnionGenerator.kt:222 */
  103    177   
    /// Returns `Err(&Self)` if it can't be converted.
         178  +
    /* UnionGenerator.kt:223 */
  104    179   
    pub fn as_long_value(&self) -> ::std::result::Result<&i64, &Self> {
         180  +
        /* UnionGenerator.kt:227 */
  105    181   
        if let XmlUnionShape::LongValue(val) = &self {
  106    182   
            ::std::result::Result::Ok(val)
  107    183   
        } else {
  108    184   
            ::std::result::Result::Err(self)
  109    185   
        }
         186  +
        /* UnionGenerator.kt:223 */
  110    187   
    }
         188  +
    /* UnionGenerator.kt:121 */
  111    189   
    /// Returns true if this is a [`LongValue`](crate::types::XmlUnionShape::LongValue).
         190  +
    /* UnionGenerator.kt:122 */
  112    191   
    pub fn is_long_value(&self) -> bool {
         192  +
        /* UnionGenerator.kt:123 */
  113    193   
        self.as_long_value().is_ok()
         194  +
        /* UnionGenerator.kt:122 */
  114    195   
    }
         196  +
    /* UnionGenerator.kt:217 */
  115    197   
    /// Tries to convert the enum instance into [`ShortValue`](crate::types::XmlUnionShape::ShortValue), extracting the inner [`i16`](i16).
         198  +
    /* UnionGenerator.kt:222 */
  116    199   
    /// Returns `Err(&Self)` if it can't be converted.
         200  +
    /* UnionGenerator.kt:223 */
  117    201   
    pub fn as_short_value(&self) -> ::std::result::Result<&i16, &Self> {
         202  +
        /* UnionGenerator.kt:227 */
  118    203   
        if let XmlUnionShape::ShortValue(val) = &self {
  119    204   
            ::std::result::Result::Ok(val)
  120    205   
        } else {
  121    206   
            ::std::result::Result::Err(self)
  122    207   
        }
         208  +
        /* UnionGenerator.kt:223 */
  123    209   
    }
         210  +
    /* UnionGenerator.kt:121 */
  124    211   
    /// Returns true if this is a [`ShortValue`](crate::types::XmlUnionShape::ShortValue).
         212  +
    /* UnionGenerator.kt:122 */
  125    213   
    pub fn is_short_value(&self) -> bool {
         214  +
        /* UnionGenerator.kt:123 */
  126    215   
        self.as_short_value().is_ok()
         216  +
        /* UnionGenerator.kt:122 */
  127    217   
    }
         218  +
    /* UnionGenerator.kt:217 */
  128    219   
    /// Tries to convert the enum instance into [`StringValue`](crate::types::XmlUnionShape::StringValue), extracting the inner [`String`](::std::string::String).
         220  +
    /* UnionGenerator.kt:222 */
  129    221   
    /// Returns `Err(&Self)` if it can't be converted.
         222  +
    /* UnionGenerator.kt:223 */
  130    223   
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         224  +
        /* UnionGenerator.kt:227 */
  131    225   
        if let XmlUnionShape::StringValue(val) = &self {
  132    226   
            ::std::result::Result::Ok(val)
  133    227   
        } else {
  134    228   
            ::std::result::Result::Err(self)
  135    229   
        }
         230  +
        /* UnionGenerator.kt:223 */
  136    231   
    }
         232  +
    /* UnionGenerator.kt:121 */
  137    233   
    /// Returns true if this is a [`StringValue`](crate::types::XmlUnionShape::StringValue).
         234  +
    /* UnionGenerator.kt:122 */
  138    235   
    pub fn is_string_value(&self) -> bool {
         236  +
        /* UnionGenerator.kt:123 */
  139    237   
        self.as_string_value().is_ok()
         238  +
        /* UnionGenerator.kt:122 */
  140    239   
    }
         240  +
    /* UnionGenerator.kt:217 */
  141    241   
    /// Tries to convert the enum instance into [`StructValue`](crate::types::XmlUnionShape::StructValue), extracting the inner [`XmlNestedUnionStruct`](crate::types::XmlNestedUnionStruct).
         242  +
    /* UnionGenerator.kt:222 */
  142    243   
    /// Returns `Err(&Self)` if it can't be converted.
         244  +
    /* UnionGenerator.kt:223 */
  143    245   
    pub fn as_struct_value(&self) -> ::std::result::Result<&crate::types::XmlNestedUnionStruct, &Self> {
         246  +
        /* UnionGenerator.kt:227 */
  144    247   
        if let XmlUnionShape::StructValue(val) = &self {
  145    248   
            ::std::result::Result::Ok(val)
  146    249   
        } else {
  147    250   
            ::std::result::Result::Err(self)
  148    251   
        }
         252  +
        /* UnionGenerator.kt:223 */
  149    253   
    }
         254  +
    /* UnionGenerator.kt:121 */
  150    255   
    /// Returns true if this is a [`StructValue`](crate::types::XmlUnionShape::StructValue).
         256  +
    /* UnionGenerator.kt:122 */
  151    257   
    pub fn is_struct_value(&self) -> bool {
         258  +
        /* UnionGenerator.kt:123 */
  152    259   
        self.as_struct_value().is_ok()
         260  +
        /* UnionGenerator.kt:122 */
  153    261   
    }
         262  +
    /* UnionGenerator.kt:217 */
  154    263   
    /// Tries to convert the enum instance into [`UnionValue`](crate::types::XmlUnionShape::UnionValue), extracting the inner [`XmlUnionShape`](crate::types::XmlUnionShape).
         264  +
    /* UnionGenerator.kt:222 */
  155    265   
    /// Returns `Err(&Self)` if it can't be converted.
         266  +
    /* UnionGenerator.kt:223 */
  156    267   
    pub fn as_union_value(&self) -> ::std::result::Result<&::std::boxed::Box<crate::types::XmlUnionShape>, &Self> {
         268  +
        /* UnionGenerator.kt:227 */
  157    269   
        if let XmlUnionShape::UnionValue(val) = &self {
  158    270   
            ::std::result::Result::Ok(val)
  159    271   
        } else {
  160    272   
            ::std::result::Result::Err(self)
  161    273   
        }
         274  +
        /* UnionGenerator.kt:223 */
  162    275   
    }
         276  +
    /* UnionGenerator.kt:121 */
  163    277   
    /// Returns true if this is a [`UnionValue`](crate::types::XmlUnionShape::UnionValue).
         278  +
    /* UnionGenerator.kt:122 */
  164    279   
    pub fn is_union_value(&self) -> bool {
         280  +
        /* UnionGenerator.kt:123 */
  165    281   
        self.as_union_value().is_ok()
         282  +
        /* UnionGenerator.kt:122 */
  166    283   
    }
         284  +
    /* UnionGenerator.kt:127 */
  167    285   
    /// Returns true if the enum instance is the `Unknown` variant.
         286  +
    /* UnionGenerator.kt:128 */
  168    287   
    pub fn is_unknown(&self) -> bool {
         288  +
        /* UnionGenerator.kt:129 */
  169    289   
        matches!(self, Self::Unknown)
         290  +
        /* UnionGenerator.kt:128 */
  170    291   
    }
         292  +
    /* UnionGenerator.kt:111 */
  171    293   
}

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

@@ -1,1 +26,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::_xml_namespace_nested::XmlNamespaceNestedBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_xml_attributes_payload_response::XmlAttributesPayloadResponseBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_xml_attributes_payload_request::XmlAttributesPayloadRequestBuilder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_greeting_struct::GreetingStructBuilder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_structure_list_member::StructureListMemberBuilder;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1Builder;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2Builder;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::_xml_nested_union_struct::XmlNestedUnionStructBuilder;
   17     25   
          26  +
/* CodegenDelegator.kt:255 */
   18     27   
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorDataBuilder;
   19     28   
          29  +
/* CodegenDelegator.kt:255 */
   20     30   
pub use crate::types::_payload_with_xml_namespace_and_prefix::PayloadWithXmlNamespaceAndPrefixBuilder;
   21     31   
          32  +
/* CodegenDelegator.kt:255 */
   22     33   
pub use crate::types::_payload_with_xml_namespace::PayloadWithXmlNamespaceBuilder;
   23     34   
          35  +
/* CodegenDelegator.kt:255 */
   24     36   
pub use crate::types::_payload_with_xml_name::PayloadWithXmlNameBuilder;
   25     37   
          38  +
/* CodegenDelegator.kt:255 */
   26     39   
pub use crate::types::_nested_payload::NestedPayloadBuilder;

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

@@ -1,1 +11,15 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::error::_complex_error::ComplexError;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_invalid_greeting::InvalidGreeting;
    5      7   
           8  +
/* RustModule.kt:172 */
    6      9   
mod _complex_error;
    7     10   
          11  +
/* RustModule.kt:172 */
    8     12   
mod _invalid_greeting;
    9     13   
   10         -
/// Builders
          14  +
/// /* CodegenDelegator.kt:51 */Builders
   11     15   
pub mod builders;

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

@@ -1,1 +121,212 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This error is thrown when a request is invalid.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct ComplexError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ComplexError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub header: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    9     13   
    #[allow(missing_docs)] // documentation missing in model
   10     14   
    pub top_level: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   11     16   
    #[allow(missing_docs)] // documentation missing in model
   12     17   
    pub nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
   13         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          18  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          19  +
    /* StructureGenerator.kt:201 */
   14     20   
}
          21  +
/* StructureGenerator.kt:135 */
   15     22   
impl ComplexError {
          23  +
    /* StructureGenerator.kt:231 */
   16     24   
    #[allow(missing_docs)] // documentation missing in model
          25  +
                           /* StructureGenerator.kt:166 */
   17     26   
    pub fn header(&self) -> ::std::option::Option<&str> {
          27  +
        /* StructureGenerator.kt:169 */
   18     28   
        self.header.as_deref()
          29  +
        /* StructureGenerator.kt:166 */
   19     30   
    }
          31  +
    /* StructureGenerator.kt:231 */
   20     32   
    #[allow(missing_docs)] // documentation missing in model
          33  +
                           /* StructureGenerator.kt:166 */
   21     34   
    pub fn top_level(&self) -> ::std::option::Option<&str> {
          35  +
        /* StructureGenerator.kt:169 */
   22     36   
        self.top_level.as_deref()
          37  +
        /* StructureGenerator.kt:166 */
   23     38   
    }
          39  +
    /* StructureGenerator.kt:231 */
   24     40   
    #[allow(missing_docs)] // documentation missing in model
          41  +
                           /* StructureGenerator.kt:166 */
   25     42   
    pub fn nested(&self) -> ::std::option::Option<&crate::types::ComplexNestedErrorData> {
          43  +
        /* StructureGenerator.kt:170 */
   26     44   
        self.nested.as_ref()
          45  +
        /* StructureGenerator.kt:166 */
   27     46   
    }
          47  +
    /* StructureGenerator.kt:135 */
          48  +
}
          49  +
/* ErrorImplGenerator.kt:99 */
          50  +
impl ComplexError {
          51  +
    /* ErrorImplGenerator.kt:99 */
   28     52   
}
   29         -
impl ComplexError {}
          53  +
/* ErrorImplGenerator.kt:153 */
   30     54   
impl ::std::fmt::Display for ComplexError {
          55  +
    /* ErrorImplGenerator.kt:154 */
   31     56   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          57  +
        /* ErrorImplGenerator.kt:161 */
   32     58   
        ::std::write!(f, "ComplexError")?;
          59  +
        /* ErrorImplGenerator.kt:171 */
   33     60   
        Ok(())
          61  +
        /* ErrorImplGenerator.kt:154 */
   34     62   
    }
          63  +
    /* ErrorImplGenerator.kt:153 */
   35     64   
}
          65  +
/* ErrorImplGenerator.kt:175 */
   36     66   
impl ::std::error::Error for ComplexError {}
          67  +
/* ErrorGenerator.kt:77 */
   37     68   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ComplexError {
          69  +
    /* ErrorGenerator.kt:78 */
   38     70   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     71   
        &self.meta
   40     72   
    }
          73  +
    /* ErrorGenerator.kt:77 */
   41     74   
}
          75  +
/* ErrorGenerator.kt:81 */
   42     76   
impl ComplexError {
   43         -
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
          77  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ComplexError`](crate::types::error::ComplexError).
          78  +
    /* BuilderGenerator.kt:175 */
   44     79   
    pub fn builder() -> crate::types::error::builders::ComplexErrorBuilder {
          80  +
        /* BuilderGenerator.kt:176 */
   45     81   
        crate::types::error::builders::ComplexErrorBuilder::default()
          82  +
        /* BuilderGenerator.kt:175 */
   46     83   
    }
          84  +
    /* ErrorGenerator.kt:81 */
   47     85   
}
   48     86   
   49         -
/// A builder for [`ComplexError`](crate::types::error::ComplexError).
          87  +
/// /* BuilderGenerator.kt:342 */A builder for [`ComplexError`](crate::types::error::ComplexError).
          88  +
/* RustType.kt:516 */
   50     89   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          90  +
/* RustType.kt:516 */
   51     91   
#[non_exhaustive]
          92  +
/* BuilderGenerator.kt:345 */
   52     93   
pub struct ComplexErrorBuilder {
   53         -
    pub(crate) header: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) top_level: ::std::option::Option<::std::string::String>,
   55         -
    pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
   56         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          94  +
    /* BuilderGenerator.kt:275 */ pub(crate) header: ::std::option::Option<::std::string::String>,
          95  +
    /* BuilderGenerator.kt:275 */ pub(crate) top_level: ::std::option::Option<::std::string::String>,
          96  +
    /* BuilderGenerator.kt:275 */ pub(crate) nested: ::std::option::Option<crate::types::ComplexNestedErrorData>,
          97  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          98  +
    /* BuilderGenerator.kt:345 */
   57     99   
}
         100  +
/* BuilderGenerator.kt:355 */
   58    101   
impl ComplexErrorBuilder {
         102  +
    /* BuilderGenerator.kt:286 */
   59    103   
    #[allow(missing_docs)] // documentation missing in model
         104  +
                           /* BuilderGenerator.kt:291 */
   60    105   
    pub fn header(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         106  +
        /* BuilderGenerator.kt:292 */
   61    107   
        self.header = ::std::option::Option::Some(input.into());
         108  +
        /* BuilderGenerator.kt:293 */
   62    109   
        self
         110  +
        /* BuilderGenerator.kt:291 */
   63    111   
    }
         112  +
    /* BuilderGenerator.kt:312 */
   64    113   
    #[allow(missing_docs)] // documentation missing in model
         114  +
                           /* BuilderGenerator.kt:314 */
   65    115   
    pub fn set_header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         116  +
        /* BuilderGenerator.kt:315 */
   66    117   
        self.header = input;
   67    118   
        self
         119  +
        /* BuilderGenerator.kt:314 */
   68    120   
    }
         121  +
    /* BuilderGenerator.kt:334 */
   69    122   
    #[allow(missing_docs)] // documentation missing in model
         123  +
                           /* BuilderGenerator.kt:336 */
   70    124   
    pub fn get_header(&self) -> &::std::option::Option<::std::string::String> {
         125  +
        /* BuilderGenerator.kt:337 */
   71    126   
        &self.header
         127  +
        /* BuilderGenerator.kt:336 */
   72    128   
    }
         129  +
    /* BuilderGenerator.kt:286 */
   73    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* BuilderGenerator.kt:291 */
   74    132   
    pub fn top_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         133  +
        /* BuilderGenerator.kt:292 */
   75    134   
        self.top_level = ::std::option::Option::Some(input.into());
         135  +
        /* BuilderGenerator.kt:293 */
   76    136   
        self
         137  +
        /* BuilderGenerator.kt:291 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:312 */
   78    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* BuilderGenerator.kt:314 */
   79    142   
    pub fn set_top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         143  +
        /* BuilderGenerator.kt:315 */
   80    144   
        self.top_level = input;
   81    145   
        self
         146  +
        /* BuilderGenerator.kt:314 */
   82    147   
    }
         148  +
    /* BuilderGenerator.kt:334 */
   83    149   
    #[allow(missing_docs)] // documentation missing in model
         150  +
                           /* BuilderGenerator.kt:336 */
   84    151   
    pub fn get_top_level(&self) -> &::std::option::Option<::std::string::String> {
         152  +
        /* BuilderGenerator.kt:337 */
   85    153   
        &self.top_level
         154  +
        /* BuilderGenerator.kt:336 */
   86    155   
    }
         156  +
    /* BuilderGenerator.kt:286 */
   87    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* BuilderGenerator.kt:291 */
   88    159   
    pub fn nested(mut self, input: crate::types::ComplexNestedErrorData) -> Self {
         160  +
        /* BuilderGenerator.kt:292 */
   89    161   
        self.nested = ::std::option::Option::Some(input);
         162  +
        /* BuilderGenerator.kt:293 */
   90    163   
        self
         164  +
        /* BuilderGenerator.kt:291 */
   91    165   
    }
         166  +
    /* BuilderGenerator.kt:312 */
   92    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* BuilderGenerator.kt:314 */
   93    169   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::ComplexNestedErrorData>) -> Self {
         170  +
        /* BuilderGenerator.kt:315 */
   94    171   
        self.nested = input;
   95    172   
        self
         173  +
        /* BuilderGenerator.kt:314 */
   96    174   
    }
         175  +
    /* BuilderGenerator.kt:334 */
   97    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* BuilderGenerator.kt:336 */
   98    178   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::ComplexNestedErrorData> {
         179  +
        /* BuilderGenerator.kt:337 */
   99    180   
        &self.nested
         181  +
        /* BuilderGenerator.kt:336 */
  100    182   
    }
         183  +
    /* ErrorGenerator.kt:101 */
  101    184   
    /// Sets error metadata
  102    185   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  103    186   
        self.meta = Some(meta);
  104    187   
        self
  105    188   
    }
  106    189   
  107    190   
    /// Sets error metadata
  108    191   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
  109    192   
        self.meta = meta;
  110    193   
        self
  111    194   
    }
  112         -
    /// Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
         195  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ComplexError`](crate::types::error::ComplexError).
         196  +
    /* BuilderGenerator.kt:253 */
  113    197   
    pub fn build(self) -> crate::types::error::ComplexError {
         198  +
        /* BuilderGenerator.kt:477 */
  114    199   
        crate::types::error::ComplexError {
  115         -
            header: self.header,
         200  +
            /* BuilderGenerator.kt:481 */ header: self.header,
         201  +
            /* BuilderGenerator.kt:481 */
  116    202   
            top_level: self.top_level,
         203  +
            /* BuilderGenerator.kt:481 */
  117    204   
            nested: self.nested,
         205  +
            /* ErrorGenerator.kt:120 */
  118    206   
            meta: self.meta.unwrap_or_default(),
         207  +
            /* BuilderGenerator.kt:477 */
  119    208   
        }
         209  +
        /* BuilderGenerator.kt:253 */
  120    210   
    }
         211  +
    /* BuilderGenerator.kt:355 */
  121    212   
}

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

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This error is thrown when an invalid greeting value is provided.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct InvalidGreeting {
           8  +
pub /* StructureGenerator.kt:201 */ struct InvalidGreeting {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl InvalidGreeting {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for InvalidGreeting {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "InvalidGreeting")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for InvalidGreeting {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvalidGreeting {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl InvalidGreeting {
   35         -
    /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::InvalidGreetingBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::InvalidGreetingBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`InvalidGreeting`](crate::types::error::InvalidGreeting).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct InvalidGreetingBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl InvalidGreetingBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`InvalidGreeting`](crate::types::error::InvalidGreeting).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`InvalidGreeting`](crate::types::error::InvalidGreeting).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::InvalidGreeting {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::InvalidGreeting {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}