Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/protocol_serde/shape_validation_exception_field_list.rs

@@ -1,1 +32,55 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_validation_exception_field_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::ValidationExceptionField>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:712 */
    8     10   
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          11  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10     12   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          13  +
            /* JsonParserGenerator.kt:407 */
   11     14   
            let mut items = Vec::new();
          15  +
            /* JsonParserGenerator.kt:408 */
   12     16   
            loop {
          17  +
                /* JsonParserGenerator.kt:409 */
   13     18   
                match tokens.peek() {
          19  +
                    /* JsonParserGenerator.kt:410 */
   14     20   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          21  +
                        /* JsonParserGenerator.kt:411 */
   15     22   
                        tokens.next().transpose().unwrap();
   16     23   
                        break;
          24  +
                        /* JsonParserGenerator.kt:410 */
   17     25   
                    }
          26  +
                    /* JsonParserGenerator.kt:413 */
   18     27   
                    _ => {
   19         -
                        let value = crate::protocol_serde::shape_validation_exception_field::de_validation_exception_field(tokens)?;
          28  +
                        /* JsonParserGenerator.kt:419 */
          29  +
                        let value =
          30  +
                            /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_validation_exception_field::de_validation_exception_field(tokens)?
          31  +
                        /* JsonParserGenerator.kt:419 */;
          32  +
                        /* JsonParserGenerator.kt:422 */
   20     33   
                        if let Some(value) = value {
   21     34   
                            items.push(value);
   22     35   
                        }
   23         -
                    }
          36  +
                        /* JsonParserGenerator.kt:413 */
          37  +
                    } /* JsonParserGenerator.kt:409 */
   24     38   
                }
          39  +
                /* JsonParserGenerator.kt:408 */
   25     40   
            }
          41  +
            /* JsonParserGenerator.kt:446 */
   26     42   
            Ok(Some(items))
          43  +
            /* JsonParserGenerator.kt:713 */
   27     44   
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29         -
            "expected start array or null",
   30         -
        )),
          45  +
        /* JsonParserGenerator.kt:722 */
          46  +
        _ => {
          47  +
            /* JsonParserGenerator.kt:723 */
          48  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
                "expected start array or null",
          50  +
            ))
          51  +
            /* JsonParserGenerator.kt:722 */
          52  +
        } /* JsonParserGenerator.kt:712 */
   31     53   
    }
          54  +
    /* JsonParserGenerator.kt:398 */
   32     55   
}

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

@@ -1,1 +103,109 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ErrorCorrection.kt:126 */
    2      3   
pub(crate) fn validation_exception_correct_errors(
    3      4   
    mut builder: crate::types::error::builders::ValidationErrorBuilder,
    4      5   
) -> crate::types::error::builders::ValidationErrorBuilder {
    5      6   
    if builder.message.is_none() {
    6      7   
        builder.message = Some(Default::default())
    7      8   
    }
    8      9   
    builder
    9     10   
}
   10     11   
          12  +
/* ErrorCorrection.kt:126 */
   11     13   
pub(crate) fn required_header_collection_operation_output_output_correct_errors(
   12     14   
    mut builder: crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationOutputBuilder,
   13     15   
) -> crate::operation::required_header_collection_operation::builders::RequiredHeaderCollectionOperationOutputBuilder {
   14     16   
    if builder.required_header_list.is_none() {
   15     17   
        builder.required_header_list = Some(Default::default())
   16     18   
    }
   17     19   
    if builder.required_header_set.is_none() {
   18     20   
        builder.required_header_set = Some(Default::default())
   19     21   
    }
   20     22   
    builder
   21     23   
}
   22     24   
          25  +
/* ErrorCorrection.kt:126 */
   23     26   
pub(crate) fn response_code_required_operation_output_output_correct_errors(
   24     27   
    mut builder: crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationOutputBuilder,
   25     28   
) -> crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationOutputBuilder {
   26     29   
    if builder.response_code.is_none() {
   27     30   
        builder.response_code = Some(Default::default())
   28     31   
    }
   29     32   
    builder
   30     33   
}
   31     34   
          35  +
/* ErrorCorrection.kt:126 */
   32     36   
pub(crate) fn inner_shape_correct_errors(mut builder: crate::types::builders::InnerShapeBuilder) -> crate::types::builders::InnerShapeBuilder {
   33     37   
    if builder.required_inner_most_shape.is_none() {
   34     38   
        builder.required_inner_most_shape = {
   35     39   
            let builder = crate::types::builders::InnermostShapeBuilder::default();
   36     40   
            crate::serde_util::innermost_shape_correct_errors(builder).build().ok()
   37     41   
        }
   38     42   
    }
   39     43   
    builder
   40     44   
}
   41     45   
          46  +
/* ErrorCorrection.kt:126 */
   42     47   
pub(crate) fn innermost_shape_correct_errors(
   43     48   
    mut builder: crate::types::builders::InnermostShapeBuilder,
   44     49   
) -> crate::types::builders::InnermostShapeBuilder {
   45     50   
    if builder.a_string.is_none() {
   46     51   
        builder.a_string = Some(Default::default())
   47     52   
    }
   48     53   
    if builder.a_boolean.is_none() {
   49     54   
        builder.a_boolean = Some(Default::default())
   50     55   
    }
   51     56   
    if builder.a_byte.is_none() {
   52     57   
        builder.a_byte = Some(Default::default())
   53     58   
    }
   54     59   
    if builder.a_short.is_none() {
   55     60   
        builder.a_short = Some(Default::default())
   56     61   
    }
   57     62   
    if builder.an_int.is_none() {
   58     63   
        builder.an_int = Some(Default::default())
   59     64   
    }
   60     65   
    if builder.a_long.is_none() {
   61     66   
        builder.a_long = Some(Default::default())
   62     67   
    }
   63     68   
    if builder.a_float.is_none() {
   64     69   
        builder.a_float = Some(Default::default())
   65     70   
    }
   66     71   
    if builder.a_double.is_none() {
   67     72   
        builder.a_double = Some(Default::default())
   68     73   
    }
   69     74   
    if builder.a_timestamp.is_none() {
   70     75   
        builder.a_timestamp = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
   71     76   
    }
   72     77   
    if builder.a_document.is_none() {
   73     78   
        builder.a_document = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
   74     79   
    }
   75     80   
    if builder.a_string_list.is_none() {
   76     81   
        builder.a_string_list = Some(Default::default())
   77     82   
    }
   78     83   
    if builder.a_string_map.is_none() {
   79     84   
        builder.a_string_map = Some(Default::default())
   80     85   
    }
   81     86   
    if builder.a_string_set.is_none() {
   82     87   
        builder.a_string_set = Some(Default::default())
   83     88   
    }
   84     89   
    if builder.a_blob.is_none() {
   85     90   
        builder.a_blob = Some(::aws_smithy_types::Blob::new(""))
   86     91   
    }
   87     92   
    if builder.a_union.is_none() {
   88     93   
        builder.a_union = Some(crate::types::AUnion::Unknown)
   89     94   
    }
   90     95   
    builder
   91     96   
}
   92     97   
          98  +
/* ErrorCorrection.kt:126 */
   93     99   
