Client Test

Client Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_dialog_map.rs

@@ -0,1 +0,36 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_dialog_map<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          11  +
            let mut map = ::std::collections::HashMap::new();
          12  +
            loop {
          13  +
                match tokens.next().transpose()? {
          14  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          15  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          16  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          17  +
                        let value = crate::protocol_serde::shape_dialog::de_dialog(tokens)?;
          18  +
                        if let Some(value) = value {
          19  +
                            map.insert(key, value);
          20  +
                        }
          21  +
                    }
          22  +
                    other => {
          23  +
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          24  +
                            "expected object key or end object, found: {:?}",
          25  +
                            other
          26  +
                        )))
          27  +
                    }
          28  +
                }
          29  +
            }
          30  +
            Ok(Some(map))
          31  +
        }
          32  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          33  +
            "expected start object or null",
          34  +
        )),
          35  +
    }
          36  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_farewell.rs

@@ -0,1 +0,50 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_farewell<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<crate::types::Farewell>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          11  +
            #[allow(unused_mut)]
          12  +
            let mut builder = crate::types::builders::FarewellBuilder::default();
          13  +
            loop {
          14  +
                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  +
                        "phrase" => {
          18  +
                            builder = builder.set_phrase(
          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  +
                            );
          23  +
                        }
          24  +
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          25  +
                    },
          26  +
                    other => {
          27  +
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          28  +
                            "expected object key or end object, found: {:?}",
          29  +
                            other
          30  +
                        )))
          31  +
                    }
          32  +
                }
          33  +
            }
          34  +
            Ok(Some(builder.build()))
          35  +
        }
          36  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          37  +
            "expected start object or null",
          38  +
        )),
          39  +
    }
          40  +
}
          41  +
          42  +
pub fn ser_farewell(
          43  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          44  +
    input: &crate::types::Farewell,
          45  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          46  +
    {
          47  +
        object.key("phrase").string(input.phrase.as_str());
          48  +
    }
          49  +
    Ok(())
          50  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_operation_with_defaults.rs

@@ -0,1 +0,215 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_operation_with_defaults_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
           9  +
    crate::operation::operation_with_defaults::OperationWithDefaultsError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::operation_with_defaults::OperationWithDefaultsError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_operation_with_defaults_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::operation_with_defaults::OperationWithDefaultsOutput,
          25  +
    crate::operation::operation_with_defaults::OperationWithDefaultsError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder::default();
          30  +
        output = crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults(_response_body, output)
          31  +
            .map_err(crate::operation::operation_with_defaults::OperationWithDefaultsError::unhandled)?;
          32  +
        output.build()
          33  +
    })
          34  +
}
          35  +
          36  +
pub fn ser_operation_with_defaults_input(
          37  +
    input: &crate::operation::operation_with_defaults::OperationWithDefaultsInput,
          38  +
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          39  +
    let mut out = String::new();
          40  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
          41  +
    crate::protocol_serde::shape_operation_with_defaults_input::ser_operation_with_defaults_input_input(&mut object, input)?;
          42  +
    object.finish();
          43  +
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          44  +
}
          45  +
          46  +
pub(crate) fn de_operation_with_defaults(
          47  +
    value: &[u8],
          48  +
    mut builder: crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder,
          49  +
) -> Result<
          50  +
    crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder,
          51  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
          52  +
