Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_capturing_event.rs

@@ -1,1 +10,17 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:240 */
    2      3   
pub fn ser_payload_payload(
    3      4   
    input: &crate::types::CapturingPayload,
    4      5   
) -> std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:245 */
    5      7   
    let mut out = String::new();
           8  +
    /* JsonSerializerGenerator.kt:246 */
    6      9   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
          10  +
    /* JsonSerializerGenerator.kt:375 */
    7     11   
    crate::protocol_serde::shape_capturing_payload::ser_capturing_payload(&mut object, input)?;
          12  +
    /* JsonSerializerGenerator.kt:252 */
    8     13   
    object.finish();
          14  +
    /* JsonSerializerGenerator.kt:253 */
    9     15   
    Ok(out.into_bytes())
          16  +
    /* JsonSerializerGenerator.kt:240 */
   10     17   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_capturing_payload.rs

@@ -1,1 +13,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_capturing_payload(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::types::CapturingPayload,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.name {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("name").string(var_1.as_str());
          11  +
        /* JsonSerializerGenerator.kt:382 */
    8     12   
    }
          13  +
    /* JsonSerializerGenerator.kt:382 */
    9     14   
    if let Some(var_2) = &input.pokeball {
          15  +
        /* JsonSerializerGenerator.kt:423 */
   10     16   
        object.key("pokeball").string(var_2.as_str());
          17  +
        /* JsonSerializerGenerator.kt:382 */
   11     18   
    }
          19  +
    /* JsonSerializerGenerator.kt:372 */
   12     20   
    Ok(())
          21  +
    /* JsonSerializerGenerator.kt:358 */
   13     22   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_check_health.rs

@@ -1,1 +32,50 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_check_health_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::check_health::CheckHealthOutput, crate::operation::check_health::CheckHealthError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::check_health::CheckHealthError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::check_health::CheckHealthError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_check_health_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::check_health::CheckHealthOutput, crate::operation::check_health::CheckHealthError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::check_health::builders::CheckHealthOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}
   27     42   
          43  +
/* AwsJson.kt:152 */
   28     44   
pub fn ser_check_health_input(
   29     45   
    _input: &crate::operation::check_health::CheckHealthInput,
   30     46   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* AwsJson.kt:156 */
   31     48   
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
          49  +
    /* AwsJson.kt:152 */
   32     50   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_do_nothing.rs

@@ -1,1 +32,50 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_do_nothing_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::do_nothing::DoNothingOutput, crate::operation::do_nothing::DoNothingError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::do_nothing::DoNothingError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::do_nothing::DoNothingError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_do_nothing_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::do_nothing::DoNothingOutput, crate::operation::do_nothing::DoNothingError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::do_nothing::builders::DoNothingOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}
   27     42   
          43  +
/* AwsJson.kt:152 */
   28     44   