pub(crate) fn validation_exception_field_correct_errors(
   94    100   
    mut builder: crate::types::builders::ValidationExceptionFieldBuilder,
   95    101   
) -> crate::types::builders::ValidationExceptionFieldBuilder {
   96    102   
    if builder.path.is_none() {
   97    103   
        builder.path = Some(Default::default())
   98    104   
    }
   99    105   
    if builder.message.is_none() {
  100    106   
        builder.message = Some(Default::default())
  101    107   
    }
  102    108   
    builder

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

@@ -1,1 +26,36 @@
    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::_validation_exception_field::ValidationExceptionField;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_inner_shape::InnerShape;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_innermost_shape::InnermostShape;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_a_union::AUnion;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_empty_structure::EmptyStructure;
   11     16   
          17  +
/* RustModule.kt:172 */
   12     18   
mod _a_union;
   13     19   
          20  +
/* RustModule.kt:172 */
   14     21   
mod _empty_structure;
   15     22   
          23  +
/* RustModule.kt:172 */
   16     24   
mod _inner_shape;
   17     25   
          26  +
/* RustModule.kt:172 */
   18     27   
mod _innermost_shape;
   19     28   
          29  +
/* RustModule.kt:172 */
   20     30   
mod _validation_exception_field;
   21     31   
   22         -
/// Builders
          32  +
/// /* CodegenDelegator.kt:51 */Builders
   23     33   
pub mod builders;
   24     34   
   25         -
/// Error types that MiscService can respond with.
          35  +
/// /* ClientRustModule.kt:121 */Error types that MiscService can respond with.
   26     36   
pub mod error;

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

@@ -1,1 +66,116 @@
    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 AUnion {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* UnionGenerator.kt:85 */ enum AUnion {
           9  +
    /* UnionGenerator.kt:90 */ #[allow(missing_docs)] // documentation missing in model
          10  +
    /* UnionGenerator.kt:190 */
    7     11   
    I32(i32),
          12  +
    /* UnionGenerator.kt:90 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
          14  +
    /* UnionGenerator.kt:190 */
    9     15   
    String(::std::string::String),
          16  +
    /* UnionGenerator.kt:90 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
    /* UnionGenerator.kt:190 */
   11     19   
    Time(::aws_smithy_types::DateTime),
   12         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          20  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          21  +
    /* UnionGenerator.kt:97 */
   13     22   
    /// An unknown enum variant
          23  +
    /* UnionGenerator.kt:98 */
   14     24   
    ///
          25  +
    /* UnionGenerator.kt:99 */
   15     26   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          27  +
    /* UnionGenerator.kt:100 */
   16     28   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          29  +
    /* UnionGenerator.kt:101 */
   17     30   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          31  +
    /* UnionGenerator.kt:102 */
   18     32   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          33  +
    /* RustType.kt:516 */
   19     34   
    #[non_exhaustive]
          35  +
    /* UnionGenerator.kt:105 */
   20     36   
    Unknown,
          37  +
    /* UnionGenerator.kt:85 */
   21     38   
}
          39  +
/* UnionGenerator.kt:111 */
   22     40   
impl AUnion {
          41  +
    /* UnionGenerator.kt:217 */
   23     42   
    /// Tries to convert the enum instance into [`I32`](crate::types::AUnion::I32), extracting the inner [`i32`](i32).
          43  +
    /* UnionGenerator.kt:222 */
   24     44   
    /// Returns `Err(&Self)` if it can't be converted.
          45  +
    /* UnionGenerator.kt:223 */
   25     46   
    pub fn as_i32(&self) -> ::std::result::Result<&i32, &Self> {
          47  +
        /* UnionGenerator.kt:227 */
   26     48   
        if let AUnion::I32(val) = &self {
   27     49   
            ::std::result::Result::Ok(val)
   28     50   
        } else {
   29     51   
            ::std::result::Result::Err(self)
   30     52   
        }
          53  +
        /* UnionGenerator.kt:223 */
   31     54   
    }
          55  +
    /* UnionGenerator.kt:121 */
   32     56   
    /// Returns true if this is a [`I32`](crate::types::AUnion::I32).
          57  +
    /* UnionGenerator.kt:122 */
   33     58   
    pub fn is_i32(&self) -> bool {
          59  +
        /* UnionGenerator.kt:123 */
   34     60   
        self.as_i32().is_ok()
          61  +
        /* UnionGenerator.kt:122 */
   35     62   
    }
          63  +
    /* UnionGenerator.kt:217 */
   36     64   
    /// Tries to convert the enum instance into [`String`](crate::types::AUnion::String), extracting the inner [`String`](::std::string::String).
          65  +
    /* UnionGenerator.kt:222 */
   37     66   
    /// Returns `Err(&Self)` if it can't be converted.
          67  +
    /* UnionGenerator.kt:223 */
   38     68   
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          69  +
        /* UnionGenerator.kt:227 */
   39     70   
        if let AUnion::String(val) = &self {
   40     71   
            ::std::result::Result::Ok(val)
   41     72   
        } else {
   42     73   
            ::std::result::Result::Err(self)
   43     74   
        }
          75  +
        /* UnionGenerator.kt:223 */
   44     76   
    }
          77  +
    /* UnionGenerator.kt:121 */
   45     78   
    /// Returns true if this is a [`String`](crate::types::AUnion::String).
          79  +
    /* UnionGenerator.kt:122 */
   46     80   
    pub fn is_string(&self) -> bool {
          81  +
        /* UnionGenerator.kt:123 */
   47     82   
        self.as_string().is_ok()
          83  +
        /* UnionGenerator.kt:122 */
   48     84   
    }
          85  +
    /* UnionGenerator.kt:217 */
   49     86   
    /// Tries to convert the enum instance into [`Time`](crate::types::AUnion::Time), extracting the inner [`DateTime`](::aws_smithy_types::DateTime).
          87  +
    /* UnionGenerator.kt:222 */
   50     88   
    /// Returns `Err(&Self)` if it can't be converted.
          89  +
    /* UnionGenerator.kt:223 */
   51     90   
    pub fn as_time(&self) -> ::std::result::Result<&::aws_smithy_types::DateTime, &Self> {
          91  +
        /* UnionGenerator.kt:227 */
   52     92   
        if let AUnion::Time(val) = &self {
   53     93   
            ::std::result::Result::Ok(val)
   54     94   
        } else {
   55     95   
            ::std::result::Result::Err(self)
   56     96   
        }
          97  +
        /* UnionGenerator.kt:223 */
   57     98   
    }
          99  +
    /* UnionGenerator.kt:121 */
   58    100   
    /// Returns true if this is a [`Time`](crate::types::AUnion::Time).
         101  +
    /* UnionGenerator.kt:122 */
   59    102   
    pub fn is_time(&self) -> bool {
         103  +
        /* UnionGenerator.kt:123 */
   60    104   
        self.as_time().is_ok()
         105  +
        /* UnionGenerator.kt:122 */
   61    106   
    }
         107  +
    /* UnionGenerator.kt:127 */
   62    108   
    /// Returns true if the enum instance is the `Unknown` variant.
         109  +
    /* UnionGenerator.kt:128 */
   63    110   
    pub fn is_unknown(&self) -> bool {
         111  +
        /* UnionGenerator.kt:129 */
   64    112   
        matches!(self, Self::Unknown)
         113  +
        /* UnionGenerator.kt:128 */
   65    114   
    }
         115  +
    /* UnionGenerator.kt:111 */
   66    116   
}

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

@@ -1,1 +22,39 @@
    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 EmptyStructure {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EmptyStructure {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl EmptyStructure {
    7         -
    /// Creates a new builder-style object to manufacture [`EmptyStructure`](crate::types::EmptyStructure).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`EmptyStructure`](crate::types::EmptyStructure).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::types::builders::EmptyStructureBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::types::builders::EmptyStructureBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`EmptyStructure`](crate::types::EmptyStructure).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`EmptyStructure`](crate::types::EmptyStructure).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct EmptyStructureBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct EmptyStructureBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl EmptyStructureBuilder {
   18         -
    /// Consumes the builder and constructs a [`EmptyStructure`](crate::types::EmptyStructure).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`EmptyStructure`](crate::types::EmptyStructure).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::types::EmptyStructure {
   20         -
        crate::types::EmptyStructure {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::types::EmptyStructure {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +57,97 @@
    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 InnerShape {
           8  +
pub /* StructureGenerator.kt:201 */ struct InnerShape {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub required_inner_most_shape: crate::types::InnermostShape,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl InnerShape {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn required_inner_most_shape(&self) -> &crate::types::InnermostShape {
          20  +
        /* StructureGenerator.kt:172 */
   12     21   
        &self.required_inner_most_shape
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl InnerShape {
   16         -
    /// Creates a new builder-style object to manufacture [`InnerShape`](crate::types::InnerShape).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`InnerShape`](crate::types::InnerShape).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::types::builders::InnerShapeBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::types::builders::InnerShapeBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`InnerShape`](crate::types::InnerShape).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`InnerShape`](crate::types::InnerShape).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct InnerShapeBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) required_inner_most_shape: ::std::option::Option<crate::types::InnermostShape>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl InnerShapeBuilder {
          51  +
    /* BuilderGenerator.kt:286 */
   29     52   
    #[allow(missing_docs)] // documentation missing in model
   30         -
    /// This field is required.
          53  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          54  +
    /* BuilderGenerator.kt:291 */
   31     55   
    pub fn required_inner_most_shape(mut self, input: crate::types::InnermostShape) -> Self {
          56  +
        /* BuilderGenerator.kt:292 */
   32     57   
        self.required_inner_most_shape = ::std::option::Option::Some(input);
          58  +
        /* BuilderGenerator.kt:293 */
   33     59   
        self
          60  +
        /* BuilderGenerator.kt:291 */
   34     61   
    }
          62  +
    /* BuilderGenerator.kt:312 */
   35     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:314 */
   36     65   
    pub fn set_required_inner_most_shape(mut self, input: ::std::option::Option<crate::types::InnermostShape>) -> Self {
          66  +
        /* BuilderGenerator.kt:315 */
   37     67   
        self.required_inner_most_shape = input;
   38     68   
        self
          69  +
        /* BuilderGenerator.kt:314 */
   39     70   
    }
          71  +
    /* BuilderGenerator.kt:334 */
   40     72   
    #[allow(missing_docs)] // documentation missing in model
          73  +
                           /* BuilderGenerator.kt:336 */
   41     74   
    pub fn get_required_inner_most_shape(&self) -> &::std::option::Option<crate::types::InnermostShape> {
          75  +
        /* BuilderGenerator.kt:337 */
   42     76   
        &self.required_inner_most_shape
          77  +
        /* BuilderGenerator.kt:336 */
   43     78   
    }
   44         -
    /// Consumes the builder and constructs a [`InnerShape`](crate::types::InnerShape).
   45         -
    /// This method will fail if any of the following fields are not set:
   46         -
    /// - [`required_inner_most_shape`](crate::types::builders::InnerShapeBuilder::required_inner_most_shape)
          79  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`InnerShape`](crate::types::InnerShape).
          80  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          81  +
    /// /* BuilderGenerator.kt:246 */- [`required_inner_most_shape`](crate::types::builders::InnerShapeBuilder::required_inner_most_shape)
          82  +
    /* BuilderGenerator.kt:253 */
   47     83   
    pub fn build(self) -> ::std::result::Result<crate::types::InnerShape, ::aws_smithy_types::error::operation::BuildError> {
   48         -
        ::std::result::Result::Ok(crate::types::InnerShape {
   49         -
            required_inner_most_shape: self.required_inner_most_shape.ok_or_else(|| {
   50         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   51         -
                    "required_inner_most_shape",
   52         -
                    "required_inner_most_shape was not specified but it is required when building InnerShape",
   53         -
                )
   54         -
            })?,
   55         -
        })
          84  +
        /* BuilderGenerator.kt:254 */
          85  +
        ::std::result::Result::Ok(
          86  +
            /* BuilderGenerator.kt:477 */crate::types::InnerShape {
          87  +
                /* BuilderGenerator.kt:481 */required_inner_most_shape: self.required_inner_most_shape
          88  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          89  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("required_inner_most_shape", "required_inner_most_shape was not specified but it is required when building InnerShape")
          90  +
                    /* BuilderGenerator.kt:494 */)?
          91  +
                ,
          92  +
            /* BuilderGenerator.kt:477 */}
          93  +
        /* BuilderGenerator.kt:254 */)
          94  +
        /* BuilderGenerator.kt:253 */
   56     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   57     97   
}

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

@@ -1,1 +481,748 @@
    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 InnermostShape {
    6         -
    #[allow(missing_docs)] // documentation missing in model
           8  +
pub /* StructureGenerator.kt:201 */ struct InnermostShape {
           9  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    7     10   
    pub a_string: ::std::string::String,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     12   
    pub a_boolean: bool,
   10         -
    #[allow(missing_docs)] // documentation missing in model
          13  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   11     14   
    pub a_byte: i8,
   12         -
    #[allow(missing_docs)] // documentation missing in model
          15  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   13     16   
    pub a_short: i16,
   14         -
    #[allow(missing_docs)] // documentation missing in model
          17  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   15     18   
    pub an_int: i32,
   16         -
    #[allow(missing_docs)] // documentation missing in model
          19  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   17     20   
    pub a_long: i64,
   18         -
    #[allow(missing_docs)] // documentation missing in model
          21  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   19     22   
    pub a_float: f32,
   20         -
    #[allow(missing_docs)] // documentation missing in model
          23  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   21     24   
    pub a_double: f64,
   22         -
    #[allow(missing_docs)] // documentation missing in model
          25  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   23     26   
    pub a_timestamp: ::aws_smithy_types::DateTime,
   24         -
    #[allow(missing_docs)] // documentation missing in model
          27  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   25     28   
    pub a_document: ::aws_smithy_types::DateTime,
          29  +
    /* StructureGenerator.kt:231 */
   26     30   
    #[allow(missing_docs)] // documentation missing in model
   27     31   
    pub a_string_list: ::std::vec::Vec<::std::string::String>,
          32  +
    /* StructureGenerator.kt:231 */
   28     33   
    #[allow(missing_docs)] // documentation missing in model
   29     34   
    pub a_string_map: ::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>,
          35  +
    /* StructureGenerator.kt:231 */
   30     36   
    #[allow(missing_docs)] // documentation missing in model
   31     37   
    pub a_string_set: ::std::vec::Vec<::std::string::String>,
   32         -
    #[allow(missing_docs)] // documentation missing in model
          38  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   33     39   
    pub a_blob: ::aws_smithy_types::Blob,
          40  +
    /* StructureGenerator.kt:231 */
   34     41   
    #[allow(missing_docs)] // documentation missing in model
   35     42   
    pub a_union: crate::types::AUnion,
          43  +
    /* StructureGenerator.kt:201 */
   36     44   
}
          45  +
/* StructureGenerator.kt:135 */
   37     46   
impl InnermostShape {
          47  +
    /* StructureGenerator.kt:231 */
   38     48   
    #[allow(missing_docs)] // documentation missing in model
          49  +
                           /* StructureGenerator.kt:166 */
   39     50   
    pub fn a_string(&self) -> &str {
          51  +
        /* StructureGenerator.kt:171 */
   40     52   
        use std::ops::Deref;
   41     53   
        self.a_string.deref()
          54  +
        /* StructureGenerator.kt:166 */
   42     55   
    }
          56  +
    /* StructureGenerator.kt:231 */
   43     57   
    #[allow(missing_docs)] // documentation missing in model
          58  +
                           /* StructureGenerator.kt:166 */
   44     59   
    pub fn a_boolean(&self) -> bool {
          60  +
        /* StructureGenerator.kt:168 */
   45     61   
        self.a_boolean
          62  +
        /* StructureGenerator.kt:166 */
   46     63   
    }
          64  +
    /* StructureGenerator.kt:231 */
   47     65   
    #[allow(missing_docs)] // documentation missing in model
          66  +
                           /* StructureGenerator.kt:166 */
   48     67   
    pub fn a_byte(&self) -> i8 {
          68  +
        /* StructureGenerator.kt:168 */
   49     69   
        self.a_byte
          70  +
        /* StructureGenerator.kt:166 */
   50     71   
    }
          72  +
    /* StructureGenerator.kt:231 */
   51     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* StructureGenerator.kt:166 */
   52     75   
    pub fn a_short(&self) -> i16 {
          76  +
        /* StructureGenerator.kt:168 */
   53     77   
        self.a_short
          78  +
        /* StructureGenerator.kt:166 */
   54     79   
    }
          80  +
    /* StructureGenerator.kt:231 */
   55     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* StructureGenerator.kt:166 */
   56     83   
    pub fn an_int(&self) -> i32 {
          84  +
        /* StructureGenerator.kt:168 */
   57     85   
        self.an_int
          86  +
        /* StructureGenerator.kt:166 */
   58     87   
    }
          88  +
    /* StructureGenerator.kt:231 */
   59     89   
    #[allow(missing_docs)] // documentation missing in model
          90  +
                           /* StructureGenerator.kt:166 */
   60     91   
    pub fn a_long(&self) -> i64 {
          92  +
        /* StructureGenerator.kt:168 */
   61     93   
        self.a_long
          94  +
        /* StructureGenerator.kt:166 */
   62     95   
    }
          96  +
    /* StructureGenerator.kt:231 */
   63     97   
    #[allow(missing_docs)] // documentation missing in model
          98  +
                           /* StructureGenerator.kt:166 */
   64     99   
    pub fn a_float(&self) -> f32 {
         100  +
        /* StructureGenerator.kt:168 */
   65    101   
        self.a_float
         102  +
        /* StructureGenerator.kt:166 */
   66    103   
    }
         104  +
    /* StructureGenerator.kt:231 */
   67    105   
    #[allow(missing_docs)] // documentation missing in model
         106  +
                           /* StructureGenerator.kt:166 */
   68    107   
    pub fn a_double(&self) -> f64 {
         108  +
        /* StructureGenerator.kt:168 */
   69    109   
        self.a_double
         110  +
        /* StructureGenerator.kt:166 */
   70    111   
    }
         112  +
    /* StructureGenerator.kt:231 */
   71    113   
    #[allow(missing_docs)] // documentation missing in model
         114  +
                           /* StructureGenerator.kt:166 */
   72    115   
    pub fn a_timestamp(&self) -> &::aws_smithy_types::DateTime {
         116  +
        /* StructureGenerator.kt:172 */
   73    117   
        &self.a_timestamp
         118  +
        /* StructureGenerator.kt:166 */
   74    119   
    }
         120  +
    /* StructureGenerator.kt:231 */
   75    121   
    #[allow(missing_docs)] // documentation missing in model
         122  +
                           /* StructureGenerator.kt:166 */
   76    123   
    pub fn a_document(&self) -> &::aws_smithy_types::DateTime {
         124  +
        /* StructureGenerator.kt:172 */
   77    125   
        &self.a_document
         126  +
        /* StructureGenerator.kt:166 */
   78    127   
    }
         128  +
    /* StructureGenerator.kt:231 */
   79    129   
    #[allow(missing_docs)] // documentation missing in model
         130  +
                           /* StructureGenerator.kt:166 */
   80    131   
    pub fn a_string_list(&self) -> &[::std::string::String] {
         132  +
        /* StructureGenerator.kt:171 */
   81    133   
        use std::ops::Deref;
   82    134   
        self.a_string_list.deref()
         135  +
        /* StructureGenerator.kt:166 */
   83    136   
    }
         137  +
    /* StructureGenerator.kt:231 */
   84    138   
    #[allow(missing_docs)] // documentation missing in model
         139  +
                           /* StructureGenerator.kt:166 */
   85    140   
    pub fn a_string_map(&self) -> &::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime> {
         141  +
        /* StructureGenerator.kt:172 */
   86    142   
        &self.a_string_map
         143  +
        /* StructureGenerator.kt:166 */
   87    144   
    }
         145  +
    /* StructureGenerator.kt:231 */
   88    146   
    #[allow(missing_docs)] // documentation missing in model
         147  +
                           /* StructureGenerator.kt:166 */
   89    148   
    pub fn a_string_set(&self) -> &[::std::string::String] {
         149  +
        /* StructureGenerator.kt:171 */
   90    150   
        use std::ops::Deref;
   91    151   
        self.a_string_set.deref()
         152  +
        /* StructureGenerator.kt:166 */
   92    153   
    }
         154  +
    /* StructureGenerator.kt:231 */
   93    155   
    #[allow(missing_docs)] // documentation missing in model
         156  +
                           /* StructureGenerator.kt:166 */
   94    157   
    pub fn a_blob(&self) -> &::aws_smithy_types::Blob {
         158  +
        /* StructureGenerator.kt:172 */
   95    159   
        &self.a_blob
         160  +
        /* StructureGenerator.kt:166 */
   96    161   
    }
         162  +
    /* StructureGenerator.kt:231 */
   97    163   
    #[allow(missing_docs)] // documentation missing in model
         164  +
                           /* StructureGenerator.kt:166 */
   98    165   
    pub fn a_union(&self) -> &crate::types::AUnion {
         166  +
        /* StructureGenerator.kt:172 */
   99    167   
        &self.a_union
         168  +
        /* StructureGenerator.kt:166 */
  100    169   
    }
         170  +
    /* StructureGenerator.kt:135 */
  101    171   
}
         172  +
/* ClientCodegenVisitor.kt:237 */
  102    173   
impl InnermostShape {
  103         -
    /// Creates a new builder-style object to manufacture [`InnermostShape`](crate::types::InnermostShape).
         174  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`InnermostShape`](crate::types::InnermostShape).
         175  +
    /* BuilderGenerator.kt:175 */
  104    176   
    pub fn builder() -> crate::types::builders::InnermostShapeBuilder {
         177  +
        /* BuilderGenerator.kt:176 */
  105    178   
        crate::types::builders::InnermostShapeBuilder::default()
         179  +
        /* BuilderGenerator.kt:175 */
  106    180   
    }
         181  +
    /* ClientCodegenVisitor.kt:237 */
  107    182   
}
  108    183   
  109         -
/// A builder for [`InnermostShape`](crate::types::InnermostShape).
         184  +
/// /* BuilderGenerator.kt:342 */A builder for [`InnermostShape`](crate::types::InnermostShape).
         185  +
/* RustType.kt:516 */
  110    186   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         187  +
/* RustType.kt:516 */
  111    188   
#[non_exhaustive]
         189  +
/* BuilderGenerator.kt:345 */
  112    190   
pub struct InnermostShapeBuilder {
  113         -
    pub(crate) a_string: ::std::option::Option<::std::string::String>,
  114         -
    pub(crate) a_boolean: ::std::option::Option<bool>,
  115         -
    pub(crate) a_byte: ::std::option::Option<i8>,
  116         -
    pub(crate) a_short: ::std::option::Option<i16>,
  117         -
    pub(crate) an_int: ::std::option::Option<i32>,
  118         -
    pub(crate) a_long: ::std::option::Option<i64>,
  119         -
    pub(crate) a_float: ::std::option::Option<f32>,
  120         -
    pub(crate) a_double: ::std::option::Option<f64>,
  121         -
    pub(crate) a_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
  122         -
    pub(crate) a_document: ::std::option::Option<::aws_smithy_types::DateTime>,
  123         -
    pub(crate) a_string_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         191  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_string: ::std::option::Option<::std::string::String>,
         192  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_boolean: ::std::option::Option<bool>,
         193  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_byte: ::std::option::Option<i8>,
         194  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_short: ::std::option::Option<i16>,
         195  +
    /* BuilderGenerator.kt:275 */ pub(crate) an_int: ::std::option::Option<i32>,
         196  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_long: ::std::option::Option<i64>,
         197  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_float: ::std::option::Option<f32>,
         198  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_double: ::std::option::Option<f64>,
         199  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         200  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_document: ::std::option::Option<::aws_smithy_types::DateTime>,
         201  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_string_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         202  +
    /* BuilderGenerator.kt:275 */
  124    203   
    pub(crate) a_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>>,
  125         -
    pub(crate) a_string_set: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  126         -
    pub(crate) a_blob: ::std::option::Option<::aws_smithy_types::Blob>,
  127         -
    pub(crate) a_union: ::std::option::Option<crate::types::AUnion>,
         204  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_string_set: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         205  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_blob: ::std::option::Option<::aws_smithy_types::Blob>,
         206  +
    /* BuilderGenerator.kt:275 */ pub(crate) a_union: ::std::option::Option<crate::types::AUnion>,
         207  +
    /* BuilderGenerator.kt:345 */
  128    208   
}
         209  +
/* BuilderGenerator.kt:355 */
  129    210   
impl InnermostShapeBuilder {
         211  +
    /* BuilderGenerator.kt:286 */
  130    212   
    #[allow(missing_docs)] // documentation missing in model
  131         -
    /// This field is required.
         213  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         214  +
    /* BuilderGenerator.kt:291 */
  132    215   
    pub fn a_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         216  +
        /* BuilderGenerator.kt:292 */
  133    217   
        self.a_string = ::std::option::Option::Some(input.into());
         218  +
        /* BuilderGenerator.kt:293 */
  134    219   
        self
         220  +
        /* BuilderGenerator.kt:291 */
  135    221   
    }
         222  +
    /* BuilderGenerator.kt:312 */
  136    223   
    #[allow(missing_docs)] // documentation missing in model
         224  +
                           /* BuilderGenerator.kt:314 */
  137    225   
    pub fn set_a_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         226  +
        /* BuilderGenerator.kt:315 */
  138    227   
        self.a_string = input;
  139    228   
        self
         229  +
        /* BuilderGenerator.kt:314 */
  140    230   
    }
         231  +
    /* BuilderGenerator.kt:334 */
  141    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:336 */
  142    234   
    pub fn get_a_string(&self) -> &::std::option::Option<::std::string::String> {
         235  +
        /* BuilderGenerator.kt:337 */
  143    236   
        &self.a_string
         237  +
        /* BuilderGenerator.kt:336 */
  144    238   
    }
         239  +
    /* BuilderGenerator.kt:286 */
  145    240   
    #[allow(missing_docs)] // documentation missing in model
  146         -
    /// This field is required.
         241  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         242  +
    /* BuilderGenerator.kt:291 */
  147    243   
    pub fn a_boolean(mut self, input: bool) -> Self {
         244  +
        /* BuilderGenerator.kt:292 */
  148    245   
        self.a_boolean = ::std::option::Option::Some(input);
         246  +
        /* BuilderGenerator.kt:293 */
  149    247   
        self
         248  +
        /* BuilderGenerator.kt:291 */
  150    249   
    }
         250  +
    /* BuilderGenerator.kt:312 */
  151    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:314 */
  152    253   
    pub fn set_a_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
         254  +
        /* BuilderGenerator.kt:315 */
  153    255   
        self.a_boolean = input;
  154    256   
        self
         257  +
        /* BuilderGenerator.kt:314 */
  155    258   
    }
         259  +
    /* BuilderGenerator.kt:334 */
  156    260   
    #[allow(missing_docs)] // documentation missing in model
         261  +
                           /* BuilderGenerator.kt:336 */
  157    262   
    pub fn get_a_boolean(&self) -> &::std::option::Option<bool> {
         263  +
        /* BuilderGenerator.kt:337 */
  158    264   
        &self.a_boolean
         265  +
        /* BuilderGenerator.kt:336 */
  159    266   
    }
         267  +
    /* BuilderGenerator.kt:286 */
  160    268   
    #[allow(missing_docs)] // documentation missing in model
  161         -
    /// This field is required.
         269  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         270  +
    /* BuilderGenerator.kt:291 */
  162    271   
    pub fn a_byte(mut self, input: i8) -> Self {
         272  +
        /* BuilderGenerator.kt:292 */
  163    273   
        self.a_byte = ::std::option::Option::Some(input);
         274  +
        /* BuilderGenerator.kt:293 */
  164    275   
        self
         276  +
        /* BuilderGenerator.kt:291 */
  165    277   
    }
         278  +
    /* BuilderGenerator.kt:312 */
  166    279   
    #[allow(missing_docs)] // documentation missing in model
         280  +
                           /* BuilderGenerator.kt:314 */
  167    281   
    pub fn set_a_byte(mut self, input: ::std::option::Option<i8>) -> Self {
         282  +
        /* BuilderGenerator.kt:315 */
  168    283   
        self.a_byte = input;
  169    284   
        self
         285  +
        /* BuilderGenerator.kt:314 */
  170    286   
    }
         287  +
    /* BuilderGenerator.kt:334 */
  171    288   
    #[allow(missing_docs)] // documentation missing in model
         289  +
                           /* BuilderGenerator.kt:336 */
  172    290   
    pub fn get_a_byte(&self) -> &::std::option::Option<i8> {
         291  +
        /* BuilderGenerator.kt:337 */
  173    292   
        &self.a_byte
         293  +
        /* BuilderGenerator.kt:336 */
  174    294   
    }
         295  +
    /* BuilderGenerator.kt:286 */
  175    296   
    #[allow(missing_docs)] // documentation missing in model
  176         -
    /// This field is required.
         297  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         298  +
    /* BuilderGenerator.kt:291 */
  177    299   
    pub fn a_short(mut self, input: i16) -> Self {
         300  +
        /* BuilderGenerator.kt:292 */
  178    301   
        self.a_short = ::std::option::Option::Some(input);
         302  +
        /* BuilderGenerator.kt:293 */
  179    303   
        self
         304  +
        /* BuilderGenerator.kt:291 */
  180    305   
    }
         306  +
    /* BuilderGenerator.kt:312 */
  181    307   
    #[allow(missing_docs)] // documentation missing in model
         308  +
                           /* BuilderGenerator.kt:314 */
  182    309   
    pub fn set_a_short(mut self, input: ::std::option::Option<i16>) -> Self {
         310  +
        /* BuilderGenerator.kt:315 */
  183    311   
        self.a_short = input;
  184    312   
        self
         313  +
        /* BuilderGenerator.kt:314 */
  185    314   
    }
         315  +
    /* BuilderGenerator.kt:334 */
  186    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
                           /* BuilderGenerator.kt:336 */
  187    318   
    pub fn get_a_short(&self) -> &::std::option::Option<i16> {
         319  +
        /* BuilderGenerator.kt:337 */
  188    320   
        &self.a_short
         321  +
        /* BuilderGenerator.kt:336 */
  189    322   
    }
         323  +
    /* BuilderGenerator.kt:286 */
  190    324   
    #[allow(missing_docs)] // documentation missing in model
  191         -
    /// This field is required.
         325  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         326  +
    /* BuilderGenerator.kt:291 */
  192    327   
    pub fn an_int(mut self, input: i32) -> Self {
         328  +
        /* BuilderGenerator.kt:292 */
  193    329   
        self.an_int = ::std::option::Option::Some(input);
         330  +
        /* BuilderGenerator.kt:293 */
  194    331   
        self
         332  +
        /* BuilderGenerator.kt:291 */
  195    333   
    }
         334  +
    /* BuilderGenerator.kt:312 */
  196    335   
    #[allow(missing_docs)] // documentation missing in model
         336  +
                           /* BuilderGenerator.kt:314 */
  197    337   
    pub fn set_an_int(mut self, input: ::std::option::Option<i32>) -> Self {
         338  +
        /* BuilderGenerator.kt:315 */
  198    339   
        self.an_int = input;
  199    340   
        self
         341  +
        /* BuilderGenerator.kt:314 */
  200    342   
    }
         343  +
    /* BuilderGenerator.kt:334 */
  201    344   
    #[allow(missing_docs)] // documentation missing in model
         345  +
                           /* BuilderGenerator.kt:336 */
  202    346   
    pub fn get_an_int(&self) -> &::std::option::Option<i32> {
         347  +
        /* BuilderGenerator.kt:337 */
  203    348   
        &self.an_int
         349  +
        /* BuilderGenerator.kt:336 */
  204    350   
    }
         351  +
    /* BuilderGenerator.kt:286 */
  205    352   
    #[allow(missing_docs)] // documentation missing in model
  206         -
    /// This field is required.
         353  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         354  +
    /* BuilderGenerator.kt:291 */
  207    355   
    pub fn a_long(mut self, input: i64) -> Self {
         356  +
        /* BuilderGenerator.kt:292 */
  208    357   
        self.a_long = ::std::option::Option::Some(input);
         358  +
        /* BuilderGenerator.kt:293 */
  209    359   
        self
         360  +
        /* BuilderGenerator.kt:291 */
  210    361   
    }
         362  +
    /* BuilderGenerator.kt:312 */
  211    363   
    #[allow(missing_docs)] // documentation missing in model
         364  +
                           /* BuilderGenerator.kt:314 */
  212    365   
    pub fn set_a_long(mut self, input: ::std::option::Option<i64>) -> Self {
         366  +
        /* BuilderGenerator.kt:315 */
  213    367   
        self.a_long = input;
  214    368   
        self
         369  +
        /* BuilderGenerator.kt:314 */
  215    370   
    }
         371  +
    /* BuilderGenerator.kt:334 */
  216    372   
    #[allow(missing_docs)] // documentation missing in model
         373  +
                           /* BuilderGenerator.kt:336 */
  217    374   
    pub fn get_a_long(&self) -> &::std::option::Option<i64> {
         375  +
        /* BuilderGenerator.kt:337 */
  218    376   
        &self.a_long
         377  +
        /* BuilderGenerator.kt:336 */
  219    378   
    }
         379  +
    /* BuilderGenerator.kt:286 */
  220    380   
    #[allow(missing_docs)] // documentation missing in model
  221         -
    /// This field is required.
         381  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         382  +
    /* BuilderGenerator.kt:291 */
  222    383   
    pub fn a_float(mut self, input: f32) -> Self {
         384  +
        /* BuilderGenerator.kt:292 */
  223    385   
        self.a_float = ::std::option::Option::Some(input);
         386  +
        /* BuilderGenerator.kt:293 */
  224    387   
        self
         388  +
        /* BuilderGenerator.kt:291 */
  225    389   
    }
         390  +
    /* BuilderGenerator.kt:312 */
  226    391   
    #[allow(missing_docs)] // documentation missing in model
         392  +
                           /* BuilderGenerator.kt:314 */
  227    393   
    pub fn set_a_float(mut self, input: ::std::option::Option<f32>) -> Self {
         394  +
        /* BuilderGenerator.kt:315 */
  228    395   
        self.a_float = input;
  229    396   
        self
         397  +
        /* BuilderGenerator.kt:314 */
  230    398   
    }
         399  +
    /* BuilderGenerator.kt:334 */
  231    400   
    #[allow(missing_docs)] // documentation missing in model
         401  +
                           /* BuilderGenerator.kt:336 */
  232    402   
    pub fn get_a_float(&self) -> &::std::option::Option<f32> {
         403  +
        /* BuilderGenerator.kt:337 */
  233    404   
        &self.a_float
         405  +
        /* BuilderGenerator.kt:336 */
  234    406   
    }
         407  +
    /* BuilderGenerator.kt:286 */
  235    408   
    #[allow(missing_docs)] // documentation missing in model
  236         -
    /// This field is required.
         409  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         410  +
    /* BuilderGenerator.kt:291 */
  237    411   
    pub fn a_double(mut self, input: f64) -> Self {
         412  +
        /* BuilderGenerator.kt:292 */
  238    413   
        self.a_double = ::std::option::Option::Some(input);
         414  +
        /* BuilderGenerator.kt:293 */
  239    415   
        self
         416  +
        /* BuilderGenerator.kt:291 */
  240    417   
    }
         418  +
    /* BuilderGenerator.kt:312 */
  241    419   
    #[allow(missing_docs)] // documentation missing in model
         420  +
                           /* BuilderGenerator.kt:314 */
  242    421   
    pub fn set_a_double(mut self, input: ::std::option::Option<f64>) -> Self {
         422  +
        /* BuilderGenerator.kt:315 */
  243    423   
        self.a_double = input;
  244    424   
        self
         425  +
        /* BuilderGenerator.kt:314 */
  245    426   
    }
         427  +
    /* BuilderGenerator.kt:334 */
  246    428   
    #[allow(missing_docs)] // documentation missing in model
         429  +
                           /* BuilderGenerator.kt:336 */
  247    430   
    pub fn get_a_double(&self) -> &::std::option::Option<f64> {
         431  +
        /* BuilderGenerator.kt:337 */
  248    432   
        &self.a_double
         433  +
        /* BuilderGenerator.kt:336 */
  249    434   
    }
         435  +
    /* BuilderGenerator.kt:286 */
  250    436   
    #[allow(missing_docs)] // documentation missing in model
  251         -
    /// This field is required.
         437  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         438  +
    /* BuilderGenerator.kt:291 */
  252    439   
    pub fn a_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         440  +
        /* BuilderGenerator.kt:292 */
  253    441   
        self.a_timestamp = ::std::option::Option::Some(input);
         442  +
        /* BuilderGenerator.kt:293 */
  254    443   
        self
         444  +
        /* BuilderGenerator.kt:291 */
  255    445   
    }
         446  +
    /* BuilderGenerator.kt:312 */
  256    447   
    #[allow(missing_docs)] // documentation missing in model
         448  +
                           /* BuilderGenerator.kt:314 */
  257    449   
    pub fn set_a_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         450  +
        /* BuilderGenerator.kt:315 */
  258    451   
        self.a_timestamp = input;
  259    452   
        self
         453  +
        /* BuilderGenerator.kt:314 */
  260    454   
    }
         455  +
    /* BuilderGenerator.kt:334 */
  261    456   
    #[allow(missing_docs)] // documentation missing in model
         457  +
                           /* BuilderGenerator.kt:336 */
  262    458   
    pub fn get_a_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         459  +
        /* BuilderGenerator.kt:337 */
  263    460   
        &self.a_timestamp
         461  +
        /* BuilderGenerator.kt:336 */
  264    462   
    }
         463  +
    /* BuilderGenerator.kt:286 */
  265    464   
    #[allow(missing_docs)] // documentation missing in model
  266         -
    /// This field is required.
         465  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         466  +
    /* BuilderGenerator.kt:291 */
  267    467   
    pub fn a_document(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         468  +
        /* BuilderGenerator.kt:292 */
  268    469   
        self.a_document = ::std::option::Option::Some(input);
         470  +
        /* BuilderGenerator.kt:293 */
  269    471   
        self
         472  +
        /* BuilderGenerator.kt:291 */
  270    473   
    }
         474  +
    /* BuilderGenerator.kt:312 */
  271    475   
    #[allow(missing_docs)] // documentation missing in model
         476  +
                           /* BuilderGenerator.kt:314 */
  272    477   
    pub fn set_a_document(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         478  +
        /* BuilderGenerator.kt:315 */
  273    479   
        self.a_document = input;
  274    480   
        self
         481  +
        /* BuilderGenerator.kt:314 */
  275    482   
    }
         483  +
    /* BuilderGenerator.kt:334 */
  276    484   
    #[allow(missing_docs)] // documentation missing in model
         485  +
                           /* BuilderGenerator.kt:336 */
  277    486   
    pub fn get_a_document(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         487  +
        /* BuilderGenerator.kt:337 */
  278    488   
        &self.a_document
         489  +
        /* BuilderGenerator.kt:336 */
  279    490   
    }
  280         -
    /// Appends an item to `a_string_list`.
         491  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `a_string_list`.
         492  +
    /* BuilderGenerator.kt:411 */
  281    493   
    ///
  282         -
    /// To override the contents of this collection use [`set_a_string_list`](Self::set_a_string_list).
         494  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_a_string_list`](Self::set_a_string_list).
         495  +
    /* BuilderGenerator.kt:413 */
  283    496   
    ///
         497  +
    /* BuilderGenerator.kt:418 */
  284    498   
    pub fn a_string_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         499  +
        /* BuilderGenerator.kt:419 */
  285    500   
        let mut v = self.a_string_list.unwrap_or_default();
  286    501   
        v.push(input.into());
  287    502   
        self.a_string_list = ::std::option::Option::Some(v);
  288    503   
        self
         504  +
        /* BuilderGenerator.kt:418 */
  289    505   
    }
         506  +
    /* BuilderGenerator.kt:312 */
  290    507   
    #[allow(missing_docs)] // documentation missing in model
         508  +
                           /* BuilderGenerator.kt:314 */
  291    509   
    pub fn set_a_string_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         510  +
        /* BuilderGenerator.kt:315 */
  292    511   
        self.a_string_list = input;
  293    512   
        self
         513  +
        /* BuilderGenerator.kt:314 */
  294    514   
    }
         515  +
    /* BuilderGenerator.kt:334 */
  295    516   
    #[allow(missing_docs)] // documentation missing in model
         517  +
                           /* BuilderGenerator.kt:336 */
  296    518   
    pub fn get_a_string_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         519  +
        /* BuilderGenerator.kt:337 */
  297    520   
        &self.a_string_list
         521  +
        /* BuilderGenerator.kt:336 */
  298    522   
    }
  299         -
    /// Adds a key-value pair to `a_string_map`.
         523  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `a_string_map`.
         524  +
    /* BuilderGenerator.kt:437 */
  300    525   
    ///
  301         -
    /// To override the contents of this collection use [`set_a_string_map`](Self::set_a_string_map).
         526  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_a_string_map`](Self::set_a_string_map).
         527  +
    /* BuilderGenerator.kt:439 */
  302    528   
    ///
         529  +
    /* BuilderGenerator.kt:445 */
  303    530   
    pub fn a_string_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::DateTime) -> Self {
         531  +
        /* BuilderGenerator.kt:448 */
  304    532   
        let mut hash_map = self.a_string_map.unwrap_or_default();
  305    533   
        hash_map.insert(k.into(), v);
  306    534   
        self.a_string_map = ::std::option::Option::Some(hash_map);
  307    535   
        self
         536  +
        /* BuilderGenerator.kt:445 */
  308    537   
    }
         538  +
    /* BuilderGenerator.kt:312 */
  309    539   
    #[allow(missing_docs)] // documentation missing in model
         540  +
                           /* BuilderGenerator.kt:314 */
  310    541   
    pub fn set_a_string_map(
  311    542   
        mut self,
  312    543   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>>,
  313    544   
    ) -> Self {
         545  +
        /* BuilderGenerator.kt:315 */
  314    546   
        self.a_string_map = input;
  315    547   
        self
         548  +
        /* BuilderGenerator.kt:314 */
  316    549   
    }
         550  +
    /* BuilderGenerator.kt:334 */
  317    551   
    #[allow(missing_docs)] // documentation missing in model
         552  +
                           /* BuilderGenerator.kt:336 */
  318    553   
    pub fn get_a_string_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>> {
         554  +
        /* BuilderGenerator.kt:337 */
  319    555   
        &self.a_string_map
         556  +
        /* BuilderGenerator.kt:336 */
  320    557   
    }
  321         -
    /// Appends an item to `a_string_set`.
         558  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `a_string_set`.
         559  +
    /* BuilderGenerator.kt:411 */
  322    560   
    ///
  323         -
    /// To override the contents of this collection use [`set_a_string_set`](Self::set_a_string_set).
         561  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_a_string_set`](Self::set_a_string_set).
         562  +
    /* BuilderGenerator.kt:413 */
  324    563   
    ///
         564  +
    /* BuilderGenerator.kt:418 */
  325    565   
    pub fn a_string_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         566  +
        /* BuilderGenerator.kt:419 */
  326    567   
        let mut v = self.a_string_set.unwrap_or_default();
  327    568   
        v.push(input.into());
  328    569   
        self.a_string_set = ::std::option::Option::Some(v);
  329    570   
        self
         571  +
        /* BuilderGenerator.kt:418 */
  330    572   
    }
         573  +
    /* BuilderGenerator.kt:312 */
  331    574   
    #[allow(missing_docs)] // documentation missing in model
         575  +
                           /* BuilderGenerator.kt:314 */
  332    576   
    pub fn set_a_string_set(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         577  +
        /* BuilderGenerator.kt:315 */
  333    578   
        self.a_string_set = input;
  334    579   
        self
         580  +
        /* BuilderGenerator.kt:314 */
  335    581   
    }
         582  +
    /* BuilderGenerator.kt:334 */
  336    583   
    #[allow(missing_docs)] // documentation missing in model
         584  +
                           /* BuilderGenerator.kt:336 */
  337    585   
    pub fn get_a_string_set(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         586  +
        /* BuilderGenerator.kt:337 */
  338    587   
        &self.a_string_set
         588  +
        /* BuilderGenerator.kt:336 */
  339    589   
    }
         590  +
    /* BuilderGenerator.kt:286 */
  340    591   
    #[allow(missing_docs)] // documentation missing in model
  341         -
    /// This field is required.
         592  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         593  +
    /* BuilderGenerator.kt:291 */
  342    594   
    pub fn a_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
         595  +
        /* BuilderGenerator.kt:292 */
  343    596   
        self.a_blob = ::std::option::Option::Some(input);
         597  +
        /* BuilderGenerator.kt:293 */
  344    598   
        self
         599  +
        /* BuilderGenerator.kt:291 */
  345    600   
    }
         601  +
    /* BuilderGenerator.kt:312 */
  346    602   
    #[allow(missing_docs)] // documentation missing in model
         603  +
                           /* BuilderGenerator.kt:314 */
  347    604   
    pub fn set_a_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
         605  +
        /* BuilderGenerator.kt:315 */
  348    606   
        self.a_blob = input;
  349    607   
        self
         608  +
        /* BuilderGenerator.kt:314 */
  350    609   
    }
         610  +
    /* BuilderGenerator.kt:334 */
  351    611   
    #[allow(missing_docs)] // documentation missing in model
         612  +
                           /* BuilderGenerator.kt:336 */
  352    613   
    pub fn get_a_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
         614  +
        /* BuilderGenerator.kt:337 */
  353    615   
        &self.a_blob
         616  +
        /* BuilderGenerator.kt:336 */
  354    617   
    }
         618  +
    /* BuilderGenerator.kt:286 */
  355    619   
    #[allow(missing_docs)] // documentation missing in model
  356         -
    /// This field is required.
         620  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         621  +
    /* BuilderGenerator.kt:291 */
  357    622   
    pub fn a_union(mut self, input: crate::types::AUnion) -> Self {
         623  +
        /* BuilderGenerator.kt:292 */
  358    624   
        self.a_union = ::std::option::Option::Some(input);
         625  +
        /* BuilderGenerator.kt:293 */
  359    626   
        self
         627  +
        /* BuilderGenerator.kt:291 */
  360    628   
    }
         629  +
    /* BuilderGenerator.kt:312 */
  361    630   
    #[allow(missing_docs)] // documentation missing in model
         631  +
                           /* BuilderGenerator.kt:314 */
  362    632   
    pub fn set_a_union(mut self, input: ::std::option::Option<crate::types::AUnion>) -> Self {
         633  +
        /* BuilderGenerator.kt:315 */
  363    634   
        self.a_union = input;
  364    635   
        self
         636  +
        /* BuilderGenerator.kt:314 */
  365    637   
    }
         638  +
    /* BuilderGenerator.kt:334 */
  366    639   
    #[allow(missing_docs)] // documentation missing in model
         640  +
                           /* BuilderGenerator.kt:336 */
  367    641   
    pub fn get_a_union(&self) -> &::std::option::Option<crate::types::AUnion> {
         642  +
        /* BuilderGenerator.kt:337 */
  368    643   
        &self.a_union
  369         -
    }
  370         -
    /// Consumes the builder and constructs a [`InnermostShape`](crate::types::InnermostShape).
  371         -
    /// This method will fail if any of the following fields are not set:
  372         -
    /// - [`a_string`](crate::types::builders::InnermostShapeBuilder::a_string)
  373         -
    /// - [`a_boolean`](crate::types::builders::InnermostShapeBuilder::a_boolean)
  374         -
    /// - [`a_byte`](crate::types::builders::InnermostShapeBuilder::a_byte)
  375         -
    /// - [`a_short`](crate::types::builders::InnermostShapeBuilder::a_short)
  376         -
    /// - [`an_int`](crate::types::builders::InnermostShapeBuilder::an_int)
  377         -
    /// - [`a_long`](crate::types::builders::InnermostShapeBuilder::a_long)
  378         -
    /// - [`a_float`](crate::types::builders::InnermostShapeBuilder::a_float)
  379         -
    /// - [`a_double`](crate::types::builders::InnermostShapeBuilder::a_double)
  380         -
    /// - [`a_timestamp`](crate::types::builders::InnermostShapeBuilder::a_timestamp)
  381         -
    /// - [`a_document`](crate::types::builders::InnermostShapeBuilder::a_document)
  382         -
    /// - [`a_string_list`](crate::types::builders::InnermostShapeBuilder::a_string_list)
  383         -
    /// - [`a_string_map`](crate::types::builders::InnermostShapeBuilder::a_string_map)
  384         -
    /// - [`a_string_set`](crate::types::builders::InnermostShapeBuilder::a_string_set)
  385         -
    /// - [`a_blob`](crate::types::builders::InnermostShapeBuilder::a_blob)
  386         -
    /// - [`a_union`](crate::types::builders::InnermostShapeBuilder::a_union)
         644  +
        /* BuilderGenerator.kt:336 */
         645  +
    }
         646  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`InnermostShape`](crate::types::InnermostShape).
         647  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         648  +
    /// /* BuilderGenerator.kt:246 */- [`a_string`](crate::types::builders::InnermostShapeBuilder::a_string)
         649  +
    /// /* BuilderGenerator.kt:246 */- [`a_boolean`](crate::types::builders::InnermostShapeBuilder::a_boolean)
         650  +
    /// /* BuilderGenerator.kt:246 */- [`a_byte`](crate::types::builders::InnermostShapeBuilder::a_byte)
         651  +
    /// /* BuilderGenerator.kt:246 */- [`a_short`](crate::types::builders::InnermostShapeBuilder::a_short)
         652  +
    /// /* BuilderGenerator.kt:246 */- [`an_int`](crate::types::builders::InnermostShapeBuilder::an_int)
         653  +
    /// /* BuilderGenerator.kt:246 */- [`a_long`](crate::types::builders::InnermostShapeBuilder::a_long)
         654  +
    /// /* BuilderGenerator.kt:246 */- [`a_float`](crate::types::builders::InnermostShapeBuilder::a_float)
         655  +
    /// /* BuilderGenerator.kt:246 */- [`a_double`](crate::types::builders::InnermostShapeBuilder::a_double)
         656  +
    /// /* BuilderGenerator.kt:246 */- [`a_timestamp`](crate::types::builders::InnermostShapeBuilder::a_timestamp)
         657  +
    /// /* BuilderGenerator.kt:246 */- [`a_document`](crate::types::builders::InnermostShapeBuilder::a_document)
         658  +
    /// /* BuilderGenerator.kt:246 */- [`a_string_list`](crate::types::builders::InnermostShapeBuilder::a_string_list)
         659  +
    /// /* BuilderGenerator.kt:246 */- [`a_string_map`](crate::types::builders::InnermostShapeBuilder::a_string_map)
         660  +
    /// /* BuilderGenerator.kt:246 */- [`a_string_set`](crate::types::builders::InnermostShapeBuilder::a_string_set)
         661  +
    /// /* BuilderGenerator.kt:246 */- [`a_blob`](crate::types::builders::InnermostShapeBuilder::a_blob)
         662  +
    /// /* BuilderGenerator.kt:246 */- [`a_union`](crate::types::builders::InnermostShapeBuilder::a_union)
         663  +
    /* BuilderGenerator.kt:253 */
  387    664   
    pub fn build(self) -> ::std::result::Result<crate::types::InnermostShape, ::aws_smithy_types::error::operation::BuildError> {
  388         -
        ::std::result::Result::Ok(crate::types::InnermostShape {
  389         -
            a_string: self.a_string.ok_or_else(|| {
  390         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  391         -
                    "a_string",
  392         -
                    "a_string was not specified but it is required when building InnermostShape",
  393         -
                )
  394         -
            })?,
  395         -
            a_boolean: self.a_boolean.ok_or_else(|| {
  396         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  397         -
                    "a_boolean",
  398         -
                    "a_boolean was not specified but it is required when building InnermostShape",
  399         -
                )
  400         -
            })?,
  401         -
            a_byte: self.a_byte.ok_or_else(|| {
  402         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  403         -
                    "a_byte",
  404         -
                    "a_byte was not specified but it is required when building InnermostShape",
  405         -
                )
  406         -
            })?,
  407         -
            a_short: self.a_short.ok_or_else(|| {
  408         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  409         -
                    "a_short",
  410         -
                    "a_short was not specified but it is required when building InnermostShape",
  411         -
                )
  412         -
            })?,
  413         -
            an_int: self.an_int.ok_or_else(|| {
  414         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  415         -
                    "an_int",
  416         -
                    "an_int was not specified but it is required when building InnermostShape",
  417         -
                )
  418         -
            })?,
  419         -
            a_long: self.a_long.ok_or_else(|| {
  420         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  421         -
                    "a_long",
  422         -
                    "a_long was not specified but it is required when building InnermostShape",
  423         -
                )
  424         -
            })?,
  425         -
            a_float: self.a_float.ok_or_else(|| {
  426         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  427         -
                    "a_float",
  428         -
                    "a_float was not specified but it is required when building InnermostShape",
  429         -
                )
  430         -
            })?,
  431         -
            a_double: self.a_double.ok_or_else(|| {
  432         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  433         -
                    "a_double",
  434         -
                    "a_double was not specified but it is required when building InnermostShape",
  435         -
                )
  436         -
            })?,
  437         -
            a_timestamp: self.a_timestamp.ok_or_else(|| {
  438         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  439         -
                    "a_timestamp",
  440         -
                    "a_timestamp was not specified but it is required when building InnermostShape",
  441         -
                )
  442         -
            })?,
  443         -
            a_document: self.a_document.ok_or_else(|| {
  444         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  445         -
                    "a_document",
  446         -
                    "a_document was not specified but it is required when building InnermostShape",
  447         -
                )
  448         -
            })?,
  449         -
            a_string_list: self.a_string_list.ok_or_else(|| {
  450         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  451         -
                    "a_string_list",
  452         -
                    "a_string_list was not specified but it is required when building InnermostShape",
  453         -
                )
  454         -
            })?,
  455         -
            a_string_map: self.a_string_map.ok_or_else(|| {
  456         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  457         -
                    "a_string_map",
  458         -
                    "a_string_map was not specified but it is required when building InnermostShape",
  459         -
                )
  460         -
            })?,
  461         -
            a_string_set: self.a_string_set.ok_or_else(|| {
  462         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  463         -
                    "a_string_set",
  464         -
                    "a_string_set was not specified but it is required when building InnermostShape",
  465         -
                )
  466         -
            })?,
  467         -
            a_blob: self.a_blob.ok_or_else(|| {
  468         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  469         -
                    "a_blob",
  470         -
                    "a_blob was not specified but it is required when building InnermostShape",
  471         -
                )
  472         -
            })?,
  473         -
            a_union: self.a_union.ok_or_else(|| {
  474         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  475         -
                    "a_union",
  476         -
                    "a_union was not specified but it is required when building InnermostShape",
  477         -
                )
  478         -
            })?,
  479         -
        })
  480         -
    }
         665  +
        /* BuilderGenerator.kt:254 */
         666  +
        ::std::result::Result::Ok(
         667  +
            /* BuilderGenerator.kt:477 */crate::types::InnermostShape {
         668  +
                /* BuilderGenerator.kt:481 */a_string: self.a_string
         669  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         670  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_string", "a_string was not specified but it is required when building InnermostShape")
         671  +
                    /* BuilderGenerator.kt:494 */)?
         672  +
                ,
         673  +
                /* BuilderGenerator.kt:481 */a_boolean: self.a_boolean
         674  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         675  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_boolean", "a_boolean was not specified but it is required when building InnermostShape")
         676  +
                    /* BuilderGenerator.kt:494 */)?
         677  +
                ,
         678  +
                /* BuilderGenerator.kt:481 */a_byte: self.a_byte
         679  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         680  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_byte", "a_byte was not specified but it is required when building InnermostShape")
         681  +
                    /* BuilderGenerator.kt:494 */)?
         682  +
                ,
         683  +
                /* BuilderGenerator.kt:481 */a_short: self.a_short
         684  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         685  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_short", "a_short was not specified but it is required when building InnermostShape")
         686  +
                    /* BuilderGenerator.kt:494 */)?
         687  +
                ,
         688  +
                /* BuilderGenerator.kt:481 */an_int: self.an_int
         689  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         690  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("an_int", "an_int was not specified but it is required when building InnermostShape")
         691  +
                    /* BuilderGenerator.kt:494 */)?
         692  +
                ,
         693  +
                /* BuilderGenerator.kt:481 */a_long: self.a_long
         694  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         695  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_long", "a_long was not specified but it is required when building InnermostShape")
         696  +
                    /* BuilderGenerator.kt:494 */)?
         697  +
                ,
         698  +
                /* BuilderGenerator.kt:481 */a_float: self.a_float
         699  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         700  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_float", "a_float was not specified but it is required when building InnermostShape")
         701  +
                    /* BuilderGenerator.kt:494 */)?
         702  +
                ,
         703  +
                /* BuilderGenerator.kt:481 */a_double: self.a_double
         704  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         705  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_double", "a_double was not specified but it is required when building InnermostShape")
         706  +
                    /* BuilderGenerator.kt:494 */)?
         707  +
                ,
         708  +
                /* BuilderGenerator.kt:481 */a_timestamp: self.a_timestamp
         709  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         710  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_timestamp", "a_timestamp was not specified but it is required when building InnermostShape")
         711  +
                    /* BuilderGenerator.kt:494 */)?
         712  +
                ,
         713  +
                /* BuilderGenerator.kt:481 */a_document: self.a_document
         714  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         715  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_document", "a_document was not specified but it is required when building InnermostShape")
         716  +
                    /* BuilderGenerator.kt:494 */)?
         717  +
                ,
         718  +
                /* BuilderGenerator.kt:481 */a_string_list: self.a_string_list
         719  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         720  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_string_list", "a_string_list was not specified but it is required when building InnermostShape")
         721  +
                    /* BuilderGenerator.kt:494 */)?
         722  +
                ,
         723  +
                /* BuilderGenerator.kt:481 */a_string_map: self.a_string_map
         724  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         725  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_string_map", "a_string_map was not specified but it is required when building InnermostShape")
         726  +
                    /* BuilderGenerator.kt:494 */)?
         727  +
                ,
         728  +
                /* BuilderGenerator.kt:481 */a_string_set: self.a_string_set
         729  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         730  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_string_set", "a_string_set was not specified but it is required when building InnermostShape")
         731  +
                    /* BuilderGenerator.kt:494 */)?
         732  +
                ,
         733  +
                /* BuilderGenerator.kt:481 */a_blob: self.a_blob
         734  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         735  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_blob", "a_blob was not specified but it is required when building InnermostShape")
         736  +
                    /* BuilderGenerator.kt:494 */)?
         737  +
                ,
         738  +
                /* BuilderGenerator.kt:481 */a_union: self.a_union
         739  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         740  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("a_union", "a_union was not specified but it is required when building InnermostShape")
         741  +
                    /* BuilderGenerator.kt:494 */)?
         742  +
                ,
         743  +
            /* BuilderGenerator.kt:477 */}
         744  +
        /* BuilderGenerator.kt:254 */)
         745  +
        /* BuilderGenerator.kt:253 */
         746  +
    }
         747  +
    /* BuilderGenerator.kt:355 */
  481    748   
}

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

@@ -1,1 +89,134 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Describes one specific validation failure for an input member.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
           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 ValidationExceptionField {
    7         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
           8  +
pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
           9  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    8     10   
    pub path: ::std::string::String,
    9         -
    /// A detailed description of the validation failure.
          11  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   10     12   
    pub message: ::std::string::String,
          13  +
    /* StructureGenerator.kt:201 */
   11     14   
}
          15  +
/* StructureGenerator.kt:135 */
   12     16   
impl ValidationExceptionField {
   13         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          17  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          18  +
    /* StructureGenerator.kt:166 */
   14     19   
    pub fn path(&self) -> &str {
          20  +
        /* StructureGenerator.kt:171 */
   15     21   
        use std::ops::Deref;
   16     22   
        self.path.deref()
          23  +
        /* StructureGenerator.kt:166 */
   17     24   
    }
   18         -
    /// A detailed description of the validation failure.
          25  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
          26  +
    /* StructureGenerator.kt:166 */
   19     27   
    pub fn message(&self) -> &str {
          28  +
        /* StructureGenerator.kt:171 */
   20     29   
        use std::ops::Deref;
   21     30   
        self.message.deref()
          31  +
        /* StructureGenerator.kt:166 */
   22     32   
    }
          33  +
    /* StructureGenerator.kt:135 */
   23     34   
}
          35  +
/* ClientCodegenVisitor.kt:237 */
   24     36   
impl ValidationExceptionField {
   25         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
          37  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::types::ValidationExceptionField).
          38  +
    /* BuilderGenerator.kt:175 */
   26     39   
    pub fn builder() -> crate::types::builders::ValidationExceptionFieldBuilder {
          40  +
        /* BuilderGenerator.kt:176 */
   27     41   
        crate::types::builders::ValidationExceptionFieldBuilder::default()
          42  +
        /* BuilderGenerator.kt:175 */
   28     43   
    }
          44  +
    /* ClientCodegenVisitor.kt:237 */
   29     45   
}
   30     46   
   31         -
/// A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
          47  +
/// /* BuilderGenerator.kt:342 */A builder for [`ValidationExceptionField`](crate::types::ValidationExceptionField).
          48  +
/* RustType.kt:516 */
   32     49   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          50  +
/* RustType.kt:516 */
   33     51   
#[non_exhaustive]
          52  +
/* BuilderGenerator.kt:345 */
   34     53   
pub struct ValidationExceptionFieldBuilder {
   35         -
    pub(crate) path: ::std::option::Option<::std::string::String>,
   36         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
          54  +
    /* BuilderGenerator.kt:275 */ pub(crate) path: ::std::option::Option<::std::string::String>,
          55  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:345 */
   37     57   
}
          58  +
/* BuilderGenerator.kt:355 */
   38     59   
impl ValidationExceptionFieldBuilder {
   39         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   40         -
    /// This field is required.
          60  +
    /// /* BuilderGenerator.kt:286 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          61  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          62  +
    /* BuilderGenerator.kt:291 */
   41     63   
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          64  +
        /* BuilderGenerator.kt:292 */
   42     65   
        self.path = ::std::option::Option::Some(input.into());
          66  +
        /* BuilderGenerator.kt:293 */
   43     67   
        self
          68  +
        /* BuilderGenerator.kt:291 */
   44     69   
    }
   45         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          70  +
    /// /* BuilderGenerator.kt:312 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          71  +
    /* BuilderGenerator.kt:314 */
   46     72   
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   47     74   
        self.path = input;
   48     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   49     77   
    }
   50         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          78  +
    /// /* BuilderGenerator.kt:334 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          79  +
    /* BuilderGenerator.kt:336 */
   51     80   
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
          81  +
        /* BuilderGenerator.kt:337 */
   52     82   
        &self.path
          83  +
        /* BuilderGenerator.kt:336 */
   53     84   
    }
   54         -
    /// A detailed description of the validation failure.
   55         -
    /// This field is required.
          85  +
    /// /* BuilderGenerator.kt:286 */A detailed description of the validation failure.
          86  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          87  +
    /* BuilderGenerator.kt:291 */
   56     88   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          89  +
        /* BuilderGenerator.kt:292 */
   57     90   
        self.message = ::std::option::Option::Some(input.into());
          91  +
        /* BuilderGenerator.kt:293 */
   58     92   
        self
          93  +
        /* BuilderGenerator.kt:291 */
   59     94   
    }
   60         -
    /// A detailed description of the validation failure.
          95  +
    /// /* BuilderGenerator.kt:312 */A detailed description of the validation failure.
          96  +
    /* BuilderGenerator.kt:314 */
   61     97   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          98  +
        /* BuilderGenerator.kt:315 */
   62     99   
        self.message = input;
   63    100   
        self
         101  +
        /* BuilderGenerator.kt:314 */
   64    102   
    }
   65         -
    /// A detailed description of the validation failure.
         103  +
    /// /* BuilderGenerator.kt:334 */A detailed description of the validation failure.
         104  +
    /* BuilderGenerator.kt:336 */
   66    105   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         106  +
        /* BuilderGenerator.kt:337 */
   67    107   
        &self.message
         108  +
        /* BuilderGenerator.kt:336 */
   68    109   
    }
   69         -
    /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::types::ValidationExceptionField).
   70         -
    /// This method will fail if any of the following fields are not set:
   71         -
    /// - [`path`](crate::types::builders::ValidationExceptionFieldBuilder::path)
   72         -
    /// - [`message`](crate::types::builders::ValidationExceptionFieldBuilder::message)
         110  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::types::ValidationExceptionField).
         111  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         112  +
    /// /* BuilderGenerator.kt:246 */- [`path`](crate::types::builders::ValidationExceptionFieldBuilder::path)
         113  +
    /// /* BuilderGenerator.kt:246 */- [`message`](crate::types::builders::ValidationExceptionFieldBuilder::message)
         114  +
    /* BuilderGenerator.kt:253 */
   73    115   
    pub fn build(self) -> ::std::result::Result<crate::types::ValidationExceptionField, ::aws_smithy_types::error::operation::BuildError> {
   74         -
        ::std::result::Result::Ok(crate::types::ValidationExceptionField {
   75         -
            path: self.path.ok_or_else(|| {
   76         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   77         -
                    "path",
   78         -
                    "path was not specified but it is required when building ValidationExceptionField",
   79         -
                )
   80         -
            })?,
   81         -
            message: self.message.ok_or_else(|| {
   82         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   83         -
                    "message",
   84         -
                    "message was not specified but it is required when building ValidationExceptionField",
   85         -
                )
   86         -
            })?,
   87         -
        })
         116  +
        /* BuilderGenerator.kt:254 */
         117  +
        ::std::result::Result::Ok(
         118  +
            /* BuilderGenerator.kt:477 */crate::types::ValidationExceptionField {
         119  +
                /* BuilderGenerator.kt:481 */path: self.path
         120  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         121  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("path", "path was not specified but it is required when building ValidationExceptionField")
         122  +
                    /* BuilderGenerator.kt:494 */)?
         123  +
                ,
         124  +
                /* BuilderGenerator.kt:481 */message: self.message
         125  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         126  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("message", "message was not specified but it is required when building ValidationExceptionField")
         127  +
                    /* BuilderGenerator.kt:494 */)?
         128  +
                ,
         129  +
            /* BuilderGenerator.kt:477 */}
         130  +
        /* BuilderGenerator.kt:254 */)
         131  +
        /* BuilderGenerator.kt:253 */
   88    132   
    }
         133  +
    /* BuilderGenerator.kt:355 */
   89    134   
}

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

@@ -1,1 +8,12 @@
    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::_validation_exception_field::ValidationExceptionFieldBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_inner_shape::InnerShapeBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_innermost_shape::InnermostShapeBuilder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_empty_structure::EmptyStructureBuilder;

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

@@ -1,1 +7,9 @@
    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::_validation_exception::ValidationError;
    3      4   
           5  +
/* RustModule.kt:172 */
    4      6   
mod _validation_exception;
    5      7   
    6         -
/// Builders
           8  +
/// /* CodegenDelegator.kt:51 */Builders
    7      9   
pub mod builders;

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

@@ -1,1 +119,184 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           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 ValidationError {
    7         -
    /// A summary of the validation failure.
           8  +
pub /* StructureGenerator.kt:201 */ struct ValidationError {
           9  +
    /// /* StructureGenerator.kt:231 */A summary of the validation failure.
    8     10   
    pub message: ::std::string::String,
    9         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          11  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   10     12   
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::types::ValidationExceptionField>>,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* StructureGenerator.kt:201 */
   12     15   
}
          16  +
/* StructureGenerator.kt:135 */
   13     17   
impl ValidationError {
   14         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   15         -
    ///
   16         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.field_list.is_none()`.
          18  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          19  +
    /// /* StructureGenerator.kt:162 */
          20  +
    /// /* 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 `.field_list.is_none()`.
          21  +
    /* StructureGenerator.kt:166 */
   17     22   
    pub fn field_list(&self) -> &[crate::types::ValidationExceptionField] {
   18         -
        self.field_list.as_deref().unwrap_or_default()
          23  +
        /* StructureGenerator.kt:169 */
          24  +
        self.field_list
          25  +
            .as_deref()
          26  +
            /* StructureGenerator.kt:175 */
          27  +
            .unwrap_or_default()
          28  +
        /* StructureGenerator.kt:166 */
   19     29   
    }
          30  +
    /* StructureGenerator.kt:135 */
   20     31   
}
          32  +