> {
          53  +
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
          54  +
    let tokens = &mut tokens_owned;
          55  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          56  +
    loop {
          57  +
        match tokens.next().transpose()? {
          58  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          59  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
          60  +
                "defaultBlob" => {
          61  +
                    builder = builder.set_default_blob(::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?);
          62  +
                }
          63  +
                "defaultBoolean" => {
          64  +
                    builder = builder.set_default_boolean(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
          65  +
                }
          66  +
                "defaultByte" => {
          67  +
                    builder = builder.set_default_byte(
          68  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          69  +
                            .map(i8::try_from)
          70  +
                            .transpose()?,
          71  +
                    );
          72  +
                }
          73  +
                "defaultDocumentBoolean" => {
          74  +
                    builder = builder.set_default_document_boolean(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
          75  +
                }
          76  +
                "defaultDocumentList" => {
          77  +
                    builder = builder.set_default_document_list(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
          78  +
                }
          79  +
                "defaultDocumentMap" => {
          80  +
                    builder = builder.set_default_document_map(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
          81  +
                }
          82  +
                "defaultDocumentString" => {
          83  +
                    builder = builder.set_default_document_string(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
          84  +
                }
          85  +
                "defaultDouble" => {
          86  +
                    builder = builder
          87  +
                        .set_default_double(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
          88  +
                }
          89  +
                "defaultEnum" => {
          90  +
                    builder = builder.set_default_enum(
          91  +
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          92  +
                            .map(|s| s.to_unescaped().map(|u| crate::types::TestEnum::from(u.as_ref())))
          93  +
                            .transpose()?,
          94  +
                    );
          95  +
                }
          96  +
                "defaultFloat" => {
          97  +
                    builder = builder
          98  +
                        .set_default_float(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()));
          99  +
                }
         100  +
                "defaultIntEnum" => {
         101  +
                    builder = builder.set_default_int_enum(
         102  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         103  +
                            .map(i32::try_from)
         104  +
                            .transpose()?,
         105  +
                    );
         106  +
                }
         107  +
                "defaultInteger" => {
         108  +
                    builder = builder.set_default_integer(
         109  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         110  +
                            .map(i32::try_from)
         111  +
                            .transpose()?,
         112  +
                    );
         113  +
                }
         114  +
                "defaultList" => {
         115  +
                    builder = builder.set_default_list(crate::protocol_serde::shape_test_string_list::de_test_string_list(tokens)?);
         116  +
                }
         117  +
                "defaultLong" => {
         118  +
                    builder = builder.set_default_long(
         119  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         120  +
                            .map(i64::try_from)
         121  +
                            .transpose()?,
         122  +
                    );
         123  +
                }
         124  +
                "defaultMap" => {
         125  +
                    builder = builder.set_default_map(crate::protocol_serde::shape_test_string_map::de_test_string_map(tokens)?);
         126  +
                }
         127  +
                "defaultNullDocument" => {
         128  +
                    builder = builder.set_default_null_document(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
         129  +
                }
         130  +
                "defaultShort" => {
         131  +
                    builder = builder.set_default_short(
         132  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         133  +
                            .map(i16::try_from)
         134  +
                            .transpose()?,
         135  +
                    );
         136  +
                }
         137  +
                "defaultString" => {
         138  +
                    builder = builder.set_default_string(
         139  +
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
         140  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         141  +
                            .transpose()?,
         142  +
                    );
         143  +
                }
         144  +
                "defaultTimestamp" => {
         145  +
                    builder = builder.set_default_timestamp(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
         146  +
                        tokens.next(),
         147  +
                        ::aws_smithy_types::date_time::Format::EpochSeconds,
         148  +
                    )?);
         149  +
                }
         150  +
                "emptyBlob" => {
         151  +
                    builder = builder.set_empty_blob(::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?);
         152  +
                }
         153  +
                "emptyString" => {
         154  +
                    builder = builder.set_empty_string(
         155  +
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
         156  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         157  +
                            .transpose()?,
         158  +
                    );
         159  +
                }
         160  +
                "falseBoolean" => {
         161  +
                    builder = builder.set_false_boolean(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
         162  +
                }
         163  +
                "zeroByte" => {
         164  +
                    builder = builder.set_zero_byte(
         165  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         166  +
                            .map(i8::try_from)
         167  +
                            .transpose()?,
         168  +
                    );
         169  +
                }
         170  +
                "zeroDouble" => {
         171  +
                    builder = builder
         172  +
                        .set_zero_double(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
         173  +
                }
         174  +
                "zeroFloat" => {
         175  +
                    builder = builder
         176  +
                        .set_zero_float(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()));
         177  +
                }
         178  +
                "zeroInteger" => {
         179  +
                    builder = builder.set_zero_integer(
         180  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         181  +
                            .map(i32::try_from)
         182  +
                            .transpose()?,
         183  +
                    );
         184  +
                }
         185  +
                "zeroLong" => {
         186  +
                    builder = builder.set_zero_long(
         187  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         188  +
                            .map(i64::try_from)
         189  +
                            .transpose()?,
         190  +
                    );
         191  +
                }
         192  +
                "zeroShort" => {
         193  +
                    builder = builder.set_zero_short(
         194  +
                        ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         195  +
                            .map(i16::try_from)
         196  +
                            .transpose()?,
         197  +
                    );
         198  +
                }
         199  +
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         200  +
            },
         201  +
            other => {
         202  +
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
         203  +
                    "expected object key or end object, found: {:?}",
         204  +
                    other
         205  +
                )))
         206  +
            }
         207  +
        }
         208  +
    }
         209  +
    if tokens.next().is_some() {
         210  +
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
         211  +
            "found more JSON tokens after completing parsing",
         212  +
        ));
         213  +
    }
         214  +
    Ok(builder)
         215  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_operation_with_defaults_input.rs

@@ -0,1 +0,28 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_operation_with_defaults_input_input(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::operation::operation_with_defaults::OperationWithDefaultsInput,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    if let Some(var_1) = &input.client_optional_defaults {
           7  +
        #[allow(unused_mut)]
           8  +
        let mut object_2 = object.key("clientOptionalDefaults").start_object();
           9  +
        crate::protocol_serde::shape_client_optional_defaults::ser_client_optional_defaults(&mut object_2, var_1)?;
          10  +
        object_2.finish();
          11  +
    }
          12  +
    if let Some(var_3) = &input.defaults {
          13  +
        #[allow(unused_mut)]
          14  +
        let mut object_4 = object.key("defaults").start_object();
          15  +
        crate::protocol_serde::shape_defaults::ser_defaults(&mut object_4, var_3)?;
          16  +
        object_4.finish();
          17  +
    }
          18  +
    if let Some(var_5) = &input.other_top_level_default {
          19  +
        object.key("otherTopLevelDefault").number(
          20  +
            #[allow(clippy::useless_conversion)]
          21  +
            ::aws_smithy_types::Number::NegInt((*var_5).into()),
          22  +
        );
          23  +
    }
          24  +
    if let Some(var_6) = &input.top_level_default {
          25  +
        object.key("topLevelDefault").string(var_6.as_str());
          26  +
    }
          27  +
    Ok(())
          28  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_operation_with_nested_structure.rs

@@ -0,1 +0,87 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_operation_with_nested_structure_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
           9  +
    crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_operation_with_nested_structure_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
          25  +
    crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::default();
          30  +
        output = crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure(_response_body, output)
          31  +
            .map_err(crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::unhandled)?;
          32  +
        crate::serde_util::operation_with_nested_structure_output_output_correct_errors(output)
          33  +
            .build()
          34  +
            .map_err(crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::unhandled)?
          35  +
    })
          36  +
}
          37  +
          38  +
pub fn ser_operation_with_nested_structure_input(
          39  +
    input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
          40  +
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          41  +
    let mut out = String::new();
          42  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
          43  +
    crate::protocol_serde::shape_operation_with_nested_structure_input::ser_operation_with_nested_structure_input_input(&mut object, input)?;
          44  +
    object.finish();
          45  +
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          46  +
}
          47  +
          48  +
pub(crate) fn de_operation_with_nested_structure(
          49  +
    value: &[u8],
          50  +
    mut builder: crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder,
          51  +
) -> Result<
          52  +
    crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder,
          53  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
          54  +
> {
          55  +
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
          56  +
    let tokens = &mut tokens_owned;
          57  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          58  +
    loop {
          59  +
        match tokens.next().transpose()? {
          60  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          61  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
          62  +
                "dialog" => {
          63  +
                    builder = builder.set_dialog(crate::protocol_serde::shape_dialog::de_dialog(tokens)?);
          64  +
                }
          65  +
                "dialogList" => {
          66  +
                    builder = builder.set_dialog_list(crate::protocol_serde::shape_dialog_list::de_dialog_list(tokens)?);
          67  +
                }
          68  +
                "dialogMap" => {
          69  +
                    builder = builder.set_dialog_map(crate::protocol_serde::shape_dialog_map::de_dialog_map(tokens)?);
          70  +
                }
          71  +
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          72  +
            },
          73  +
            other => {
          74  +
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          75  +
                    "expected object key or end object, found: {:?}",
          76  +
                    other
          77  +
                )))
          78  +
            }
          79  +
        }
          80  +
    }
          81  +
    if tokens.next().is_some() {
          82  +
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          83  +
            "found more JSON tokens after completing parsing",
          84  +
        ));
          85  +
    }
          86  +
    Ok(builder)
          87  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_operation_with_nested_structure_input.rs

@@ -0,1 +0,13 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_operation_with_nested_structure_input_input(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    if let Some(var_1) = &input.top_level {
           7  +
        #[allow(unused_mut)]
           8  +
        let mut object_2 = object.key("topLevel").start_object();
           9  +
        crate::protocol_serde::shape_top_level::ser_top_level(&mut object_2, var_1)?;
          10  +
        object_2.finish();
          11  +
    }
          12  +
    Ok(())
          13  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_test_no_input_no_payload.rs

@@ -0,1 +0,37 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_test_no_input_no_payload_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
           9  +
    crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_test_no_input_no_payload_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          25  +
    crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadOutputBuilder::default();
          30  +
        output = output.set_test_id(
          31  +
            crate::protocol_serde::shape_test_no_input_no_payload_output::de_test_id_header(_response_headers).map_err(|_| {
          32  +
                crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError::unhandled("Failed to parse testId from header `X-Amz-Test-Id")
          33  +
            })?,
          34  +
        );
          35  +
        output.build()
          36  +
    })
          37  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_test_no_input_no_payload_output.rs