pub fn ser_do_nothing_input(
   29     45   
    _input: &crate::operation::do_nothing::DoNothingInput,
   30     46   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* AwsJson.kt:156 */
   31     48   
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
          49  +
    /* AwsJson.kt:152 */
   32     50   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_get_server_statistics.rs

@@ -1,1 +81,120 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_get_server_statistics_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<
    8     10   
    crate::operation::get_server_statistics::GetServerStatisticsOutput,
    9     11   
    crate::operation::get_server_statistics::GetServerStatisticsError,
   10     12   
> {
          13  +
    /* RustType.kt:516 */
   11     14   
    #[allow(unused_mut)]
          15  +
    /* ProtocolParserGenerator.kt:106 */
   12     16   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13     17   
        .map_err(crate::operation::get_server_statistics::GetServerStatisticsError::unhandled)?;
          18  +
    /* ProtocolParserGenerator.kt:120 */
   14     19   
    let generic = generic_builder.build();
          20  +
    /* ProtocolParserGenerator.kt:185 */
   15     21   
    Err(crate::operation::get_server_statistics::GetServerStatisticsError::generic(generic))
          22  +
    /* ProtocolParserGenerator.kt:99 */
   16     23   
}
   17     24   
          25  +
/* RustType.kt:516 */
   18     26   
#[allow(clippy::unnecessary_wraps)]
          27  +
/* ProtocolParserGenerator.kt:71 */
   19     28   
pub fn de_get_server_statistics_http_response(
   20     29   
    _response_status: u16,
   21     30   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22     31   
    _response_body: &[u8],
   23     32   
) -> std::result::Result<
   24     33   
    crate::operation::get_server_statistics::GetServerStatisticsOutput,
   25     34   
    crate::operation::get_server_statistics::GetServerStatisticsError,
   26     35   
> {
          36  +
    /* ProtocolParserGenerator.kt:77 */
   27     37   
    Ok({
          38  +
        /* RustType.kt:516 */
   28     39   
        #[allow(unused_mut)]
          40  +
        /* ProtocolParserGenerator.kt:240 */
   29     41   
        let mut output = crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder::default();
          42  +
        /* ProtocolParserGenerator.kt:247 */
   30     43   
        output = crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics(_response_body, output)
   31     44   
            .map_err(crate::operation::get_server_statistics::GetServerStatisticsError::unhandled)?;
          45  +
        /* ClientBuilderInstantiator.kt:46 */
   32     46   
        crate::serde_util::get_server_statistics_output_output_correct_errors(output)
   33     47   
            .build()
   34     48   
            .map_err(crate::operation::get_server_statistics::GetServerStatisticsError::unhandled)?
          49  +
        /* ProtocolParserGenerator.kt:77 */
   35     50   
    })
          51  +
    /* ProtocolParserGenerator.kt:71 */
   36     52   
}
   37     53   
          54  +
/* AwsJson.kt:152 */
   38     55   
pub fn ser_get_server_statistics_input(
   39     56   
    _input: &crate::operation::get_server_statistics::GetServerStatisticsInput,
   40     57   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          58  +
    /* AwsJson.kt:156 */
   41     59   
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
          60  +
    /* AwsJson.kt:152 */
   42     61   
}
   43     62   
          63  +
/* JsonParserGenerator.kt:148 */
   44     64   
pub(crate) fn de_get_server_statistics(
   45     65   
    value: &[u8],
   46     66   
    mut builder: crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder,
   47     67   
) -> ::std::result::Result<
   48     68   
    crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder,
   49     69   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   50     70   
> {
          71  +
    /* JsonParserGenerator.kt:153 */
   51     72   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
   52     73   
    let tokens = &mut tokens_owned;
   53     74   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          75  +
    /* JsonParserGenerator.kt:684 */
   54     76   
    loop {
          77  +
        /* JsonParserGenerator.kt:685 */
   55     78   
        match tokens.next().transpose()? {
   56         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   57         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   58         -
                "calls_count" => {
   59         -
                    builder = builder.set_calls_count(
   60         -
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   61         -
                            .map(i64::try_from)
   62         -
                            .transpose()?,
   63         -
                    );
          79  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          80  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          81  +
                /* JsonParserGenerator.kt:260 */
          82  +
                match key.to_unescaped()?.as_ref() {
          83  +
                    /* JsonParserGenerator.kt:262 */
          84  +
                    "calls_count" => {
          85  +
                        /* JsonParserGenerator.kt:265 */
          86  +
                        builder = builder.set_calls_count(
          87  +
                            /* JsonParserGenerator.kt:365 */
          88  +
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          89  +
                                .map(i64::try_from)
          90  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          91  +
                        );
          92  +
                        /* JsonParserGenerator.kt:262 */
          93  +
                    }
          94  +
                    /* JsonParserGenerator.kt:290 */
          95  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   64     96   
                }
   65         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   66         -
            },
          97  +
                /* JsonParserGenerator.kt:686 */
          98  +
            }
          99  +
            /* JsonParserGenerator.kt:695 */
   67    100   
            other => {
   68    101   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   69    102   
                    "expected object key or end object, found: {:?}",
   70    103   
                    other
   71    104   
                )))
   72         -
            }
         105  +
            } /* JsonParserGenerator.kt:685 */
   73    106   
        }
         107  +
        /* JsonParserGenerator.kt:684 */
   74    108   
    }
         109  +
    /* JsonParserGenerator.kt:250 */
   75    110   
    if tokens.next().is_some() {
         111  +
        /* JsonParserGenerator.kt:251 */
   76    112   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77    113   
            "found more JSON tokens after completing parsing",
   78    114   
        ));
         115  +
        /* JsonParserGenerator.kt:250 */
   79    116   
    }
         117  +
    /* JsonParserGenerator.kt:163 */
   80    118   
    Ok(builder)
         119  +
    /* JsonParserGenerator.kt:148 */
   81    120   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_invalid_pokeball_error.rs

@@ -1,1 +43,73 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:148 */
    2      3   
pub(crate) fn de_invalid_pokeball_error_json_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::InvalidPokeballErrorBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::InvalidPokeballErrorBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    /* JsonParserGenerator.kt:153 */
    6      8   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
    7      9   
    let tokens = &mut tokens_owned;
    8     10   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          11  +
    /* JsonParserGenerator.kt:684 */
    9     12   
    loop {
          13  +
        /* JsonParserGenerator.kt:685 */
   10     14   
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "pokeball" => {
   14         -
                    builder = builder.set_pokeball(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
          15  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          16  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          17  +
                /* JsonParserGenerator.kt:260 */
          18  +
                match key.to_unescaped()?.as_ref() {
          19  +
                    /* JsonParserGenerator.kt:262 */
          20  +
                    "pokeball" => {
          21  +
                        /* JsonParserGenerator.kt:265 */
          22  +
                        builder = builder.set_pokeball(
          23  +
                            /* JsonParserGenerator.kt:354 */
          24  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          25  +
                                .map(|s|
          26  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          27  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          28  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          29  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          30  +
                        );
          31  +
                        /* JsonParserGenerator.kt:262 */
          32  +
                    }
          33  +
                    /* JsonParserGenerator.kt:262 */
          34  +
                    "Message" => {
          35  +
                        /* JsonParserGenerator.kt:265 */
          36  +
                        builder = builder.set_message(
          37  +
                            /* JsonParserGenerator.kt:354 */
          38  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          39  +
                                .map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          43  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          44  +
                        );
          45  +
                        /* JsonParserGenerator.kt:262 */
          46  +
                    }
          47  +
                    /* JsonParserGenerator.kt:290 */
          48  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   19     49   
                }
   20         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
          50  +
                /* JsonParserGenerator.kt:686 */
          51  +
            }
          52  +
            /* JsonParserGenerator.kt:695 */
   29     53   
            other => {
   30     54   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31     55   
                    "expected object key or end object, found: {:?}",
   32     56   
                    other
   33     57   
                )))
   34         -
            }
          58  +
            } /* JsonParserGenerator.kt:685 */
   35     59   
        }
          60  +
        /* JsonParserGenerator.kt:684 */
   36     61   
    }
          62  +
    /* JsonParserGenerator.kt:250 */
   37     63   
    if tokens.next().is_some() {
          64  +
        /* JsonParserGenerator.kt:251 */
   38     65   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     66   
            "found more JSON tokens after completing parsing",
   40     67   
        ));
          68  +
        /* JsonParserGenerator.kt:250 */
   41     69   
    }
          70  +
    /* JsonParserGenerator.kt:163 */
   42     71   
    Ok(builder)
          72  +
    /* JsonParserGenerator.kt:148 */
   43     73   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_master_ball_unsuccessful.rs