/* ErrorImplGenerator.kt:99 */
   21     33   
impl ValidationError {
          34  +
    /* ErrorImplGenerator.kt:128 */
   22     35   
    /// Returns the error message.
   23     36   
    pub fn message(&self) -> &str {
   24     37   
        &self.message
   25     38   
    }
          39  +
    /* ErrorImplGenerator.kt:99 */
   26     40   
}
          41  +
/* ErrorImplGenerator.kt:153 */
   27     42   
impl ::std::fmt::Display for ValidationError {
          43  +
    /* ErrorImplGenerator.kt:154 */
   28     44   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          45  +
        /* ErrorImplGenerator.kt:161 */
   29     46   
        ::std::write!(f, "ValidationError [ValidationException]")?;
          47  +
        /* ErrorImplGenerator.kt:166 */
   30     48   
        {
          49  +
            /* ErrorImplGenerator.kt:167 */
   31     50   
            ::std::write!(f, ": {}", &self.message)?;
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for ValidationError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ValidationError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl ValidationError {
   43         -
    /// Creates a new builder-style object to manufacture [`ValidationError`](crate::types::error::ValidationError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ValidationError`](crate::types::error::ValidationError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::ValidationErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::ValidationErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`ValidationError`](crate::types::error::ValidationError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`ValidationError`](crate::types::error::ValidationError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct ValidationErrorBuilder {
   53         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) field_list: ::std::option::Option<::std::vec::Vec<crate::types::ValidationExceptionField>>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) field_list: ::std::option::Option<::std::vec::Vec<crate::types::ValidationExceptionField>>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl ValidationErrorBuilder {
   58         -
    /// A summary of the validation failure.
   59         -
    /// This field is required.
          95  +
    /// /* BuilderGenerator.kt:286 */A summary of the validation failure.
          96  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          97  +
    /* BuilderGenerator.kt:291 */
   60     98   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:292 */
   61    100   
        self.message = ::std::option::Option::Some(input.into());
         101  +
        /* BuilderGenerator.kt:293 */
   62    102   
        self
         103  +
        /* BuilderGenerator.kt:291 */
   63    104   
    }
   64         -
    /// A summary of the validation failure.
         105  +
    /// /* BuilderGenerator.kt:312 */A summary of the validation failure.
         106  +
    /* BuilderGenerator.kt:314 */
   65    107   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         108  +
        /* BuilderGenerator.kt:315 */
   66    109   
        self.message = input;
   67    110   
        self
         111  +
        /* BuilderGenerator.kt:314 */
   68    112   
    }
   69         -
    /// A summary of the validation failure.
         113  +
    /// /* BuilderGenerator.kt:334 */A summary of the validation failure.
         114  +
    /* BuilderGenerator.kt:336 */
   70    115   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         116  +
        /* BuilderGenerator.kt:337 */
   71    117   
        &self.message
         118  +
        /* BuilderGenerator.kt:336 */
   72    119   
    }
   73         -
    /// Appends an item to `field_list`.
         120  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `field_list`.
         121  +
    /* BuilderGenerator.kt:411 */
   74    122   
    ///
   75         -
    /// To override the contents of this collection use [`set_field_list`](Self::set_field_list).
         123  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_field_list`](Self::set_field_list).
         124  +
    /* BuilderGenerator.kt:413 */
   76    125   
    ///
   77         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         126  +
    /// /* BuilderGenerator.kt:414 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         127  +
    /* BuilderGenerator.kt:418 */
   78    128   
    pub fn field_list(mut self, input: crate::types::ValidationExceptionField) -> Self {
         129  +
        /* BuilderGenerator.kt:419 */
   79    130   
        let mut v = self.field_list.unwrap_or_default();
   80    131   
        v.push(input);
   81    132   
        self.field_list = ::std::option::Option::Some(v);
   82    133   
        self
         134  +
        /* BuilderGenerator.kt:418 */
   83    135   
    }
   84         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         136  +
    /// /* BuilderGenerator.kt:312 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         137  +
    /* BuilderGenerator.kt:314 */
   85    138   
    pub fn set_field_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ValidationExceptionField>>) -> Self {
         139  +
        /* BuilderGenerator.kt:315 */
   86    140   
        self.field_list = input;
   87    141   
        self
         142  +
        /* BuilderGenerator.kt:314 */
   88    143   
    }
   89         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         144  +
    /// /* BuilderGenerator.kt:334 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         145  +
    /* BuilderGenerator.kt:336 */
   90    146   
    pub fn get_field_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ValidationExceptionField>> {
         147  +
        /* BuilderGenerator.kt:337 */
   91    148   
        &self.field_list
         149  +
        /* BuilderGenerator.kt:336 */
   92    150   
    }
         151  +
    /* ErrorGenerator.kt:101 */
   93    152   
    /// Sets error metadata
   94    153   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   95    154   
        self.meta = Some(meta);
   96    155   
        self
   97    156   
    }
   98    157   
   99    158   
    /// Sets error metadata
  100    159   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
  101    160   
        self.meta = meta;
  102    161   
        self
  103    162   
    }
  104         -
    /// Consumes the builder and constructs a [`ValidationError`](crate::types::error::ValidationError).
  105         -
    /// This method will fail if any of the following fields are not set:
  106         -
    /// - [`message`](crate::types::error::builders::ValidationErrorBuilder::message)
         163  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ValidationError`](crate::types::error::ValidationError).
         164  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         165  +
    /// /* BuilderGenerator.kt:246 */- [`message`](crate::types::error::builders::ValidationErrorBuilder::message)
         166  +
    /* BuilderGenerator.kt:253 */
  107    167   
    pub fn build(self) -> ::std::result::Result<crate::types::error::ValidationError, ::aws_smithy_types::error::operation::BuildError> {
  108         -
        ::std::result::Result::Ok(crate::types::error::ValidationError {
  109         -
            message: self.message.ok_or_else(|| {
  110         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  111         -
                    "message",
  112         -
                    "message was not specified but it is required when building ValidationError",
  113         -
                )
  114         -
            })?,
  115         -
            field_list: self.field_list,
  116         -
            meta: self.meta.unwrap_or_default(),
  117         -
        })
         168  +
        /* BuilderGenerator.kt:254 */
         169  +
        ::std::result::Result::Ok(
         170  +
            /* BuilderGenerator.kt:477 */crate::types::error::ValidationError {
         171  +
                /* BuilderGenerator.kt:481 */message: self.message
         172  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         173  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("message", "message was not specified but it is required when building ValidationError")
         174  +
                    /* BuilderGenerator.kt:494 */)?
         175  +
                ,
         176  +
                /* BuilderGenerator.kt:481 */field_list: self.field_list
         177  +
                ,
         178  +
                /* ErrorGenerator.kt:120 */meta: self.meta.unwrap_or_default(),
         179  +
            /* BuilderGenerator.kt:477 */}
         180  +
        /* BuilderGenerator.kt:254 */)
         181  +
        /* BuilderGenerator.kt:253 */
  118    182   
    }
         183  +
    /* BuilderGenerator.kt:355 */
  119    184   
}