@@ -0,1 +0,7 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_test_id_header(
           3  +
    header_map: &::aws_smithy_runtime_api::http::Headers,
           4  +
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
           5  +
    let headers = header_map.get_all("X-Amz-Test-Id");
           6  +
    ::aws_smithy_http::header::one_or_none(headers)
           7  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_test_string_list.rs

@@ -0,1 +0,34 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_test_string_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<::std::vec::Vec<::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          11  +
            let mut items = Vec::new();
          12  +
            loop {
          13  +
                match tokens.peek() {
          14  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          15  +
                        tokens.next().transpose().unwrap();
          16  +
                        break;
          17  +
                    }
          18  +
                    _ => {
          19  +
                        let value = ::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  +
                        if let Some(value) = value {
          23  +
                            items.push(value);
          24  +
                        }
          25  +
                    }
          26  +
                }
          27  +
            }
          28  +
            Ok(Some(items))
          29  +
        }
          30  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          31  +
            "expected start array or null",
          32  +
        )),
          33  +
    }
          34  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_test_string_map.rs

@@ -0,1 +0,38 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_test_string_map<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          11  +
            let mut map = ::std::collections::HashMap::new();
          12  +
            loop {
          13  +
                match tokens.next().transpose()? {
          14  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          15  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          16  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          17  +
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          18  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          19  +
                            .transpose()?;
          20  +
                        if let Some(value) = value {
          21  +
                            map.insert(key, value);
          22  +
                        }
          23  +
                    }
          24  +
                    other => {
          25  +
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          26  +
                            "expected object key or end object, found: {:?}",
          27  +
                            other
          28  +
                        )))
          29  +
                    }
          30  +
                }
          31  +
            }
          32  +
            Ok(Some(map))
          33  +
        }
          34  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          35  +
            "expected start object or null",
          36  +
        )),
          37  +
    }
          38  +
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_top_level.rs

@@ -0,1 +0,38 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_top_level(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::types::TopLevel,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    {
           7  +
        #[allow(unused_mut)]
           8  +
        let mut object_1 = object.key("dialog").start_object();
           9  +
        crate::protocol_serde::shape_dialog::ser_dialog(&mut object_1, &input.dialog)?;
          10  +
        object_1.finish();
          11  +
    }
          12  +
    {
          13  +
        let mut array_2 = object.key("dialogList").start_array();
          14  +
        for item_3 in &input.dialog_list {
          15  +
            {
          16  +
                #[allow(unused_mut)]
          17  +
                let mut object_4 = array_2.value().start_object();
          18  +
                crate::protocol_serde::shape_dialog::ser_dialog(&mut object_4, item_3)?;
          19  +
                object_4.finish();
          20  +
            }
          21  +
        }
          22  +
        array_2.finish();
          23  +
    }
          24  +
    {
          25  +
        #[allow(unused_mut)]
          26  +
        let mut object_5 = object.key("dialogMap").start_object();
          27  +
        for (key_6, value_7) in &input.dialog_map {
          28  +
            {
          29  +
                #[allow(unused_mut)]
          30  +
                let mut object_8 = object_5.key(key_6.as_str()).start_object();
          31  +
                crate::protocol_serde::shape_dialog::ser_dialog(&mut object_8, value_7)?;
          32  +
                object_8.finish();
          33  +
            }
          34  +
        }
          35  +
        object_5.finish();
          36  +
    }
          37  +
    Ok(())
          38  +
}

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

@@ -1,1 +18,30 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn operation_with_nested_structure_output_output_correct_errors(
           3  +
    mut builder: crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder,
           4  +
) -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder {
           5  +
    if builder.dialog.is_none() {
           6  +
        builder.dialog = {
           7  +
            let builder = crate::types::builders::DialogBuilder::default();
           8  +
            Some(builder.build())
           9  +
        }
          10  +
    }
          11  +
    builder
          12  +
}
          13  +
    2     14   
pub(crate) fn post_player_action_output_output_correct_errors(
    3     15   
    mut builder: crate::operation::post_player_action::builders::PostPlayerActionOutputBuilder,
    4     16   
) -> crate::operation::post_player_action::builders::PostPlayerActionOutputBuilder {
    5     17   
    if builder.action.is_none() {
    6     18   
        builder.action = Some(crate::types::PlayerAction::Unknown)
    7     19   
    }
    8     20   
    builder
    9     21   
}
   10     22   
   11     23   