@@ -1,1 +56,90 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_master_ball_unsuccessful_error(
    3      4   
    value: &crate::types::error::MasterBallUnsuccessful,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_master_ball_unsuccessful::ser_master_ball_unsuccessful(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonParserGenerator.kt:148 */
   12     18   
pub(crate) fn de_master_ball_unsuccessful_json_err(
   13     19   
    value: &[u8],
   14     20   
    mut builder: crate::types::error::builders::MasterBallUnsuccessfulBuilder,
   15     21   
) -> ::std::result::Result<crate::types::error::builders::MasterBallUnsuccessfulBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
          22  +
    /* JsonParserGenerator.kt:153 */
   16     23   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
   17     24   
    let tokens = &mut tokens_owned;
   18     25   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          26  +
    /* JsonParserGenerator.kt:684 */
   19     27   
    loop {
          28  +
        /* JsonParserGenerator.kt:685 */
   20     29   
        match tokens.next().transpose()? {
   21         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   22         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   23         -
                "message" => {
   24         -
                    builder = builder.set_message(
   25         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   26         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   27         -
                            .transpose()?,
   28         -
                    );
          30  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          31  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          32  +
                /* JsonParserGenerator.kt:260 */
          33  +
                match key.to_unescaped()?.as_ref() {
          34  +
                    /* JsonParserGenerator.kt:262 */
          35  +
                    "message" => {
          36  +
                        /* JsonParserGenerator.kt:265 */
          37  +
                        builder = builder.set_message(
          38  +
                            /* JsonParserGenerator.kt:354 */
          39  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          40  +
                                .map(|s|
          41  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          42  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          43  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          44  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          45  +
                        );
          46  +
                        /* JsonParserGenerator.kt:262 */
          47  +
                    }
          48  +
                    /* JsonParserGenerator.kt:290 */
          49  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   29     50   
                }
   30         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   31         -
            },
          51  +
                /* JsonParserGenerator.kt:686 */
          52  +
            }
          53  +
            /* JsonParserGenerator.kt:695 */
   32     54   
            other => {
   33     55   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   34     56   
                    "expected object key or end object, found: {:?}",
   35     57   
                    other
   36     58   
                )))
   37         -
            }
          59  +
            } /* JsonParserGenerator.kt:685 */
   38     60   
        }
          61  +
        /* JsonParserGenerator.kt:684 */
   39     62   
    }
          63  +
    /* JsonParserGenerator.kt:250 */
   40     64   
    if tokens.next().is_some() {
          65  +
        /* JsonParserGenerator.kt:251 */
   41     66   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   42     67   
            "found more JSON tokens after completing parsing",
   43     68   
        ));
          69  +
        /* JsonParserGenerator.kt:250 */
   44     70   
    }
          71  +
    /* JsonParserGenerator.kt:163 */
   45     72   
    Ok(builder)
          73  +
    /* JsonParserGenerator.kt:148 */
   46     74   
}
   47     75   
          76  +
/* JsonSerializerGenerator.kt:358 */
   48     77   
pub fn ser_master_ball_unsuccessful(
   49     78   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   50     79   
    input: &crate::types::error::MasterBallUnsuccessful,
   51     80   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          81  +
    /* JsonSerializerGenerator.kt:382 */
   52     82   
    if let Some(var_1) = &input.message {
          83  +
        /* JsonSerializerGenerator.kt:423 */
   53     84   
        object.key("message").string(var_1.as_str());
          85  +
        /* JsonSerializerGenerator.kt:382 */
   54     86   
    }
          87  +
    /* JsonSerializerGenerator.kt:372 */
   55     88   
    Ok(())
          89  +
    /* JsonSerializerGenerator.kt:358 */
   56     90   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_throttling_error.rs

@@ -1,1 +36,59 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:148 */
    2      3   
pub(crate) fn de_throttling_error_json_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::ThrottlingErrorBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::ThrottlingErrorBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    /* JsonParserGenerator.kt:153 */
    6      8   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
    7      9   
    let tokens = &mut tokens_owned;
    8     10   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          11  +
    /* JsonParserGenerator.kt:684 */
    9     12   
    loop {
          13  +
        /* JsonParserGenerator.kt:685 */
   10     14   
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "Message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
          15  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          16  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          17  +
                /* JsonParserGenerator.kt:260 */
          18  +
                match key.to_unescaped()?.as_ref() {
          19  +
                    /* JsonParserGenerator.kt:262 */
          20  +
                    "Message" => {
          21  +
                        /* JsonParserGenerator.kt:265 */
          22  +
                        builder = builder.set_message(
          23  +
                            /* JsonParserGenerator.kt:354 */
          24  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          25  +
                                .map(|s|
          26  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          27  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          28  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          29  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          30  +
                        );
          31  +
                        /* JsonParserGenerator.kt:262 */
          32  +
                    }
          33  +
                    /* JsonParserGenerator.kt:290 */
          34  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   19     35   
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
          36  +
                /* JsonParserGenerator.kt:686 */
          37  +
            }
          38  +
            /* JsonParserGenerator.kt:695 */
   22     39   
            other => {
   23     40   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24     41   
                    "expected object key or end object, found: {:?}",
   25     42   
                    other
   26     43   
                )))
   27         -
            }
          44  +
            } /* JsonParserGenerator.kt:685 */
   28     45   
        }
          46  +
        /* JsonParserGenerator.kt:684 */
   29     47   
    }
          48  +
    /* JsonParserGenerator.kt:250 */
   30     49   
    if tokens.next().is_some() {
          50  +
        /* JsonParserGenerator.kt:251 */
   31     51   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32     52   
            "found more JSON tokens after completing parsing",
   33     53   
        ));
          54  +
        /* JsonParserGenerator.kt:250 */
   34     55   
    }
          56  +
    /* JsonParserGenerator.kt:163 */
   35     57   
    Ok(builder)
          58  +
    /* JsonParserGenerator.kt:148 */
   36     59   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_unsupported_region_error.rs

@@ -1,1 +43,73 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:148 */
    2      3   
pub(crate) fn de_unsupported_region_error_json_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::UnsupportedRegionErrorBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::UnsupportedRegionErrorBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    /* JsonParserGenerator.kt:153 */
    6      8   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
    7      9   
    let tokens = &mut tokens_owned;
    8     10   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          11  +
    /* JsonParserGenerator.kt:684 */
    9     12   
    loop {
          13  +
        /* JsonParserGenerator.kt:685 */
   10     14   
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "region" => {
   14         -
                    builder = builder.set_region(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
          15  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          16  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          17  +
                /* JsonParserGenerator.kt:260 */
          18  +
                match key.to_unescaped()?.as_ref() {
          19  +
                    /* JsonParserGenerator.kt:262 */
          20  +
                    "region" => {
          21  +
                        /* JsonParserGenerator.kt:265 */
          22  +
                        builder = builder.set_region(
          23  +
                            /* JsonParserGenerator.kt:354 */
          24  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          25  +
                                .map(|s|
          26  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          27  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          28  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          29  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          30  +
                        );
          31  +
                        /* JsonParserGenerator.kt:262 */
          32  +
                    }
          33  +
                    /* JsonParserGenerator.kt:262 */
          34  +
                    "Message" => {
          35  +
                        /* JsonParserGenerator.kt:265 */
          36  +
                        builder = builder.set_message(
          37  +
                            /* JsonParserGenerator.kt:354 */
          38  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          39  +
                                .map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          43  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          44  +
                        );
          45  +
                        /* JsonParserGenerator.kt:262 */
          46  +
                    }
          47  +
                    /* JsonParserGenerator.kt:290 */
          48  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   19     49   
                }
   20         -
                "Message" => {
   21         -
                    builder = builder.set_message(
   22         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   23         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   24         -
                            .transpose()?,
   25         -
                    );
   26         -
                }
   27         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   28         -
            },
          50  +
                /* JsonParserGenerator.kt:686 */
          51  +
            }
          52  +
            /* JsonParserGenerator.kt:695 */
   29     53   
            other => {
   30     54   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   31     55   
                    "expected object key or end object, found: {:?}",
   32     56   
                    other
   33     57   
                )))
   34         -
            }
          58  +
            } /* JsonParserGenerator.kt:685 */
   35     59   
        }
          60  +
        /* JsonParserGenerator.kt:684 */
   36     61   
    }
          62  +
    /* JsonParserGenerator.kt:250 */
   37     63   
    if tokens.next().is_some() {
          64  +
        /* JsonParserGenerator.kt:251 */
   38     65   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     66   
            "found more JSON tokens after completing parsing",
   40     67   
        ));
          68  +
        /* JsonParserGenerator.kt:250 */
   41     69   
    }
          70  +
    /* JsonParserGenerator.kt:163 */
   42     71   
    Ok(builder)
          72  +
    /* JsonParserGenerator.kt:148 */
   43     73   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_validation_exception.rs

@@ -1,1 +40,67 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:148 */
    2      3   