pub(crate) fn post_union_with_json_name_output_output_correct_errors(

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

@@ -1,1 +74,98 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::types::_dialog::Dialog;
           3  +
           4  +
pub use crate::types::_farewell::Farewell;
           5  +
           6  +
pub use crate::types::_top_level::TopLevel;
           7  +
           8  +
pub use crate::types::_test_enum::TestEnum;
           9  +
          10  +
pub use crate::types::_client_optional_defaults::ClientOptionalDefaults;
          11  +
          12  +
pub use crate::types::_defaults::Defaults;
          13  +
    2     14   
pub use crate::types::_payload_config::PayloadConfig;
    3     15   
    4     16   
pub use crate::types::_test_config::TestConfig;
    5     17   
    6     18   
pub use crate::types::_simple_union::SimpleUnion;
    7     19   
    8     20   
pub use crate::types::_union_with_json_name::UnionWithJsonName;
    9     21   
   10     22   
pub use crate::types::_player_action::PlayerAction;
   11     23   
   12     24   
pub use crate::types::_unit::Unit;
   13     25   
   14     26   
pub use crate::types::_my_union::MyUnion;
   15     27   
   16     28   
pub use crate::types::_renamed_greeting::RenamedGreeting;
   17     29   
   18     30   
pub use crate::types::_greeting_struct::GreetingStruct;
   19     31   
   20     32   
pub use crate::types::_foo_enum::FooEnum;
   21     33   
   22     34   
pub use crate::types::_structure_list_member::StructureListMember;
   23     35   
   24     36   
pub use crate::types::_recursive_shapes_input_output_nested1::RecursiveShapesInputOutputNested1;
   25     37   
   26     38   
pub use crate::types::_recursive_shapes_input_output_nested2::RecursiveShapesInputOutputNested2;
   27     39   
   28     40   
pub use crate::types::_complex_nested_error_data::ComplexNestedErrorData;
   29     41   
   30     42   
pub use crate::types::_union_payload::UnionPayload;
   31     43   
   32     44   
pub use crate::types::_string_enum::StringEnum;
   33     45   
   34     46   
pub use crate::types::_nested_payload::NestedPayload;
   35     47   
          48  +
mod _client_optional_defaults;
          49  +
   36     50   
mod _complex_nested_error_data;
   37     51   
          52  +
mod _defaults;
          53  +
          54  +
mod _dialog;
          55  +
          56  +
mod _farewell;
          57  +
   38     58   
mod _foo_enum;
   39     59   
   40     60   
mod _greeting_struct;
   41     61   
   42     62   
mod _my_union;
   43     63   
   44     64   
mod _nested_payload;
   45     65   
   46     66   
mod _payload_config;
   47     67   
   48     68   
mod _player_action;
   49     69   
   50     70   
mod _recursive_shapes_input_output_nested1;
   51     71   
   52     72   
mod _recursive_shapes_input_output_nested2;
   53     73   
   54     74   
mod _renamed_greeting;
   55     75   
   56     76   
mod _simple_union;
   57     77   
   58     78   
mod _string_enum;
   59     79   
   60     80   
mod _structure_list_member;
   61     81   
   62     82   
mod _test_config;
   63     83   
          84  +
mod _test_enum;
          85  +
          86  +
mod _top_level;
          87  +
   64     88   
mod _union_payload;
   65     89   
   66     90   
mod _union_with_json_name;
   67     91   
   68     92   
mod _unit;
   69     93   
   70     94   
/// Builders
   71     95   
pub mod builders;
   72     96   
   73     97   
/// Error types that Sample Rest Json Protocol Service can respond with.

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

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

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

@@ -0,1 +0,679 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct Defaults {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub default_string: ::std::string::String,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub default_boolean: bool,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub default_list: ::std::vec::Vec<::std::string::String>,
          12  +
    #[allow(missing_docs)] // documentation missing in model
          13  +
    pub default_document_map: ::aws_smithy_types::Document,
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub default_document_string: ::aws_smithy_types::Document,
          16  +
    #[allow(missing_docs)] // documentation missing in model
          17  +
    pub default_document_boolean: ::aws_smithy_types::Document,
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub default_document_list: ::aws_smithy_types::Document,
          20  +
    #[allow(missing_docs)] // documentation missing in model
          21  +
    pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
          22  +
    #[allow(missing_docs)] // documentation missing in model
          23  +
    pub default_timestamp: ::aws_smithy_types::DateTime,
          24  +
    #[allow(missing_docs)] // documentation missing in model
          25  +
    pub default_blob: ::aws_smithy_types::Blob,
          26  +
    #[allow(missing_docs)] // documentation missing in model
          27  +
    pub default_byte: i8,
          28  +
    #[allow(missing_docs)] // documentation missing in model
          29  +
    pub default_short: i16,
          30  +
    #[allow(missing_docs)] // documentation missing in model
          31  +
    pub default_integer: i32,
          32  +
    #[allow(missing_docs)] // documentation missing in model
          33  +
    pub default_long: i64,
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub default_float: f32,
          36  +
    #[allow(missing_docs)] // documentation missing in model
          37  +
    pub default_double: f64,
          38  +
    #[allow(missing_docs)] // documentation missing in model
          39  +
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
          40  +
    #[allow(missing_docs)] // documentation missing in model
          41  +
    pub default_enum: crate::types::TestEnum,
          42  +
    #[allow(missing_docs)] // documentation missing in model
          43  +
    pub default_int_enum: i32,
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    pub empty_string: ::std::string::String,
          46  +
    #[allow(missing_docs)] // documentation missing in model
          47  +
    pub false_boolean: bool,
          48  +
    #[allow(missing_docs)] // documentation missing in model
          49  +
    pub empty_blob: ::aws_smithy_types::Blob,
          50  +
    #[allow(missing_docs)] // documentation missing in model
          51  +
    pub zero_byte: i8,
          52  +
    #[allow(missing_docs)] // documentation missing in model
          53  +
    pub zero_short: i16,
          54  +
    #[allow(missing_docs)] // documentation missing in model
          55  +
    pub zero_integer: i32,
          56  +
    #[allow(missing_docs)] // documentation missing in model
          57  +
    pub zero_long: i64,
          58  +
    #[allow(missing_docs)] // documentation missing in model
          59  +
    pub zero_float: f32,
          60  +
    #[allow(missing_docs)] // documentation missing in model
          61  +
    pub zero_double: f64,
          62  +
}
          63  +
impl Defaults {
          64  +
    #[allow(missing_docs)] // documentation missing in model
          65  +
    pub fn default_string(&self) -> &str {
          66  +
        use std::ops::Deref;
          67  +
        self.default_string.deref()
          68  +
    }
          69  +
    #[allow(missing_docs)] // documentation missing in model
          70  +
    pub fn default_boolean(&self) -> bool {
          71  +
        self.default_boolean
          72  +
    }
          73  +
    #[allow(missing_docs)] // documentation missing in model
          74  +
    pub fn default_list(&self) -> &[::std::string::String] {
          75  +
        use std::ops::Deref;
          76  +
        self.default_list.deref()
          77  +
    }
          78  +
    #[allow(missing_docs)] // documentation missing in model
          79  +
    pub fn default_document_map(&self) -> &::aws_smithy_types::Document {
          80  +
        &self.default_document_map
          81  +
    }
          82  +
    #[allow(missing_docs)] // documentation missing in model
          83  +
    pub fn default_document_string(&self) -> &::aws_smithy_types::Document {
          84  +
        &self.default_document_string
          85  +
    }
          86  +
    #[allow(missing_docs)] // documentation missing in model
          87  +
    pub fn default_document_boolean(&self) -> &::aws_smithy_types::Document {
          88  +
        &self.default_document_boolean
          89  +
    }
          90  +
    #[allow(missing_docs)] // documentation missing in model
          91  +
    pub fn default_document_list(&self) -> &::aws_smithy_types::Document {
          92  +
        &self.default_document_list
          93  +
    }
          94  +
    #[allow(missing_docs)] // documentation missing in model
          95  +
    pub fn default_null_document(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
          96  +
        self.default_null_document.as_ref()
          97  +
    }
          98  +
    #[allow(missing_docs)] // documentation missing in model
          99  +
    pub fn default_timestamp(&self) -> &::aws_smithy_types::DateTime {
         100  +
        &self.default_timestamp
         101  +
    }
         102  +
    #[allow(missing_docs)] // documentation missing in model
         103  +
    pub fn default_blob(&self) -> &::aws_smithy_types::Blob {
         104  +
        &self.default_blob
         105  +
    }
         106  +
    #[allow(missing_docs)] // documentation missing in model
         107  +
    pub fn default_byte(&self) -> i8 {
         108  +
        self.default_byte
         109  +
    }
         110  +
    #[allow(missing_docs)] // documentation missing in model
         111  +
    pub fn default_short(&self) -> i16 {
         112  +
        self.default_short
         113  +
    }
         114  +
    #[allow(missing_docs)] // documentation missing in model
         115  +
    pub fn default_integer(&self) -> i32 {
         116  +
        self.default_integer
         117  +
    }
         118  +
    #[allow(missing_docs)] // documentation missing in model
         119  +
    pub fn default_long(&self) -> i64 {
         120  +
        self.default_long
         121  +
    }
         122  +
    #[allow(missing_docs)] // documentation missing in model
         123  +
    pub fn default_float(&self) -> f32 {
         124  +
        self.default_float
         125  +
    }
         126  +
    #[allow(missing_docs)] // documentation missing in model
         127  +
    pub fn default_double(&self) -> f64 {
         128  +
        self.default_double
         129  +
    }
         130  +
    #[allow(missing_docs)] // documentation missing in model
         131  +
    pub fn default_map(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
         132  +
        &self.default_map
         133  +
    }
         134  +
    #[allow(missing_docs)] // documentation missing in model
         135  +
    pub fn default_enum(&self) -> &crate::types::TestEnum {
         136  +
        &self.default_enum
         137  +
    }
         138  +
    #[allow(missing_docs)] // documentation missing in model
         139  +
    pub fn default_int_enum(&self) -> i32 {
         140  +
        self.default_int_enum
         141  +
    }
         142  +
    #[allow(missing_docs)] // documentation missing in model
         143  +
    pub fn empty_string(&self) -> &str {
         144  +
        use std::ops::Deref;
         145  +
        self.empty_string.deref()
         146  +
    }
         147  +
    #[allow(missing_docs)] // documentation missing in model
         148  +
    pub fn false_boolean(&self) -> bool {
         149  +
        self.false_boolean
         150  +
    }
         151  +
    #[allow(missing_docs)] // documentation missing in model
         152  +
    pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
         153  +
        &self.empty_blob
         154  +
    }
         155  +
    #[allow(missing_docs)] // documentation missing in model
         156  +
    pub fn zero_byte(&self) -> i8 {
         157  +
        self.zero_byte
         158  +
    }
         159  +
    #[allow(missing_docs)] // documentation missing in model
         160  +
    pub fn zero_short(&self) -> i16 {
         161  +
        self.zero_short
         162  +
    }
         163  +
    #[allow(missing_docs)] // documentation missing in model
         164  +
    pub fn zero_integer(&self) -> i32 {
         165  +
        self.zero_integer
         166  +
    }
         167  +
    #[allow(missing_docs)] // documentation missing in model
         168  +
    pub fn zero_long(&self) -> i64 {
         169  +
        self.zero_long
         170  +
    }
         171  +
    #[allow(missing_docs)] // documentation missing in model
         172  +
    pub fn zero_float(&self) -> f32 {
         173  +
        self.zero_float
         174  +
    }
         175  +
    #[allow(missing_docs)] // documentation missing in model
         176  +
    pub fn zero_double(&self) -> f64 {
         177  +
        self.zero_double
         178  +
    }
         179  +
}
         180  +
impl Defaults {
         181  +
    /// Creates a new builder-style object to manufacture [`Defaults`](crate::types::Defaults).
         182  +
    pub fn builder() -> crate::types::builders::DefaultsBuilder {
         183  +
        crate::types::builders::DefaultsBuilder::default()
         184  +
    }
         185  +
}
         186  +
         187  +
/// A builder for [`Defaults`](crate::types::Defaults).
         188  +
#[non_exhaustive]
         189  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         190  +
pub struct DefaultsBuilder {
         191  +
    pub(crate) default_string: ::std::option::Option<::std::string::String>,
         192  +
    pub(crate) default_boolean: ::std::option::Option<bool>,
         193  +
    pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         194  +
    pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
         195  +
    pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
         196  +
    pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
         197  +
    pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
         198  +
    pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
         199  +
    pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         200  +
    pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
         201  +
    pub(crate) default_byte: ::std::option::Option<i8>,
         202  +
    pub(crate) default_short: ::std::option::Option<i16>,
         203  +
    pub(crate) default_integer: ::std::option::Option<i32>,
         204  +
    pub(crate) default_long: ::std::option::Option<i64>,
         205  +
    pub(crate) default_float: ::std::option::Option<f32>,
         206  +
    pub(crate) default_double: ::std::option::Option<f64>,
         207  +
    pub(crate) default_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         208  +
    pub(crate) default_enum: ::std::option::Option<crate::types::TestEnum>,
         209  +
    pub(crate) default_int_enum: ::std::option::Option<i32>,
         210  +
    pub(crate) empty_string: ::std::option::Option<::std::string::String>,
         211  +
    pub(crate) false_boolean: ::std::option::Option<bool>,
         212  +
    pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
         213  +
    pub(crate) zero_byte: ::std::option::Option<i8>,
         214  +
    pub(crate) zero_short: ::std::option::Option<i16>,
         215  +
    pub(crate) zero_integer: ::std::option::Option<i32>,
         216  +
    pub(crate) zero_long: ::std::option::Option<i64>,
         217  +
    pub(crate) zero_float: ::std::option::Option<f32>,
         218  +
    pub(crate) zero_double: ::std::option::Option<f64>,
         219  +
}
         220  +