pub(crate) fn de_validation_exception_json_err(
    3      4   
    value: &[u8],
    4      5   
    mut builder: crate::types::error::builders::ValidationErrorBuilder,
    5      6   
) -> ::std::result::Result<crate::types::error::builders::ValidationErrorBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
           7  +
    /* JsonParserGenerator.kt:153 */
    6      8   
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
    7      9   
    let tokens = &mut tokens_owned;
    8     10   
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          11  +
    /* JsonParserGenerator.kt:684 */
    9     12   
    loop {
          13  +
        /* JsonParserGenerator.kt:685 */
   10     14   
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
          15  +
            /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          16  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          17  +
                /* JsonParserGenerator.kt:260 */
          18  +
                match key.to_unescaped()?.as_ref() {
          19  +
                    /* JsonParserGenerator.kt:262 */
          20  +
                    "message" => {
          21  +
                        /* JsonParserGenerator.kt:265 */
          22  +
                        builder = builder.set_message(
          23  +
                            /* JsonParserGenerator.kt:354 */
          24  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          25  +
                                .map(|s|
          26  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          27  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          28  +
                                /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          29  +
                                .transpose()?, /* JsonParserGenerator.kt:265 */
          30  +
                        );
          31  +
                        /* JsonParserGenerator.kt:262 */
          32  +
                    }
          33  +
                    /* JsonParserGenerator.kt:262 */
          34  +
                    "fieldList" => {
          35  +
                        /* JsonParserGenerator.kt:265 */
          36  +
                        builder = builder.set_field_list(
          37  +
                            /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_validation_exception_field_list::de_validation_exception_field_list(tokens)?
          38  +
                        /* JsonParserGenerator.kt:265 */);
          39  +
                        /* JsonParserGenerator.kt:262 */
          40  +
                    }
          41  +
                    /* JsonParserGenerator.kt:290 */
          42  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   19     43   
                }
   20         -
                "fieldList" => {
   21         -
                    builder = builder
   22         -
                        .set_field_list(crate::protocol_serde::shape_validation_exception_field_list::de_validation_exception_field_list(tokens)?);
   23         -
                }
   24         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   25         -
            },
          44  +
                /* JsonParserGenerator.kt:686 */
          45  +
            }
          46  +
            /* JsonParserGenerator.kt:695 */
   26     47   
            other => {
   27     48   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28     49   
                    "expected object key or end object, found: {:?}",
   29     50   
                    other
   30     51   
                )))
   31         -
            }
          52  +
            } /* JsonParserGenerator.kt:685 */
   32     53   
        }
          54  +
        /* JsonParserGenerator.kt:684 */
   33     55   
    }
          56  +
    /* JsonParserGenerator.kt:250 */
   34     57   
    if tokens.next().is_some() {
          58  +
        /* JsonParserGenerator.kt:251 */
   35     59   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     60   
            "found more JSON tokens after completing parsing",
   37     61   
        ));
          62  +
        /* JsonParserGenerator.kt:250 */
   38     63   
    }
          64  +
    /* JsonParserGenerator.kt:163 */
   39     65   
    Ok(builder)
          66  +
    /* JsonParserGenerator.kt:148 */
   40     67   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/protocol_serde/shape_validation_exception_field.rs

@@ -1,1 +51,86 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_validation_exception_field<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<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::StartObject { .. }) => {
          13  +
            /* RustType.kt:516 */
   11     14   
            #[allow(unused_mut)]
          15  +
            /* JsonParserGenerator.kt:526 */
   12     16   
            let mut builder = crate::types::builders::ValidationExceptionFieldBuilder::default();
          17  +
            /* JsonParserGenerator.kt:684 */
   13     18   
            loop {
          19  +
                /* JsonParserGenerator.kt:685 */
   14     20   
                match tokens.next().transpose()? {
   15         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   16         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   17         -
                        "path" => {
   18         -
                            builder = builder.set_path(
   19         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                                    .transpose()?,
   22         -
                            );
          21  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          22  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          23  +
                        /* JsonParserGenerator.kt:260 */
          24  +
                        match key.to_unescaped()?.as_ref() {
          25  +
                            /* JsonParserGenerator.kt:262 */
          26  +
                            "path" => {
          27  +
                                /* JsonParserGenerator.kt:265 */
          28  +
                                builder = builder.set_path(
          29  +
                                    /* JsonParserGenerator.kt:354 */
          30  +
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          31  +
                                        .map(|s|
          32  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          33  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          34  +
                                        /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          35  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
          36  +
                                );
          37  +
                                /* JsonParserGenerator.kt:262 */
          38  +
                            }
          39  +
                            /* JsonParserGenerator.kt:262 */
          40  +
                            "message" => {
          41  +
                                /* JsonParserGenerator.kt:265 */
          42  +
                                builder = builder.set_message(
          43  +
                                    /* JsonParserGenerator.kt:354 */
          44  +
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          45  +
                                        .map(|s|
          46  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          47  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          48  +
                                        /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          49  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
          50  +
                                );
          51  +
                                /* JsonParserGenerator.kt:262 */
          52  +
                            }
          53  +
                            /* JsonParserGenerator.kt:290 */
          54  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   23     55   
                        }
   24         -
                        "message" => {
   25         -
                            builder = builder.set_message(
   26         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   27         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   28         -
                                    .transpose()?,
   29         -
                            );
   30         -
                        }
   31         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   32         -
                    },
          56  +
                        /* JsonParserGenerator.kt:686 */
          57  +
                    }
          58  +
                    /* JsonParserGenerator.kt:695 */
   33     59   
                    other => {
   34     60   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   35     61   
                            "expected object key or end object, found: {:?}",
   36     62   
                            other
   37     63   
                        )))
   38         -
                    }
          64  +
                    } /* JsonParserGenerator.kt:685 */
   39     65   
                }
          66  +
                /* JsonParserGenerator.kt:684 */
   40     67   
            }
          68  +
            /* JsonParserGenerator.kt:540 */
   41     69   
            Ok(Some(
   42     70   
                crate::serde_util::validation_exception_field_correct_errors(builder)
   43     71   
                    .build()
   44     72   
                    .map_err(|err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err))?,
   45     73   
            ))
          74  +
            /* JsonParserGenerator.kt:713 */
   46     75   
        }
   47         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
            "expected start object or null",
   49         -
        )),
          76  +
        /* JsonParserGenerator.kt:722 */
          77  +
        _ => {
          78  +
            /* JsonParserGenerator.kt:723 */
          79  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          80  +
                "expected start object or null",
          81  +
            ))
          82  +
            /* JsonParserGenerator.kt:722 */
          83  +
        } /* JsonParserGenerator.kt:712 */
   50     84   
    }
          85  +
    /* JsonParserGenerator.kt:516 */
   51     86   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/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/pokemon-service-awsjson-client/rust-client-codegen/src/serde_util.rs

@@ -1,1 +48,53 @@
    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 invalid_pokeball_error_correct_errors(
   12     14   
    mut builder: crate::types::error::builders::InvalidPokeballErrorBuilder,
   13     15   
) -> crate::types::error::builders::InvalidPokeballErrorBuilder {
   14     16   
    if builder.pokeball.is_none() {
   15     17   
        builder.pokeball = Some(Default::default())
   16     18   
    }
   17     19   
    builder
   18     20   
}
   19     21   
          22  +
/* ErrorCorrection.kt:126 */
   20     23   
pub(crate) fn unsupported_region_error_correct_errors(
   21     24   
    mut builder: crate::types::error::builders::UnsupportedRegionErrorBuilder,
   22     25   
) -> crate::types::error::builders::UnsupportedRegionErrorBuilder {
   23     26   
    if builder.region.is_none() {
   24     27   
        builder.region = Some(Default::default())
   25     28   
    }
   26     29   
    builder
   27     30   
}
   28     31   
          32  +
/* ErrorCorrection.kt:126 */
   29     33   
pub(crate) fn get_server_statistics_output_output_correct_errors(
   30     34   
    mut builder: crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder,
   31     35   
) -> crate::operation::get_server_statistics::builders::GetServerStatisticsOutputBuilder {
   32     36   
    if builder.calls_count.is_none() {
   33     37   
        builder.calls_count = Some(Default::default())
   34     38   
    }
   35     39   
    builder
   36     40   
}
   37     41   
          42  +
/* ErrorCorrection.kt:126 */
   38     43   