impl DefaultsBuilder {
         221  +
    #[allow(missing_docs)] // documentation missing in model
         222  +
    pub fn default_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         223  +
        self.default_string = ::std::option::Option::Some(input.into());
         224  +
        self
         225  +
    }
         226  +
    #[allow(missing_docs)] // documentation missing in model
         227  +
    pub fn set_default_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         228  +
        self.default_string = input;
         229  +
        self
         230  +
    }
         231  +
    #[allow(missing_docs)] // documentation missing in model
         232  +
    pub fn get_default_string(&self) -> &::std::option::Option<::std::string::String> {
         233  +
        &self.default_string
         234  +
    }
         235  +
    #[allow(missing_docs)] // documentation missing in model
         236  +
    pub fn default_boolean(mut self, input: bool) -> Self {
         237  +
        self.default_boolean = ::std::option::Option::Some(input);
         238  +
        self
         239  +
    }
         240  +
    #[allow(missing_docs)] // documentation missing in model
         241  +
    pub fn set_default_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
         242  +
        self.default_boolean = input;
         243  +
        self
         244  +
    }
         245  +
    #[allow(missing_docs)] // documentation missing in model
         246  +
    pub fn get_default_boolean(&self) -> &::std::option::Option<bool> {
         247  +
        &self.default_boolean
         248  +
    }
         249  +
    /// Appends an item to `default_list`.
         250  +
    ///
         251  +
    /// To override the contents of this collection use [`set_default_list`](Self::set_default_list).
         252  +
    ///
         253  +
    pub fn default_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         254  +
        let mut v = self.default_list.unwrap_or_default();
         255  +
        v.push(input.into());
         256  +
        self.default_list = ::std::option::Option::Some(v);
         257  +
        self
         258  +
    }
         259  +
    #[allow(missing_docs)] // documentation missing in model
         260  +
    pub fn set_default_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         261  +
        self.default_list = input;
         262  +
        self
         263  +
    }
         264  +
    #[allow(missing_docs)] // documentation missing in model
         265  +
    pub fn get_default_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         266  +
        &self.default_list
         267  +
    }
         268  +
    #[allow(missing_docs)] // documentation missing in model
         269  +
    pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
         270  +
        self.default_document_map = ::std::option::Option::Some(input);
         271  +
        self
         272  +
    }
         273  +
    #[allow(missing_docs)] // documentation missing in model
         274  +
    pub fn set_default_document_map(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
         275  +
        self.default_document_map = input;
         276  +
        self
         277  +
    }
         278  +
    #[allow(missing_docs)] // documentation missing in model
         279  +
    pub fn get_default_document_map(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
         280  +
        &self.default_document_map
         281  +
    }
         282  +
    #[allow(missing_docs)] // documentation missing in model
         283  +
    pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
         284  +
        self.default_document_string = ::std::option::Option::Some(input);
         285  +
        self
         286  +
    }
         287  +
    #[allow(missing_docs)] // documentation missing in model
         288  +
    pub fn set_default_document_string(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
         289  +
        self.default_document_string = input;
         290  +
        self
         291  +
    }
         292  +
    #[allow(missing_docs)] // documentation missing in model
         293  +
    pub fn get_default_document_string(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
         294  +
        &self.default_document_string
         295  +
    }
         296  +
    #[allow(missing_docs)] // documentation missing in model
         297  +
    pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
         298  +
        self.default_document_boolean = ::std::option::Option::Some(input);
         299  +
        self
         300  +
    }
         301  +
    #[allow(missing_docs)] // documentation missing in model
         302  +
    pub fn set_default_document_boolean(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
         303  +
        self.default_document_boolean = input;
         304  +
        self
         305  +
    }
         306  +
    #[allow(missing_docs)] // documentation missing in model
         307  +
    pub fn get_default_document_boolean(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
         308  +
        &self.default_document_boolean
         309  +
    }
         310  +
    #[allow(missing_docs)] // documentation missing in model
         311  +
    pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
         312  +
        self.default_document_list = ::std::option::Option::Some(input);
         313  +
        self
         314  +
    }
         315  +
    #[allow(missing_docs)] // documentation missing in model
         316  +
    pub fn set_default_document_list(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
         317  +
        self.default_document_list = input;
         318  +
        self
         319  +
    }
         320  +
    #[allow(missing_docs)] // documentation missing in model
         321  +
    pub fn get_default_document_list(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
         322  +
        &self.default_document_list
         323  +
    }
         324  +
    #[allow(missing_docs)] // documentation missing in model
         325  +
    pub fn default_null_document(mut self, input: ::aws_smithy_types::Document) -> Self {
         326  +
        self.default_null_document = ::std::option::Option::Some(input);
         327  +
        self
         328  +
    }
         329  +
    #[allow(missing_docs)] // documentation missing in model
         330  +
    pub fn set_default_null_document(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
         331  +
        self.default_null_document = input;
         332  +
        self
         333  +
    }
         334  +
    #[allow(missing_docs)] // documentation missing in model
         335  +
    pub fn get_default_null_document(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
         336  +
        &self.default_null_document
         337  +
    }
         338  +
    #[allow(missing_docs)] // documentation missing in model
         339  +
    pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         340  +
        self.default_timestamp = ::std::option::Option::Some(input);
         341  +
        self
         342  +
    }
         343  +
    #[allow(missing_docs)] // documentation missing in model
         344  +
    pub fn set_default_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         345  +
        self.default_timestamp = input;
         346  +
        self
         347  +
    }
         348  +
    #[allow(missing_docs)] // documentation missing in model
         349  +
    pub fn get_default_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         350  +
        &self.default_timestamp
         351  +
    }
         352  +
    #[allow(missing_docs)] // documentation missing in model
         353  +
    pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
         354  +
        self.default_blob = ::std::option::Option::Some(input);
         355  +
        self
         356  +
    }
         357  +
    #[allow(missing_docs)] // documentation missing in model
         358  +
    pub fn set_default_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
         359  +
        self.default_blob = input;
         360  +
        self
         361  +
    }
         362  +
    #[allow(missing_docs)] // documentation missing in model
         363  +
    pub fn get_default_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
         364  +
        &self.default_blob
         365  +
    }
         366  +
    #[allow(missing_docs)] // documentation missing in model
         367  +
    pub fn default_byte(mut self, input: i8) -> Self {
         368  +
        self.default_byte = ::std::option::Option::Some(input);
         369  +
        self
         370  +
    }
         371  +
    #[allow(missing_docs)] // documentation missing in model
         372  +
    pub fn set_default_byte(mut self, input: ::std::option::Option<i8>) -> Self {
         373  +
        self.default_byte = input;
         374  +
        self
         375  +
    }
         376  +
    #[allow(missing_docs)] // documentation missing in model
         377  +
    pub fn get_default_byte(&self) -> &::std::option::Option<i8> {
         378  +
        &self.default_byte
         379  +
    }
         380  +
    #[allow(missing_docs)] // documentation missing in model
         381  +
    pub fn default_short(mut self, input: i16) -> Self {
         382  +
        self.default_short = ::std::option::Option::Some(input);
         383  +
        self
         384  +
    }
         385  +
    #[allow(missing_docs)] // documentation missing in model
         386  +
    pub fn set_default_short(mut self, input: ::std::option::Option<i16>) -> Self {
         387  +
        self.default_short = input;
         388  +
        self
         389  +
    }
         390  +
    #[allow(missing_docs)] // documentation missing in model
         391  +
    pub fn get_default_short(&self) -> &::std::option::Option<i16> {
         392  +
        &self.default_short
         393  +
    }
         394  +
    #[allow(missing_docs)] // documentation missing in model
         395  +
    pub fn default_integer(mut self, input: i32) -> Self {
         396  +
        self.default_integer = ::std::option::Option::Some(input);
         397  +
        self
         398  +
    }
         399  +
    #[allow(missing_docs)] // documentation missing in model
         400  +
    pub fn set_default_integer(mut self, input: ::std::option::Option<i32>) -> Self {
         401  +
        self.default_integer = input;
         402  +
        self
         403  +
    }
         404  +
    #[allow(missing_docs)] // documentation missing in model
         405  +
    pub fn get_default_integer(&self) -> &::std::option::Option<i32> {
         406  +
        &self.default_integer
         407  +
    }
         408  +
    #[allow(missing_docs)] // documentation missing in model
         409  +
    pub fn default_long(mut self, input: i64) -> Self {
         410  +
        self.default_long = ::std::option::Option::Some(input);
         411  +
        self
         412  +
    }
         413  +
    #[allow(missing_docs)] // documentation missing in model
         414  +
    pub fn set_default_long(mut self, input: ::std::option::Option<i64>) -> Self {
         415  +
        self.default_long = input;
         416  +
        self
         417  +
    }
         418  +
    #[allow(missing_docs)] // documentation missing in model
         419  +
    pub fn get_default_long(&self) -> &::std::option::Option<i64> {
         420  +
        &self.default_long
         421  +
    }
         422  +
    #[allow(missing_docs)] // documentation missing in model
         423  +
    pub fn default_float(mut self, input: f32) -> Self {
         424  +
        self.default_float = ::std::option::Option::Some(input);
         425  +
        self
         426  +
    }
         427  +
    #[allow(missing_docs)] // documentation missing in model
         428  +
    pub fn set_default_float(mut self, input: ::std::option::Option<f32>) -> Self {
         429  +
        self.default_float = input;
         430  +
        self
         431  +
    }
         432  +
    #[allow(missing_docs)] // documentation missing in model
         433  +
    pub fn get_default_float(&self) -> &::std::option::Option<f32> {
         434  +
        &self.default_float
         435  +
    }
         436  +
    #[allow(missing_docs)] // documentation missing in model
         437  +
    pub fn default_double(mut self, input: f64) -> Self {
         438  +
        self.default_double = ::std::option::Option::Some(input);
         439  +
        self
         440  +
    }
         441  +
    #[allow(missing_docs)] // documentation missing in model
         442  +
    pub fn set_default_double(mut self, input: ::std::option::Option<f64>) -> Self {
         443  +
        self.default_double = input;
         444  +
        self
         445  +
    }
         446  +
    #[allow(missing_docs)] // documentation missing in model
         447  +
    pub fn get_default_double(&self) -> &::std::option::Option<f64> {
         448  +
        &self.default_double
         449  +
    }
         450  +
    /// Adds a key-value pair to `default_map`.
         451  +
    ///
         452  +
    /// To override the contents of this collection use [`set_default_map`](Self::set_default_map).
         453  +
    ///
         454  +
    pub fn default_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
         455  +
        let mut hash_map = self.default_map.unwrap_or_default();
         456  +
        hash_map.insert(k.into(), v.into());
         457  +
        self.default_map = ::std::option::Option::Some(hash_map);
         458  +
        self
         459  +
    }
         460  +
    #[allow(missing_docs)] // documentation missing in model
         461  +
    pub fn set_default_map(
         462  +
        mut self,
         463  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         464  +
    ) -> Self {
         465  +
        self.default_map = input;
         466  +
        self
         467  +
    }
         468  +
    #[allow(missing_docs)] // documentation missing in model
         469  +
    pub fn get_default_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         470  +
        &self.default_map
         471  +
    }
         472  +
    #[allow(missing_docs)] // documentation missing in model
         473  +
    pub fn default_enum(mut self, input: crate::types::TestEnum) -> Self {
         474  +
        self.default_enum = ::std::option::Option::Some(input);
         475  +
        self
         476  +
    }
         477  +
    #[allow(missing_docs)] // documentation missing in model
         478  +
    pub fn set_default_enum(mut self, input: ::std::option::Option<crate::types::TestEnum>) -> Self {
         479  +
        self.default_enum = input;
         480  +
        self
         481  +
    }
         482  +
    #[allow(missing_docs)] // documentation missing in model
         483  +
    pub fn get_default_enum(&self) -> &::std::option::Option<crate::types::TestEnum> {
         484  +
        &self.default_enum
         485  +
    }
         486  +
    #[allow(missing_docs)] // documentation missing in model
         487  +
    pub fn default_int_enum(mut self, input: i32) -> Self {
         488  +
        self.default_int_enum = ::std::option::Option::Some(input);
         489  +
        self
         490  +
    }
         491  +
    #[allow(missing_docs)] // documentation missing in model
         492  +
    pub fn set_default_int_enum(mut self, input: ::std::option::Option<i32>) -> Self {
         493  +
        self.default_int_enum = input;
         494  +
        self
         495  +
    }
         496  +
    #[allow(missing_docs)] // documentation missing in model
         497  +
    pub fn get_default_int_enum(&self) -> &::std::option::Option<i32> {
         498  +
        &self.default_int_enum
         499  +
    }
         500  +
    #[allow(missing_docs)] // documentation missing in model
         501  +
    pub fn empty_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         502  +
        self.empty_string = ::std::option::Option::Some(input.into());
         503  +
        self
         504  +
    }
         505  +
    #[allow(missing_docs)] // documentation missing in model
         506  +
    pub fn set_empty_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         507  +
        self.empty_string = input;
         508  +
        self
         509  +
    }
         510  +
    #[allow(missing_docs)] // documentation missing in model
         511  +
    pub fn get_empty_string(&self) -> &::std::option::Option<::std::string::String> {
         512  +
        &self.empty_string
         513  +
    }
         514  +
    #[allow(missing_docs)] // documentation missing in model
         515  +
    pub fn false_boolean(mut self, input: bool) -> Self {
         516  +
        self.false_boolean = ::std::option::Option::Some(input);
         517  +
        self
         518  +
    }
         519  +
    #[allow(missing_docs)] // documentation missing in model
         520  +
    pub fn set_false_boolean(mut self, input: ::std::option::Option<bool>) -> Self {
         521  +
        self.false_boolean = input;
         522  +
        self
         523  +
    }
         524  +
    #[allow(missing_docs)] // documentation missing in model
         525  +
    pub fn get_false_boolean(&self) -> &::std::option::Option<bool> {
         526  +
        &self.false_boolean
         527  +
    }
         528  +
    #[allow(missing_docs)] // documentation missing in model
         529  +
    pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
         530  +
        self.empty_blob = ::std::option::Option::Some(input);
         531  +
        self
         532  +
    }
         533  +
    #[allow(missing_docs)] // documentation missing in model
         534  +
    pub fn set_empty_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
         535  +
        self.empty_blob = input;
         536  +
        self
         537  +
    }
         538  +
    #[allow(missing_docs)] // documentation missing in model
         539  +
    pub fn get_empty_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
         540  +
        &self.empty_blob
         541  +
    }
         542  +
    #[allow(missing_docs)] // documentation missing in model
         543  +
    pub fn zero_byte(mut self, input: i8) -> Self {
         544  +
        self.zero_byte = ::std::option::Option::Some(input);
         545  +
        self
         546  +
    }
         547  +
    #[allow(missing_docs)] // documentation missing in model
         548  +
    pub fn set_zero_byte(mut self, input: ::std::option::Option<i8>) -> Self {
         549  +
        self.zero_byte = input;
         550  +
        self
         551  +
    }
         552  +
    #[allow(missing_docs)] // documentation missing in model
         553  +
    pub fn get_zero_byte(&self) -> &::std::option::Option<i8> {
         554  +
        &self.zero_byte
         555  +
    }
         556  +
    #[allow(missing_docs)] // documentation missing in model
         557  +
    pub fn zero_short(mut self, input: i16) -> Self {
         558  +
        self.zero_short = ::std::option::Option::Some(input);
         559  +
        self
         560  +
    }
         561  +
    #[allow(missing_docs)] // documentation missing in model
         562  +
    pub fn set_zero_short(mut self, input: ::std::option::Option<i16>) -> Self {
         563  +
        self.zero_short = input;
         564  +
        self
         565  +
    }
         566  +
    #[allow(missing_docs)] // documentation missing in model
         567  +
    pub fn get_zero_short(&self) -> &::std::option::Option<i16> {
         568  +
        &self.zero_short
         569  +
    }
         570  +
    #[allow(missing_docs)] // documentation missing in model
         571  +
    pub fn zero_integer(mut self, input: i32) -> Self {
         572  +
        self.zero_integer = ::std::option::Option::Some(input);
         573  +
        self
         574  +
    }
         575  +
    #[allow(missing_docs)] // documentation missing in model
         576  +
    pub fn set_zero_integer(mut self, input: ::std::option::Option<i32>) -> Self {
         577  +
        self.zero_integer = input;
         578  +
        self
         579  +
    }
         580  +
    #[allow(missing_docs)] // documentation missing in model
         581  +
    pub fn get_zero_integer(&self) -> &::std::option::Option<i32> {
         582  +
        &self.zero_integer
         583  +
    }
         584  +
    #[allow(missing_docs)] // documentation missing in model
         585  +
    pub fn zero_long(mut self, input: i64) -> Self {
         586  +
        self.zero_long = ::std::option::Option::Some(input);
         587  +
        self
         588  +
    }
         589  +
    #[allow(missing_docs)] // documentation missing in model
         590  +
    pub fn set_zero_long(mut self, input: ::std::option::Option<i64>) -> Self {
         591  +
        self.zero_long = input;
         592  +
        self
         593  +
    }
         594  +
    #[allow(missing_docs)] // documentation missing in model
         595  +
    pub fn get_zero_long(&self) -> &::std::option::Option<i64> {
         596  +
        &self.zero_long
         597  +
    }
         598  +
    #[allow(missing_docs)] // documentation missing in model
         599  +
    pub fn zero_float(mut self, input: f32) -> Self {
         600  +
        self.zero_float = ::std::option::Option::Some(input);
         601  +
        self
         602  +
    }
         603  +
    #[allow(missing_docs)] // documentation missing in model
         604  +
    pub fn set_zero_float(mut self, input: ::std::option::Option<f32>) -> Self {
         605  +
        self.zero_float = input;
         606  +
        self
         607  +
    }
         608  +
    #[allow(missing_docs)] // documentation missing in model
         609  +
    pub fn get_zero_float(&self) -> &::std::option::Option<f32> {
         610  +
        &self.zero_float
         611  +
    }
         612  +
    #[allow(missing_docs)] // documentation missing in model
         613  +
    pub fn zero_double(mut self, input: f64) -> Self {
         614  +
        self.zero_double = ::std::option::Option::Some(input);
         615  +
        self
         616  +
    }
         617  +
    #[allow(missing_docs)] // documentation missing in model
         618  +
    pub fn set_zero_double(mut self, input: ::std::option::Option<f64>) -> Self {
         619  +
        self.zero_double = input;
         620  +
        self
         621  +
    }
         622  +
    #[allow(missing_docs)] // documentation missing in model
         623  +
    pub fn get_zero_double(&self) -> &::std::option::Option<f64> {
         624  +
        &self.zero_double
         625  +
    }
         626  +
    /// Consumes the builder and constructs a [`Defaults`](crate::types::Defaults).
         627  +
    pub fn build(self) -> crate::types::Defaults {
         628  +
        crate::types::Defaults {
         629  +
            default_string: self.default_string.unwrap_or_else(|| "hi".to_owned()),
         630  +
            default_boolean: self.default_boolean.unwrap_or(true),
         631  +
            default_list: self.default_list.unwrap_or_default(),
         632  +
            default_document_map: self.default_document_map.unwrap_or_else(|| {
         633  +
                let json_bytes = br#"{}"#;
         634  +
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
         635  +
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
         636  +
            }),
         637  +
            default_document_string: self.default_document_string.unwrap_or_else(|| {
         638  +
                let json_bytes = br#""hi""#;
         639  +
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
         640  +
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
         641  +
            }),
         642  +
            default_document_boolean: self.default_document_boolean.unwrap_or_else(|| {
         643  +
                let json_bytes = br#"true"#;
         644  +
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
         645  +
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
         646  +
            }),
         647  +
            default_document_list: self.default_document_list.unwrap_or_else(|| {
         648  +
                let json_bytes = br#"[]"#;
         649  +
                let mut tokens = ::aws_smithy_json::deserialize::json_token_iter(json_bytes).peekable();
         650  +
                ::aws_smithy_json::deserialize::token::expect_document(&mut tokens).expect("well formed json")
         651  +
            }),
         652  +
            default_null_document: self.default_null_document,
         653  +
            default_timestamp: self
         654  +
                .default_timestamp
         655  +
                .unwrap_or_else(|| ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)),
         656  +
            default_blob: self.default_blob.unwrap_or_else(|| ::aws_smithy_types::Blob::new("abc")),
         657  +
            default_byte: self.default_byte.unwrap_or(1),
         658  +
            default_short: self.default_short.unwrap_or(1),
         659  +
            default_integer: self.default_integer.unwrap_or(10),
         660  +
            default_long: self.default_long.unwrap_or(100),
         661  +
            default_float: self.default_float.unwrap_or(1.0_f32),
         662  +
            default_double: self.default_double.unwrap_or(1.0_f64),
         663  +
            default_map: self.default_map.unwrap_or_default(),
         664  +
            default_enum: self
         665  +
                .default_enum
         666  +
                .unwrap_or("FOO".parse::<crate::types::TestEnum>().expect("static value validated to member")),
         667  +
            default_int_enum: self.default_int_enum.unwrap_or(1),
         668  +
            empty_string: self.empty_string.unwrap_or_default(),
         669  +
            false_boolean: self.false_boolean.unwrap_or_default(),
         670  +
            empty_blob: self.empty_blob.unwrap_or_default(),
         671  +
            zero_byte: self.zero_byte.unwrap_or_default(),
         672  +
            zero_short: self.zero_short.unwrap_or_default(),
         673  +
            zero_integer: self.zero_integer.unwrap_or_default(),
         674  +
            zero_long: self.zero_long.unwrap_or_default(),
         675  +
            zero_float: self.zero_float.unwrap_or(0.0_f32),
         676  +
            zero_double: self.zero_double.unwrap_or(0.0_f64),
         677  +
        }
         678  +
    }
         679  +
}