pub(crate) fn validation_exception_field_correct_errors(
   39     44   
    mut builder: crate::types::builders::ValidationExceptionFieldBuilder,
   40     45   
) -> crate::types::builders::ValidationExceptionFieldBuilder {
   41     46   
    if builder.path.is_none() {
   42     47   
        builder.path = Some(Default::default())
   43     48   
    }
   44     49   
    if builder.message.is_none() {
   45     50   
        builder.message = Some(Default::default())
   46     51   
    }
   47     52   
    builder

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/types.rs

@@ -1,1 +30,42 @@
    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::_capture_pokemon_events::CapturePokemonEvents;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_capture_event::CaptureEvent;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_attempt_capturing_pokemon_event::AttemptCapturingPokemonEvent;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_capturing_event::CapturingEvent;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_capturing_payload::CapturingPayload;
   13     19   
          20  +
/* RustModule.kt:172 */
   14     21   
mod _attempt_capturing_pokemon_event;
   15     22   
          23  +
/* RustModule.kt:172 */
   16     24   
mod _capture_event;
   17     25   
          26  +
/* RustModule.kt:172 */
   18     27   
mod _capture_pokemon_events;
   19     28   
          29  +
/* RustModule.kt:172 */
   20     30   
mod _capturing_event;
   21     31   
          32  +
/* RustModule.kt:172 */
   22     33   
mod _capturing_payload;
   23     34   
          35  +
/* RustModule.kt:172 */
   24     36   
mod _validation_exception_field;
   25     37   
   26         -
/// Builders
          38  +
/// /* CodegenDelegator.kt:51 */Builders
   27     39   
pub mod builders;
   28     40   
   29         -
/// Error types that Pokémon Service can respond with.
          41  +
/// /* ClientRustModule.kt:121 */Error types that Pokémon Service can respond with.
   30     42   
pub mod error;

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/types/_attempt_capturing_pokemon_event.rs

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

tmp-codegen-diff/codegen-client-test/pokemon-service-awsjson-client/rust-client-codegen/src/types/_capture_event.rs

@@ -1,1 +115,210 @@
    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 CaptureEvent {
           8  +
pub /* StructureGenerator.kt:201 */ struct CaptureEvent {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub name: ::std::option::Option<::std::string::String>,
    8         -
    #[allow(missing_docs)] // documentation missing in model
          12  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
    9     13   
    pub captured: ::std::option::Option<bool>,
   10         -
    #[allow(missing_docs)] // documentation missing in model
          14  +
    /* StructureGenerator.kt:231 */ #[allow(missing_docs)] // documentation missing in model
   11     15   
    pub shiny: ::std::option::Option<bool>,
          16  +
    /* StructureGenerator.kt:231 */
   12     17   
    #[allow(missing_docs)] // documentation missing in model
   13     18   
    pub pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
          19  +
    /* StructureGenerator.kt:201 */
   14     20   
}
          21  +
/* StructureGenerator.kt:135 */
   15     22   
impl CaptureEvent {
          23  +
    /* StructureGenerator.kt:231 */
   16     24   
    #[allow(missing_docs)] // documentation missing in model
          25  +
                           /* StructureGenerator.kt:166 */
   17     26   
    pub fn name(&self) -> ::std::option::Option<&str> {
          27  +
        /* StructureGenerator.kt:169 */
   18     28   
        self.name.as_deref()
          29  +
        /* StructureGenerator.kt:166 */
   19     30   
    }
          31  +
    /* StructureGenerator.kt:231 */
   20     32   
    #[allow(missing_docs)] // documentation missing in model
          33  +
                           /* StructureGenerator.kt:166 */
   21     34   
    pub fn captured(&self) -> ::std::option::Option<bool> {
          35  +
        /* StructureGenerator.kt:168 */
   22     36   
        self.captured
          37  +
        /* StructureGenerator.kt:166 */
   23     38   
    }
          39  +
    /* StructureGenerator.kt:231 */
   24     40   
    #[allow(missing_docs)] // documentation missing in model
          41  +
                           /* StructureGenerator.kt:166 */
   25     42   
    pub fn shiny(&self) -> ::std::option::Option<bool> {
          43  +
        /* StructureGenerator.kt:168 */
   26     44   
        self.shiny
          45  +
        /* StructureGenerator.kt:166 */
   27     46   
    }
          47  +
    /* StructureGenerator.kt:231 */
   28     48   
    #[allow(missing_docs)] // documentation missing in model
          49  +
                           /* StructureGenerator.kt:166 */
   29     50   
    pub fn pokedex_update(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
          51  +
        /* StructureGenerator.kt:170 */
   30     52   
        self.pokedex_update.as_ref()
          53  +
        /* StructureGenerator.kt:166 */
   31     54   
    }
          55  +
    /* StructureGenerator.kt:135 */
   32     56   
}
          57  +
/* ClientCodegenVisitor.kt:237 */
   33     58   
impl CaptureEvent {
   34         -
    /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::types::CaptureEvent).
          59  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CaptureEvent`](crate::types::CaptureEvent).
          60  +
    /* BuilderGenerator.kt:175 */
   35     61   
    pub fn builder() -> crate::types::builders::CaptureEventBuilder {
          62  +
        /* BuilderGenerator.kt:176 */
   36     63   
        crate::types::builders::CaptureEventBuilder::default()
          64  +
        /* BuilderGenerator.kt:175 */
   37     65   
    }
          66  +
    /* ClientCodegenVisitor.kt:237 */
   38     67   
}
   39     68   
   40         -
/// A builder for [`CaptureEvent`](crate::types::CaptureEvent).
          69  +
/// /* BuilderGenerator.kt:342 */A builder for [`CaptureEvent`](crate::types::CaptureEvent).
          70  +
/* RustType.kt:516 */
   41     71   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          72  +
/* RustType.kt:516 */
   42     73   
#[non_exhaustive]
          74  +
/* BuilderGenerator.kt:345 */
   43     75   
pub struct CaptureEventBuilder {
   44         -
    pub(crate) name: ::std::option::Option<::std::string::String>,
   45         -
    pub(crate) captured: ::std::option::Option<bool>,
   46         -
    pub(crate) shiny: ::std::option::Option<bool>,
          76  +
    /* BuilderGenerator.kt:275 */ pub(crate) name: ::std::option::Option<::std::string::String>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) captured: ::std::option::Option<bool>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) shiny: ::std::option::Option<bool>,
          79  +
    /* BuilderGenerator.kt:275 */
   47     80   
    pub(crate) pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
          81  +
    /* BuilderGenerator.kt:345 */
   48     82   
}
          83  +
/* BuilderGenerator.kt:355 */
   49     84   
impl CaptureEventBuilder {
          85  +
    /* BuilderGenerator.kt:286 */
   50     86   
    #[allow(missing_docs)] // documentation missing in model
          87  +
                           /* BuilderGenerator.kt:291 */
   51     88   
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          89  +
        /* BuilderGenerator.kt:292 */
   52     90   
        self.name = ::std::option::Option::Some(input.into());
          91  +
        /* BuilderGenerator.kt:293 */
   53     92   
        self
          93  +
        /* BuilderGenerator.kt:291 */
   54     94   
    }
          95  +
    /* BuilderGenerator.kt:312 */
   55     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:314 */
   56     98   
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:315 */
   57    100   
        self.name = input;
   58    101   
        self
         102  +
        /* BuilderGenerator.kt:314 */
   59    103   
    }
         104  +
    /* BuilderGenerator.kt:334 */
   60    105   
    #[allow(missing_docs)] // documentation missing in model
         106  +
                           /* BuilderGenerator.kt:336 */
   61    107   
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         108  +
        /* BuilderGenerator.kt:337 */
   62    109   
        &self.name
         110  +
        /* BuilderGenerator.kt:336 */
   63    111   
    }
         112  +
    /* BuilderGenerator.kt:286 */
   64    113   
    #[allow(missing_docs)] // documentation missing in model
         114  +
                           /* BuilderGenerator.kt:291 */
   65    115   
    pub fn captured(mut self, input: bool) -> Self {
         116  +
        /* BuilderGenerator.kt:292 */
   66    117   
        self.captured = ::std::option::Option::Some(input);
         118  +
        /* BuilderGenerator.kt:293 */
   67    119   
        self
         120  +
        /* BuilderGenerator.kt:291 */
   68    121   
    }
         122  +
    /* BuilderGenerator.kt:312 */
   69    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* BuilderGenerator.kt:314 */
   70    125   
    pub fn set_captured(mut self, input: ::std::option::Option<bool>) -> Self {
         126  +
        /* BuilderGenerator.kt:315 */
   71    127   
        self.captured = input;
   72    128   
        self
         129  +
        /* BuilderGenerator.kt:314 */
   73    130   
    }
         131  +
    /* BuilderGenerator.kt:334 */
   74    132   
    #[allow(missing_docs)] // documentation missing in model
         133  +
                           /* BuilderGenerator.kt:336 */
   75    134   
    pub fn get_captured(&self) -> &::std::option::Option<bool> {
         135  +
        /* BuilderGenerator.kt:337 */
   76    136   
        &self.captured
         137  +
        /* BuilderGenerator.kt:336 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:286 */
   78    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* BuilderGenerator.kt:291 */
   79    142   
    pub fn shiny(mut self, input: bool) -> Self {
         143  +
        /* BuilderGenerator.kt:292 */
   80    144   
        self.shiny = ::std::option::Option::Some(input);
         145  +
        /* BuilderGenerator.kt:293 */
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:291 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_shiny(mut self, input: ::std::option::Option<bool>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.shiny = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_shiny(&self) -> &::std::option::Option<bool> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.shiny
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
         166  +
    /* BuilderGenerator.kt:286 */
   92    167   
    #[allow(missing_docs)] // documentation missing in model
         168  +
                           /* BuilderGenerator.kt:291 */
   93    169   
    pub fn pokedex_update(mut self, input: ::aws_smithy_types::Blob) -> Self {
         170  +
        /* BuilderGenerator.kt:292 */
   94    171   
        self.pokedex_update = ::std::option::Option::Some(input);
         172  +
        /* BuilderGenerator.kt:293 */
   95    173   
        self
         174  +
        /* BuilderGenerator.kt:291 */
   96    175   
    }
         176  +
    /* BuilderGenerator.kt:312 */
   97    177   
    #[allow(missing_docs)] // documentation missing in model
         178  +
                           /* BuilderGenerator.kt:314 */
   98    179   
    pub fn set_pokedex_update(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
         180  +
        /* BuilderGenerator.kt:315 */
   99    181   
        self.pokedex_update = input;
  100    182   
        self
         183  +
        /* BuilderGenerator.kt:314 */
  101    184   
    }
         185  +
    /* BuilderGenerator.kt:334 */
  102    186   
    #[allow(missing_docs)] // documentation missing in model
         187  +
                           /* BuilderGenerator.kt:336 */
  103    188   
    pub fn get_pokedex_update(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
         189  +
        /* BuilderGenerator.kt:337 */
  104    190   
        &self.pokedex_update
         191  +
        /* BuilderGenerator.kt:336 */
  105    192   
    }
  106         -
    /// Consumes the builder and constructs a [`CaptureEvent`](crate::types::CaptureEvent).
         193  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CaptureEvent`](crate::types::CaptureEvent).
         194  +
    /* BuilderGenerator.kt:253 */
  107    195   
    pub fn build(self) -> crate::types::CaptureEvent {
         196  +
        /* BuilderGenerator.kt:477 */
  108    197   
        crate::types::CaptureEvent {
  109         -
            name: self.name,
         198  +
            /* BuilderGenerator.kt:481 */ name: self.name,
         199  +
            /* BuilderGenerator.kt:481 */
  110    200   
            captured: self.captured,
         201  +
            /* BuilderGenerator.kt:481 */
  111    202   
            shiny: self.shiny,
         203  +
            /* BuilderGenerator.kt:481 */
  112    204   
            pokedex_update: self.pokedex_update,
         205  +
            /* BuilderGenerator.kt:477 */
  113    206   
        }
         207  +
        /* BuilderGenerator.kt:253 */
  114    208   
    }
         209  +
    /* BuilderGenerator.kt:355 */
  115    210   
}