Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_update_time_to_live_input.rs

@@ -1,1 +16,28 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_update_time_to_live_input_input(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::operation::update_time_to_live::UpdateTimeToLiveInput,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.table_name {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("TableName").string(var_1.as_str());
          11  +
        /* JsonSerializerGenerator.kt:382 */
    8     12   
    }
          13  +
    /* JsonSerializerGenerator.kt:382 */
    9     14   
    if let Some(var_2) = &input.time_to_live_specification {
          15  +
        /* JsonSerializerGenerator.kt:495 */
   10     16   
        #[allow(unused_mut)]
          17  +
        /* JsonSerializerGenerator.kt:496 */
   11     18   
        let mut object_3 = object.key("TimeToLiveSpecification").start_object();
          19  +
        /* JsonSerializerGenerator.kt:375 */
   12     20   
        crate::protocol_serde::shape_time_to_live_specification::ser_time_to_live_specification(&mut object_3, var_2)?;
          21  +
        /* JsonSerializerGenerator.kt:515 */
   13     22   
        object_3.finish();
          23  +
        /* JsonSerializerGenerator.kt:382 */
   14     24   
    }
          25  +
    /* JsonSerializerGenerator.kt:372 */
   15     26   
    Ok(())
          27  +
    /* JsonSerializerGenerator.kt:358 */
   16     28   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_write_request.rs

@@ -1,1 +58,106 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_write_request(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::types::WriteRequest,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:382 */
    6      8   
    if let Some(var_1) = &input.put_request {
           9  +
        /* JsonSerializerGenerator.kt:495 */
    7     10   
        #[allow(unused_mut)]
          11  +
        /* JsonSerializerGenerator.kt:496 */
    8     12   
        let mut object_2 = object.key("PutRequest").start_object();
          13  +
        /* JsonSerializerGenerator.kt:375 */
    9     14   
        crate::protocol_serde::shape_put_request::ser_put_request(&mut object_2, var_1)?;
          15  +
        /* JsonSerializerGenerator.kt:515 */
   10     16   
        object_2.finish();
          17  +
        /* JsonSerializerGenerator.kt:382 */
   11     18   
    }
          19  +
    /* JsonSerializerGenerator.kt:382 */
   12     20   
    if let Some(var_3) = &input.delete_request {
          21  +
        /* JsonSerializerGenerator.kt:495 */
   13     22   
        #[allow(unused_mut)]
          23  +
        /* JsonSerializerGenerator.kt:496 */
   14     24   
        let mut object_4 = object.key("DeleteRequest").start_object();
          25  +
        /* JsonSerializerGenerator.kt:375 */
   15     26   
        crate::protocol_serde::shape_delete_request::ser_delete_request(&mut object_4, var_3)?;
          27  +
        /* JsonSerializerGenerator.kt:515 */
   16     28   
        object_4.finish();
          29  +
        /* JsonSerializerGenerator.kt:382 */
   17     30   
    }
          31  +
    /* JsonSerializerGenerator.kt:372 */
   18     32   
    Ok(())
          33  +
    /* JsonSerializerGenerator.kt:358 */
   19     34   
}
   20     35   
          36  +
/* JsonParserGenerator.kt:516 */
   21     37   
pub(crate) fn de_write_request<'a, I>(
   22     38   
    tokens: &mut ::std::iter::Peekable<I>,
   23     39   
) -> ::std::result::Result<Option<crate::types::WriteRequest>, ::aws_smithy_json::deserialize::error::DeserializeError>
   24     40   
where
   25     41   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   26     42   
{
          43  +
    /* JsonParserGenerator.kt:712 */
   27     44   
    match tokens.next().transpose()? {
   28         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          45  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   29     46   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          47  +
            /* RustType.kt:516 */
   30     48   
            #[allow(unused_mut)]
          49  +
            /* JsonParserGenerator.kt:526 */
   31     50   
            let mut builder = crate::types::builders::WriteRequestBuilder::default();
          51  +
            /* JsonParserGenerator.kt:684 */
   32     52   
            loop {
          53  +
                /* JsonParserGenerator.kt:685 */
   33     54   
                match tokens.next().transpose()? {
   34         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   35         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
          55  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          56  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          57  +
                        /* JsonParserGenerator.kt:260 */
          58  +
                        match key.to_unescaped()?.as_ref() {
          59  +
                            /* JsonParserGenerator.kt:262 */
   36     60   
                            "PutRequest" => {
   37         -
                            builder = builder.set_put_request(crate::protocol_serde::shape_put_request::de_put_request(tokens)?);
          61  +
                                /* JsonParserGenerator.kt:265 */
          62  +
                                builder = builder.set_put_request(
          63  +
                                    /* JsonParserGenerator.kt:544 */
          64  +
                                    crate::protocol_serde::shape_put_request::de_put_request(tokens)?, /* JsonParserGenerator.kt:265 */
          65  +
                                );
          66  +
                                /* JsonParserGenerator.kt:262 */
   38     67   
                            }
          68  +
                            /* JsonParserGenerator.kt:262 */
   39     69   
                            "DeleteRequest" => {
   40         -
                            builder = builder.set_delete_request(crate::protocol_serde::shape_delete_request::de_delete_request(tokens)?);
          70  +
                                /* JsonParserGenerator.kt:265 */
          71  +
                                builder = builder.set_delete_request(
          72  +
                                    /* JsonParserGenerator.kt:544 */
          73  +
                                    crate::protocol_serde::shape_delete_request::de_delete_request(tokens)?, /* JsonParserGenerator.kt:265 */
          74  +
                                );
          75  +
                                /* JsonParserGenerator.kt:262 */
   41     76   
                            }
   42         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   43         -
                    },
          77  +
                            /* JsonParserGenerator.kt:290 */
          78  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
          79  +
                        }
          80  +
                        /* JsonParserGenerator.kt:686 */
          81  +
                    }
          82  +
                    /* JsonParserGenerator.kt:695 */
   44     83   
                    other => {
   45     84   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   46     85   
                            "expected object key or end object, found: {:?}",
   47     86   
                            other
   48     87   
                        )))
          88  +
                    } /* JsonParserGenerator.kt:685 */
   49     89   
                }
          90  +
                /* JsonParserGenerator.kt:684 */
   50     91   
            }
   51         -
            }
          92  +
            /* JsonParserGenerator.kt:540 */
   52     93   
            Ok(Some(builder.build()))
          94  +
            /* JsonParserGenerator.kt:713 */
   53     95   
        }
   54         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          96  +
        /* JsonParserGenerator.kt:722 */
          97  +
        _ => {
          98  +
            /* JsonParserGenerator.kt:723 */
          99  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   55    100   
                "expected start object or null",
   56         -
        )),
         101  +
            ))
         102  +
            /* JsonParserGenerator.kt:722 */
         103  +
        } /* JsonParserGenerator.kt:712 */
   57    104   
    }
         105  +
    /* JsonParserGenerator.kt:516 */
   58    106   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/protocol_serde/shape_write_requests.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_write_requests<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::WriteRequest>>, ::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_write_request::de_write_request(tokens)?;
          28  +
                        /* JsonParserGenerator.kt:419 */
          29  +
                        let value =
          30  +
                            /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_write_request::de_write_request(tokens)?
          31  +
                        /* JsonParserGenerator.kt:419 */;
          32  +
                        /* JsonParserGenerator.kt:422 */
   20     33   
                        if let Some(value) = value {
   21     34   
                            items.push(value);
   22     35   
                        }
          36  +
                        /* JsonParserGenerator.kt:413 */
          37  +
                    } /* JsonParserGenerator.kt:409 */
   23     38   
                }
          39  +
                /* JsonParserGenerator.kt:408 */
   24     40   
            }
   25         -
            }
          41  +
            /* JsonParserGenerator.kt:446 */
   26     42   
            Ok(Some(items))
          43  +
            /* JsonParserGenerator.kt:713 */
   27     44   
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          45  +
        /* JsonParserGenerator.kt:722 */
          46  +
        _ => {
          47  +
            /* JsonParserGenerator.kt:723 */
          48  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29     49   
                "expected start array or null",
   30         -
        )),
          50  +
            ))
          51  +
            /* JsonParserGenerator.kt:722 */
          52  +
        } /* JsonParserGenerator.kt:712 */
   31     53   
    }
          54  +
    /* JsonParserGenerator.kt:398 */
   32     55   
}

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

@@ -1,1 +204,222 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ErrorCorrection.kt:126 */
    2      3   
pub(crate) fn describe_endpoints_output_output_correct_errors(
    3      4   
    mut builder: crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder,
    4      5   
) -> crate::operation::describe_endpoints::builders::DescribeEndpointsOutputBuilder {
    5      6   
    if builder.endpoints.is_none() {
    6      7   
        builder.endpoints = Some(Default::default())
    7      8   
    }
    8      9   
    builder
    9     10   
}
   10     11   
          12  +
/* ErrorCorrection.kt:126 */
   11     13   
pub(crate) fn backup_details_correct_errors(
   12     14   
    mut builder: crate::types::builders::BackupDetailsBuilder,
   13     15   
) -> crate::types::builders::BackupDetailsBuilder {
   14     16   
    if builder.backup_arn.is_none() {
   15     17   
        builder.backup_arn = Some(Default::default())
   16     18   
    }
   17     19   
    if builder.backup_name.is_none() {
   18     20   
        builder.backup_name = Some(Default::default())
   19     21   
    }
   20     22   
    if builder.backup_status.is_none() {
   21     23   
        builder.backup_status = "no value was set".parse::<crate::types::BackupStatus>().ok()
   22     24   
    }
   23     25   
    if builder.backup_type.is_none() {
   24     26   
        builder.backup_type = "no value was set".parse::<crate::types::BackupType>().ok()
   25     27   
    }
   26     28   
    if builder.backup_creation_date_time.is_none() {
   27     29   
        builder.backup_creation_date_time = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
   28     30   
    }
   29     31   
    builder
   30     32   
}
   31     33   
          34  +
/* ErrorCorrection.kt:126 */
   32     35   
pub(crate) fn continuous_backups_description_correct_errors(
   33     36   
    mut builder: crate::types::builders::ContinuousBackupsDescriptionBuilder,
   34     37   
) -> crate::types::builders::ContinuousBackupsDescriptionBuilder {
   35     38   
    if builder.continuous_backups_status.is_none() {
   36     39   
        builder.continuous_backups_status = "no value was set".parse::<crate::types::ContinuousBackupsStatus>().ok()
   37     40   
    }
   38     41   
    builder
   39     42   
}
   40     43   
          44  +
/* ErrorCorrection.kt:126 */
   41     45   
pub(crate) fn time_to_live_specification_correct_errors(
   42     46   
    mut builder: crate::types::builders::TimeToLiveSpecificationBuilder,
   43     47   
) -> crate::types::builders::TimeToLiveSpecificationBuilder {
   44     48   
    if builder.enabled.is_none() {
   45     49   
        builder.enabled = Some(Default::default())
   46     50   
    }
   47     51   
    if builder.attribute_name.is_none() {
   48     52   
        builder.attribute_name = Some(Default::default())
   49     53   
    }
   50     54   
    builder
   51     55   
}
   52     56   
          57  +
/* ErrorCorrection.kt:126 */
   53     58   
pub(crate) fn endpoint_correct_errors(mut builder: crate::types::builders::EndpointBuilder) -> crate::types::builders::EndpointBuilder {
   54     59   
    if builder.address.is_none() {
   55     60   
        builder.address = Some(Default::default())
   56     61   
    }
   57     62   
    if builder.cache_period_in_minutes.is_none() {
   58     63   
        builder.cache_period_in_minutes = Some(Default::default())
   59     64   
    }
   60     65   
    builder
   61     66   
}
   62     67   
          68  +
/* ErrorCorrection.kt:126 */
   63     69   
pub(crate) fn keys_and_attributes_correct_errors(
   64     70   
    mut builder: crate::types::builders::KeysAndAttributesBuilder,
   65     71   
) -> crate::types::builders::KeysAndAttributesBuilder {
   66     72   
    if builder.keys.is_none() {
   67     73   
        builder.keys = Some(Default::default())
   68     74   
    }
   69     75   
    builder
   70     76   
}
   71     77   
          78  +
/* ErrorCorrection.kt:126 */
   72     79   
pub(crate) fn replica_settings_description_correct_errors(
   73     80   
    mut builder: crate::types::builders::ReplicaSettingsDescriptionBuilder,
   74     81   
) -> crate::types::builders::ReplicaSettingsDescriptionBuilder {
   75     82   
    if builder.region_name.is_none() {
   76     83   
        builder.region_name = Some(Default::default())
   77     84   
    }
   78     85   
    builder
   79     86   
}
   80     87   
          88  +
/* ErrorCorrection.kt:126 */
   81     89   
pub(crate) fn restore_summary_correct_errors(
   82     90   
    mut builder: crate::types::builders::RestoreSummaryBuilder,
   83     91   
) -> crate::types::builders::RestoreSummaryBuilder {
   84     92   
    if builder.restore_date_time.is_none() {
   85     93   
        builder.restore_date_time = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
   86     94   
    }
   87     95   
    if builder.restore_in_progress.is_none() {
   88     96   
        builder.restore_in_progress = Some(Default::default())
   89     97   
    }
   90     98   
    builder
   91     99   
}
   92    100   
         101  +
/* ErrorCorrection.kt:126 */
   93    102   
pub(crate) fn source_table_details_correct_errors(
   94    103   
    mut builder: crate::types::builders::SourceTableDetailsBuilder,
   95    104   
) -> crate::types::builders::SourceTableDetailsBuilder {
   96    105   
    if builder.table_name.is_none() {
   97    106   
        builder.table_name = Some(Default::default())
   98    107   
    }
   99    108   
    if builder.table_id.is_none() {
  100    109   
        builder.table_id = Some(Default::default())
  101    110   
    }
  102    111   
    if builder.key_schema.is_none() {
  103    112   
        builder.key_schema = Some(Default::default())
  104    113   
    }
  105    114   
    if builder.table_creation_date_time.is_none() {
  106    115   
        builder.table_creation_date_time = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
  107    116   
    }
  108    117   
    if builder.provisioned_throughput.is_none() {
  109    118   
        builder.provisioned_throughput = {
  110    119   
            let builder = crate::types::builders::ProvisionedThroughputBuilder::default();
  111    120   
            crate::serde_util::provisioned_throughput_correct_errors(builder).build().ok()
  112    121   
        }
  113    122   
    }
  114    123   
    builder
  115    124   
}
  116    125   
         126  +
/* ErrorCorrection.kt:126 */
  117    127   
pub(crate) fn stream_specification_correct_errors(
  118    128   
    mut builder: crate::types::builders::StreamSpecificationBuilder,
  119    129   
) -> crate::types::builders::StreamSpecificationBuilder {
  120    130   
    if builder.stream_enabled.is_none() {
  121    131   
        builder.stream_enabled = Some(Default::default())
  122    132   
    }
  123    133   
    builder
  124    134   
}
  125    135   
         136  +
/* ErrorCorrection.kt:126 */
  126    137   
pub(crate) fn tag_correct_errors(mut builder: crate::types::builders::TagBuilder) -> crate::types::builders::TagBuilder {
  127    138   
    if builder.key.is_none() {
  128    139   
        builder.key = Some(Default::default())
  129    140   
    }
  130    141   
    if builder.value.is_none() {
  131    142   
        builder.value = Some(Default::default())
  132    143   
    }
  133    144   
    builder
  134    145   
}
  135    146   
         147  +
/* ErrorCorrection.kt:126 */
  136    148   
pub(crate) fn attribute_definition_correct_errors(
  137    149   
    mut builder: crate::types::builders::AttributeDefinitionBuilder,
  138    150   
) -> crate::types::builders::AttributeDefinitionBuilder {
  139    151   
    if builder.attribute_name.is_none() {
  140    152   
        builder.attribute_name = Some(Default::default())
  141    153   
    }
  142    154   
    if builder.attribute_type.is_none() {
  143    155   
        builder.attribute_type = "no value was set".parse::<crate::types::ScalarAttributeType>().ok()
  144    156   
    }
  145    157   
    builder
  146    158   
}
  147    159   
         160  +
/* ErrorCorrection.kt:126 */
  148    161   
pub(crate) fn key_schema_element_correct_errors(
  149    162   
    mut builder: crate::types::builders::KeySchemaElementBuilder,
  150    163   
) -> crate::types::builders::KeySchemaElementBuilder {
  151    164   
    if builder.attribute_name.is_none() {
  152    165   
        builder.attribute_name = Some(Default::default())
  153    166   
    }
  154    167   
    if builder.key_type.is_none() {
  155    168   
        builder.key_type = "no value was set".parse::<crate::types::KeyType>().ok()
  156    169   
    }
  157    170   
    builder
  158    171   
}
  159    172   
         173  +
/* ErrorCorrection.kt:126 */
  160    174   
pub(crate) fn provisioned_throughput_correct_errors(
  161    175   
    mut builder: crate::types::builders::ProvisionedThroughputBuilder,
  162    176   
) -> crate::types::builders::ProvisionedThroughputBuilder {
  163    177   
    if builder.read_capacity_units.is_none() {
  164    178   
        builder.read_capacity_units = Some(Default::default())
  165    179   
    }
  166    180   
    if builder.write_capacity_units.is_none() {
  167    181   
        builder.write_capacity_units = Some(Default::default())
  168    182   
    }
  169    183   
    builder
  170    184   
}
  171    185   
         186  +
/* ErrorCorrection.kt:126 */
  172    187   
pub(crate) fn delete_request_correct_errors(
  173    188   
    mut builder: crate::types::builders::DeleteRequestBuilder,
  174    189   
) -> crate::types::builders::DeleteRequestBuilder {
  175    190   
    if builder.key.is_none() {
  176    191   
        builder.key = Some(Default::default())
  177    192   
    }
  178    193   
    builder
  179    194   
}
  180    195   
         196  +
/* ErrorCorrection.kt:126 */
  181    197   
pub(crate) fn put_request_correct_errors(mut builder: crate::types::builders::PutRequestBuilder) -> crate::types::builders::PutRequestBuilder {
  182    198   
    if builder.item.is_none() {
  183    199   
        builder.item = Some(Default::default())
  184    200   
    }
  185    201   
    builder
  186    202   
}
  187    203   
         204  +
/* ErrorCorrection.kt:126 */
  188    205   
pub(crate) fn replica_global_secondary_index_settings_description_correct_errors(
  189    206   
    mut builder: crate::types::builders::ReplicaGlobalSecondaryIndexSettingsDescriptionBuilder,
  190    207   
) -> crate::types::builders::ReplicaGlobalSecondaryIndexSettingsDescriptionBuilder {
  191    208   
    if builder.index_name.is_none() {
  192    209   
        builder.index_name = Some(Default::default())
  193    210   
    }
  194    211   
    builder
  195    212   
}
  196    213   
         214  +
/* ErrorCorrection.kt:126 */
  197    215   
pub(crate) fn auto_scaling_target_tracking_scaling_policy_configuration_description_correct_errors(
  198    216   
    mut builder: crate::types::builders::AutoScalingTargetTrackingScalingPolicyConfigurationDescriptionBuilder,
  199    217   
) -> crate::types::builders::AutoScalingTargetTrackingScalingPolicyConfigurationDescriptionBuilder {
  200    218   
    if builder.target_value.is_none() {
  201    219   
        builder.target_value = Some(Default::default())
  202    220   
    }
  203    221   
    builder
  204    222   
}

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

@@ -1,1 +510,762 @@
    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::_time_to_live_specification::TimeToLiveSpecification;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_table_auto_scaling_description::TableAutoScalingDescription;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_replica_auto_scaling_description::ReplicaAutoScalingDescription;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::_replica_status::ReplicaStatus;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::_auto_scaling_settings_description::AutoScalingSettingsDescription;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::_auto_scaling_policy_description::AutoScalingPolicyDescription;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::_auto_scaling_target_tracking_scaling_policy_configuration_description::AutoScalingTargetTrackingScalingPolicyConfigurationDescription;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::_replica_global_secondary_index_auto_scaling_description::ReplicaGlobalSecondaryIndexAutoScalingDescription;
   17     25   
          26  +
/* CodegenDelegator.kt:255 */
   18     27   
pub use crate::types::_index_status::IndexStatus;
   19     28   
          29  +
/* CodegenDelegator.kt:255 */
   20     30   
pub use crate::types::_table_status::TableStatus;
   21     31   
          32  +
/* CodegenDelegator.kt:255 */
   22     33   
pub use crate::types::_replica_auto_scaling_update::ReplicaAutoScalingUpdate;
   23     34   
          35  +
/* CodegenDelegator.kt:255 */
   24     36   
pub use crate::types::_auto_scaling_settings_update::AutoScalingSettingsUpdate;
   25     37   
          38  +
/* CodegenDelegator.kt:255 */
   26     39   
pub use crate::types::_auto_scaling_policy_update::AutoScalingPolicyUpdate;
   27     40   
          41  +
/* CodegenDelegator.kt:255 */
   28     42   
pub use crate::types::_auto_scaling_target_tracking_scaling_policy_configuration_update::AutoScalingTargetTrackingScalingPolicyConfigurationUpdate;
   29     43   
          44  +
/* CodegenDelegator.kt:255 */
   30     45   
pub use crate::types::_replica_global_secondary_index_auto_scaling_update::ReplicaGlobalSecondaryIndexAutoScalingUpdate;
   31     46   
          47  +
/* CodegenDelegator.kt:255 */
   32     48   
pub use crate::types::_global_secondary_index_auto_scaling_update::GlobalSecondaryIndexAutoScalingUpdate;
   33     49   
          50  +
/* CodegenDelegator.kt:255 */
   34     51   
pub use crate::types::_table_description::TableDescription;
   35     52   
          53  +
/* CodegenDelegator.kt:255 */
   36     54   
pub use crate::types::_archival_summary::ArchivalSummary;
   37     55   
          56  +
/* CodegenDelegator.kt:255 */
   38     57   
pub use crate::types::_sse_description::SseDescription;
   39     58   
          59  +
/* CodegenDelegator.kt:255 */
   40     60   
pub use crate::types::_sse_type::SseType;
   41     61   
          62  +
/* CodegenDelegator.kt:255 */
   42     63   
pub use crate::types::_sse_status::SseStatus;
   43     64   
          65  +
/* CodegenDelegator.kt:255 */
   44     66   
pub use crate::types::_restore_summary::RestoreSummary;
   45     67   
          68  +
/* CodegenDelegator.kt:255 */
   46     69   
pub use crate::types::_replica_description::ReplicaDescription;
   47     70   
          71  +
/* CodegenDelegator.kt:255 */
   48     72   
pub use crate::types::_replica_global_secondary_index_description::ReplicaGlobalSecondaryIndexDescription;
   49     73   
          74  +
/* CodegenDelegator.kt:255 */
   50     75   
pub use crate::types::_provisioned_throughput_override::ProvisionedThroughputOverride;
   51     76   
          77  +
/* CodegenDelegator.kt:255 */
   52     78   
pub use crate::types::_stream_specification::StreamSpecification;
   53     79   
          80  +
/* CodegenDelegator.kt:255 */
   54     81   
pub use crate::types::_stream_view_type::StreamViewType;
   55     82   
          83  +
/* CodegenDelegator.kt:255 */
   56     84   
pub use crate::types::_global_secondary_index_description::GlobalSecondaryIndexDescription;
   57     85   
          86  +
/* CodegenDelegator.kt:255 */
   58     87   
pub use crate::types::_provisioned_throughput_description::ProvisionedThroughputDescription;
   59     88   
          89  +
/* CodegenDelegator.kt:255 */
   60     90   
pub use crate::types::_projection::Projection;
   61     91   
          92  +
/* CodegenDelegator.kt:255 */
   62     93   
pub use crate::types::_projection_type::ProjectionType;
   63     94   
          95  +
/* CodegenDelegator.kt:255 */
   64     96   
pub use crate::types::_key_schema_element::KeySchemaElement;
   65     97   
          98  +
/* CodegenDelegator.kt:255 */
   66     99   
pub use crate::types::_key_type::KeyType;
   67    100   
         101  +
/* CodegenDelegator.kt:255 */
   68    102   
pub use crate::types::_local_secondary_index_description::LocalSecondaryIndexDescription;
   69    103   
         104  +
/* CodegenDelegator.kt:255 */
   70    105   
pub use crate::types::_billing_mode_summary::BillingModeSummary;
   71    106   
         107  +
/* CodegenDelegator.kt:255 */
   72    108   
pub use crate::types::_billing_mode::BillingMode;
   73    109   
         110  +
/* CodegenDelegator.kt:255 */
   74    111   
pub use crate::types::_attribute_definition::AttributeDefinition;
   75    112   
         113  +
/* CodegenDelegator.kt:255 */
   76    114   
pub use crate::types::_scalar_attribute_type::ScalarAttributeType;
   77    115   
         116  +
/* CodegenDelegator.kt:255 */
   78    117   
pub use crate::types::_replication_group_update::ReplicationGroupUpdate;
   79    118   
         119  +
/* CodegenDelegator.kt:255 */
   80    120   
pub use crate::types::_delete_replication_group_member_action::DeleteReplicationGroupMemberAction;
   81    121   
         122  +
/* CodegenDelegator.kt:255 */
   82    123   
pub use crate::types::_update_replication_group_member_action::UpdateReplicationGroupMemberAction;
   83    124   
         125  +
/* CodegenDelegator.kt:255 */
   84    126   
pub use crate::types::_replica_global_secondary_index::ReplicaGlobalSecondaryIndex;
   85    127   
         128  +
/* CodegenDelegator.kt:255 */
   86    129   
pub use crate::types::_create_replication_group_member_action::CreateReplicationGroupMemberAction;
   87    130   
         131  +
/* CodegenDelegator.kt:255 */
   88    132   
pub use crate::types::_sse_specification::SseSpecification;
   89    133   
         134  +
/* CodegenDelegator.kt:255 */
   90    135   
pub use crate::types::_global_secondary_index_update::GlobalSecondaryIndexUpdate;
   91    136   
         137  +
/* CodegenDelegator.kt:255 */
   92    138   
pub use crate::types::_delete_global_secondary_index_action::DeleteGlobalSecondaryIndexAction;
   93    139   
         140  +
/* CodegenDelegator.kt:255 */
   94    141   
pub use crate::types::_create_global_secondary_index_action::CreateGlobalSecondaryIndexAction;
   95    142   
         143  +
/* CodegenDelegator.kt:255 */
   96    144   
pub use crate::types::_provisioned_throughput::ProvisionedThroughput;
   97    145   
         146  +
/* CodegenDelegator.kt:255 */
   98    147   
pub use crate::types::_update_global_secondary_index_action::UpdateGlobalSecondaryIndexAction;
   99    148   
         149  +
/* CodegenDelegator.kt:255 */
  100    150   
pub use crate::types::_item_collection_metrics::ItemCollectionMetrics;
  101    151   
         152  +
/* CodegenDelegator.kt:255 */
  102    153   
pub use crate::types::_attribute_value::AttributeValue;
  103    154   
         155  +
/* CodegenDelegator.kt:255 */
  104    156   
pub use crate::types::_consumed_capacity::ConsumedCapacity;
  105    157   
         158  +
/* CodegenDelegator.kt:255 */
  106    159   
pub use crate::types::_capacity::Capacity;
  107    160   
         161  +
/* CodegenDelegator.kt:255 */
  108    162   
pub use crate::types::_return_item_collection_metrics::ReturnItemCollectionMetrics;
  109    163   
         164  +
/* CodegenDelegator.kt:255 */
  110    165   
pub use crate::types::_return_consumed_capacity::ReturnConsumedCapacity;
  111    166   
         167  +
/* CodegenDelegator.kt:255 */
  112    168   
pub use crate::types::_return_value::ReturnValue;
  113    169   
         170  +
/* CodegenDelegator.kt:255 */
  114    171   
pub use crate::types::_conditional_operator::ConditionalOperator;
  115    172   
         173  +
/* CodegenDelegator.kt:255 */
  116    174   
pub use crate::types::_expected_attribute_value::ExpectedAttributeValue;
  117    175   
         176  +
/* CodegenDelegator.kt:255 */
  118    177   
pub use crate::types::_comparison_operator::ComparisonOperator;
  119    178   
         179  +
/* CodegenDelegator.kt:255 */
  120    180   
pub use crate::types::_attribute_value_update::AttributeValueUpdate;
  121    181   
         182  +
/* CodegenDelegator.kt:255 */
  122    183   
pub use crate::types::_attribute_action::AttributeAction;
  123    184   
         185  +
/* CodegenDelegator.kt:255 */
  124    186   
pub use crate::types::_replica_settings_description::ReplicaSettingsDescription;
  125    187   
         188  +
/* CodegenDelegator.kt:255 */
  126    189   
pub use crate::types::_replica_global_secondary_index_settings_description::ReplicaGlobalSecondaryIndexSettingsDescription;
  127    190   
         191  +
/* CodegenDelegator.kt:255 */
  128    192   
pub use crate::types::_replica_settings_update::ReplicaSettingsUpdate;
  129    193   
         194  +
/* CodegenDelegator.kt:255 */
  130    195   
pub use crate::types::_replica_global_secondary_index_settings_update::ReplicaGlobalSecondaryIndexSettingsUpdate;
  131    196   
         197  +
/* CodegenDelegator.kt:255 */
  132    198   
pub use crate::types::_global_table_global_secondary_index_settings_update::GlobalTableGlobalSecondaryIndexSettingsUpdate;
  133    199   
         200  +
/* CodegenDelegator.kt:255 */
  134    201   
pub use crate::types::_global_table_description::GlobalTableDescription;
  135    202   
         203  +
/* CodegenDelegator.kt:255 */
  136    204   
pub use crate::types::_global_table_status::GlobalTableStatus;
  137    205   
         206  +
/* CodegenDelegator.kt:255 */
  138    207   
pub use crate::types::_replica_update::ReplicaUpdate;
  139    208   
         209  +
/* CodegenDelegator.kt:255 */
  140    210   
pub use crate::types::_delete_replica_action::DeleteReplicaAction;
  141    211   
         212  +
/* CodegenDelegator.kt:255 */
  142    213   
pub use crate::types::_create_replica_action::CreateReplicaAction;
  143    214   
         215  +
/* CodegenDelegator.kt:255 */
  144    216   
pub use crate::types::_contributor_insights_status::ContributorInsightsStatus;
  145    217   
         218  +
/* CodegenDelegator.kt:255 */
  146    219   
pub use crate::types::_contributor_insights_action::ContributorInsightsAction;
  147    220   
         221  +
/* CodegenDelegator.kt:255 */
  148    222   
pub use crate::types::_continuous_backups_description::ContinuousBackupsDescription;
  149    223   
         224  +
/* CodegenDelegator.kt:255 */
  150    225   
pub use crate::types::_point_in_time_recovery_description::PointInTimeRecoveryDescription;
  151    226   
         227  +
/* CodegenDelegator.kt:255 */
  152    228   
pub use crate::types::_point_in_time_recovery_status::PointInTimeRecoveryStatus;
  153    229   
         230  +
/* CodegenDelegator.kt:255 */
  154    231   
pub use crate::types::_continuous_backups_status::ContinuousBackupsStatus;
  155    232   
         233  +
/* CodegenDelegator.kt:255 */
  156    234   
pub use crate::types::_point_in_time_recovery_specification::PointInTimeRecoverySpecification;
  157    235   
         236  +
/* CodegenDelegator.kt:255 */
  158    237   
pub use crate::types::_cancellation_reason::CancellationReason;
  159    238   
         239  +
/* CodegenDelegator.kt:255 */
  160    240   
pub use crate::types::_transact_write_item::TransactWriteItem;
  161    241   
         242  +
/* CodegenDelegator.kt:255 */
  162    243   
pub use crate::types::_update::Update;
  163    244   
         245  +
/* CodegenDelegator.kt:255 */
  164    246   
pub use crate::types::_return_values_on_condition_check_failure::ReturnValuesOnConditionCheckFailure;
  165    247   
         248  +
/* CodegenDelegator.kt:255 */
  166    249   
pub use crate::types::_delete::Delete;
  167    250   
         251  +
/* CodegenDelegator.kt:255 */
  168    252   
pub use crate::types::_put::Put;
  169    253   
         254  +
/* CodegenDelegator.kt:255 */
  170    255   
pub use crate::types::_condition_check::ConditionCheck;
  171    256   
         257  +
/* CodegenDelegator.kt:255 */
  172    258   
pub use crate::types::_item_response::ItemResponse;
  173    259   
         260  +
/* CodegenDelegator.kt:255 */
  174    261   
pub use crate::types::_transact_get_item::TransactGetItem;
  175    262   
         263  +
/* CodegenDelegator.kt:255 */
  176    264   
pub use crate::types::_get::Get;
  177    265   
         266  +
/* CodegenDelegator.kt:255 */
  178    267   
pub use crate::types::_tag::Tag;
  179    268   
         269  +
/* CodegenDelegator.kt:255 */
  180    270   
pub use crate::types::_condition::Condition;
  181    271   
         272  +
/* CodegenDelegator.kt:255 */
  182    273   
pub use crate::types::_select::Select;
  183    274   
         275  +
/* CodegenDelegator.kt:255 */
  184    276   
pub use crate::types::_local_secondary_index::LocalSecondaryIndex;
  185    277   
         278  +
/* CodegenDelegator.kt:255 */
  186    279   
pub use crate::types::_global_secondary_index::GlobalSecondaryIndex;
  187    280   
         281  +
/* CodegenDelegator.kt:255 */
  188    282   
pub use crate::types::_global_table::GlobalTable;
  189    283   
         284  +
/* CodegenDelegator.kt:255 */
  190    285   
pub use crate::types::_replica::Replica;
  191    286   
         287  +
/* CodegenDelegator.kt:255 */
  192    288   
pub use crate::types::_export_summary::ExportSummary;
  193    289   
         290  +
/* CodegenDelegator.kt:255 */
  194    291   
pub use crate::types::_export_status::ExportStatus;
  195    292   
         293  +
/* CodegenDelegator.kt:255 */
  196    294   
pub use crate::types::_contributor_insights_summary::ContributorInsightsSummary;
  197    295   
         296  +
/* CodegenDelegator.kt:255 */
  198    297   
pub use crate::types::_backup_summary::BackupSummary;
  199    298   
         299  +
/* CodegenDelegator.kt:255 */
  200    300   
pub use crate::types::_backup_type::BackupType;
  201    301   
         302  +
/* CodegenDelegator.kt:255 */
  202    303   
pub use crate::types::_backup_status::BackupStatus;
  203    304   
         305  +
/* CodegenDelegator.kt:255 */
  204    306   
pub use crate::types::_backup_type_filter::BackupTypeFilter;
  205    307   
         308  +
/* CodegenDelegator.kt:255 */
  206    309   
pub use crate::types::_export_description::ExportDescription;
  207    310   
         311  +
/* CodegenDelegator.kt:255 */
  208    312   
pub use crate::types::_export_format::ExportFormat;
  209    313   
         314  +
/* CodegenDelegator.kt:255 */
  210    315   
pub use crate::types::_s3_sse_algorithm::S3SseAlgorithm;
  211    316   
         317  +
/* CodegenDelegator.kt:255 */
  212    318   
pub use crate::types::_parameterized_statement::ParameterizedStatement;
  213    319   
         320  +
/* CodegenDelegator.kt:255 */
  214    321   
pub use crate::types::_destination_status::DestinationStatus;
  215    322   
         323  +
/* CodegenDelegator.kt:255 */
  216    324   
pub use crate::types::_time_to_live_description::TimeToLiveDescription;
  217    325   
         326  +
/* CodegenDelegator.kt:255 */
  218    327   
pub use crate::types::_time_to_live_status::TimeToLiveStatus;
  219    328   
         329  +
/* CodegenDelegator.kt:255 */
  220    330   
pub use crate::types::_kinesis_data_stream_destination::KinesisDataStreamDestination;
  221    331   
         332  +
/* CodegenDelegator.kt:255 */
  222    333   
pub use crate::types::_endpoint::Endpoint;
  223    334   
         335  +
/* CodegenDelegator.kt:255 */
  224    336   
pub use crate::types::_failure_exception::FailureException;
  225    337   
         338  +
/* CodegenDelegator.kt:255 */
  226    339   
pub use crate::types::_backup_description::BackupDescription;
  227    340   
         341  +
/* CodegenDelegator.kt:255 */
  228    342   
pub use crate::types::_source_table_feature_details::SourceTableFeatureDetails;
  229    343   
         344  +
/* CodegenDelegator.kt:255 */
  230    345   
pub use crate::types::_global_secondary_index_info::GlobalSecondaryIndexInfo;
  231    346   
         347  +
/* CodegenDelegator.kt:255 */
  232    348   
pub use crate::types::_local_secondary_index_info::LocalSecondaryIndexInfo;
  233    349   
         350  +
/* CodegenDelegator.kt:255 */
  234    351   
pub use crate::types::_source_table_details::SourceTableDetails;
  235    352   
         353  +
/* CodegenDelegator.kt:255 */
  236    354   
pub use crate::types::_backup_details::BackupDetails;
  237    355   
         356  +
/* CodegenDelegator.kt:255 */
  238    357   
pub use crate::types::_write_request::WriteRequest;
  239    358   
         359  +
/* CodegenDelegator.kt:255 */
  240    360   
pub use crate::types::_delete_request::DeleteRequest;
  241    361   
         362  +
/* CodegenDelegator.kt:255 */
  242    363   
pub use crate::types::_put_request::PutRequest;
  243    364   
         365  +
/* CodegenDelegator.kt:255 */
  244    366   
pub use crate::types::_keys_and_attributes::KeysAndAttributes;
  245    367   
         368  +
/* CodegenDelegator.kt:255 */
  246    369   
pub use crate::types::_batch_statement_response::BatchStatementResponse;
  247    370   
         371  +
/* CodegenDelegator.kt:255 */
  248    372   
pub use crate::types::_batch_statement_error::BatchStatementError;
  249    373   
         374  +
/* CodegenDelegator.kt:255 */
  250    375   
pub use crate::types::_batch_statement_error_code_enum::BatchStatementErrorCodeEnum;
  251    376   
         377  +
/* CodegenDelegator.kt:255 */
  252    378   
pub use crate::types::_batch_statement_request::BatchStatementRequest;
  253    379   
         380  +
/* RustModule.kt:172 */
  254    381   
mod _archival_summary;
  255    382   
         383  +
/* RustModule.kt:172 */
  256    384   
mod _attribute_action;
  257    385   
         386  +
/* RustModule.kt:172 */
  258    387   
mod _attribute_definition;
  259    388   
         389  +
/* RustModule.kt:172 */
  260    390   
mod _attribute_value;
  261    391   
         392  +
/* RustModule.kt:172 */
  262    393   
mod _attribute_value_update;
  263    394   
         395  +
/* RustModule.kt:172 */
  264    396   
mod _auto_scaling_policy_description;
  265    397   
         398  +
/* RustModule.kt:172 */
  266    399   
mod _auto_scaling_policy_update;
  267    400   
         401  +
/* RustModule.kt:172 */
  268    402   
mod _auto_scaling_settings_description;
  269    403   
         404  +
/* RustModule.kt:172 */
  270    405   
mod _auto_scaling_settings_update;
  271    406   
         407  +
/* RustModule.kt:172 */
  272    408   
mod _auto_scaling_target_tracking_scaling_policy_configuration_description;
  273    409   
         410  +
/* RustModule.kt:172 */
  274    411   
mod _auto_scaling_target_tracking_scaling_policy_configuration_update;
  275    412   
         413  +
/* RustModule.kt:172 */
  276    414   
mod _backup_description;
  277    415   
         416  +
/* RustModule.kt:172 */
  278    417   
mod _backup_details;
  279    418   
         419  +
/* RustModule.kt:172 */
  280    420   
mod _backup_status;
  281    421   
         422  +
/* RustModule.kt:172 */
  282    423   
mod _backup_summary;
  283    424   
         425  +
/* RustModule.kt:172 */
  284    426   
mod _backup_type;
  285    427   
         428  +
/* RustModule.kt:172 */
  286    429   
mod _backup_type_filter;
  287    430   
         431  +
/* RustModule.kt:172 */
  288    432   
mod _batch_statement_error;
  289    433   
         434  +
/* RustModule.kt:172 */
  290    435   
mod _batch_statement_error_code_enum;
  291    436   
         437  +
/* RustModule.kt:172 */
  292    438   
mod _batch_statement_request;
  293    439   
         440  +
/* RustModule.kt:172 */
  294    441   
mod _batch_statement_response;
  295    442   
         443  +
/* RustModule.kt:172 */
  296    444   
mod _billing_mode;
  297    445   
         446  +
/* RustModule.kt:172 */
  298    447   
mod _billing_mode_summary;
  299    448   
         449  +
/* RustModule.kt:172 */
  300    450   
mod _cancellation_reason;
  301    451   
         452  +
/* RustModule.kt:172 */
  302    453   
mod _capacity;
  303    454   
         455  +
/* RustModule.kt:172 */
  304    456   
mod _comparison_operator;
  305    457   
         458  +
/* RustModule.kt:172 */
  306    459   
mod _condition;
  307    460   
         461  +
/* RustModule.kt:172 */
  308    462   
mod _condition_check;
  309    463   
         464  +
/* RustModule.kt:172 */
  310    465   
mod _conditional_operator;
  311    466   
         467  +
/* RustModule.kt:172 */
  312    468   
mod _consumed_capacity;
  313    469   
         470  +
/* RustModule.kt:172 */
  314    471   
mod _continuous_backups_description;
  315    472   
         473  +
/* RustModule.kt:172 */
  316    474   
mod _continuous_backups_status;
  317    475   
         476  +
/* RustModule.kt:172 */
  318    477   
mod _contributor_insights_action;
  319    478   
         479  +
/* RustModule.kt:172 */
  320    480   
mod _contributor_insights_status;
  321    481   
         482  +
/* RustModule.kt:172 */
  322    483   
mod _contributor_insights_summary;
  323    484   
         485  +
/* RustModule.kt:172 */
  324    486   
mod _create_global_secondary_index_action;
  325    487   
         488  +
/* RustModule.kt:172 */
  326    489   
mod _create_replica_action;
  327    490   
         491  +
/* RustModule.kt:172 */
  328    492   
mod _create_replication_group_member_action;
  329    493   
         494  +
/* RustModule.kt:172 */
  330    495   
mod _delete;
  331    496   
         497  +
/* RustModule.kt:172 */
  332    498   
mod _delete_global_secondary_index_action;
  333    499   
         500  +
/* RustModule.kt:172 */
  334    501   
mod _delete_replica_action;
  335    502   
         503  +
/* RustModule.kt:172 */
  336    504   
mod _delete_replication_group_member_action;
  337    505   
         506  +
/* RustModule.kt:172 */
  338    507   
mod _delete_request;
  339    508   
         509  +
/* RustModule.kt:172 */
  340    510   
mod _destination_status;
  341    511   
         512  +
/* RustModule.kt:172 */
  342    513   
mod _endpoint;
  343    514   
         515  +
/* RustModule.kt:172 */
  344    516   
mod _expected_attribute_value;
  345    517   
         518  +
/* RustModule.kt:172 */
  346    519   
mod _export_description;
  347    520   
         521  +
/* RustModule.kt:172 */
  348    522   
mod _export_format;
  349    523   
         524  +
/* RustModule.kt:172 */
  350    525   
mod _export_status;
  351    526   
         527  +
/* RustModule.kt:172 */
  352    528   
mod _export_summary;
  353    529   
         530  +
/* RustModule.kt:172 */
  354    531   
mod _failure_exception;
  355    532   
         533  +
/* RustModule.kt:172 */
  356    534   
mod _get;
  357    535   
         536  +
/* RustModule.kt:172 */
  358    537   
mod _global_secondary_index;
  359    538   
         539  +
/* RustModule.kt:172 */
  360    540   
mod _global_secondary_index_auto_scaling_update;
  361    541   
         542  +
/* RustModule.kt:172 */
  362    543   
mod _global_secondary_index_description;
  363    544   
         545  +
/* RustModule.kt:172 */
  364    546   
mod _global_secondary_index_info;
  365    547   
         548  +
/* RustModule.kt:172 */
  366    549   
mod _global_secondary_index_update;
  367    550   
         551  +
/* RustModule.kt:172 */
  368    552   
mod _global_table;
  369    553   
         554  +
/* RustModule.kt:172 */
  370    555   
mod _global_table_description;
  371    556   
         557  +
/* RustModule.kt:172 */
  372    558   
mod _global_table_global_secondary_index_settings_update;
  373    559   
         560  +
/* RustModule.kt:172 */
  374    561   
mod _global_table_status;
  375    562   
         563  +
/* RustModule.kt:172 */
  376    564   
mod _index_status;
  377    565   
         566  +
/* RustModule.kt:172 */
  378    567   
mod _item_collection_metrics;
  379    568   
         569  +
/* RustModule.kt:172 */
  380    570   
mod _item_response;
  381    571   
         572  +
/* RustModule.kt:172 */
  382    573   
mod _key_schema_element;
  383    574   
         575  +
/* RustModule.kt:172 */
  384    576   
mod _key_type;
  385    577   
         578  +
/* RustModule.kt:172 */
  386    579   
mod _keys_and_attributes;
  387    580   
         581  +
/* RustModule.kt:172 */
  388    582   
mod _kinesis_data_stream_destination;
  389    583   
         584  +
/* RustModule.kt:172 */
  390    585   
mod _local_secondary_index;
  391    586   
         587  +
/* RustModule.kt:172 */
  392    588   
mod _local_secondary_index_description;
  393    589   
         590  +
/* RustModule.kt:172 */
  394    591   
mod _local_secondary_index_info;
  395    592   
         593  +
/* RustModule.kt:172 */
  396    594   
mod _parameterized_statement;
  397    595   
         596  +
/* RustModule.kt:172 */
  398    597   
mod _point_in_time_recovery_description;
  399    598   
         599  +
/* RustModule.kt:172 */
  400    600   
mod _point_in_time_recovery_specification;
  401    601   
         602  +
/* RustModule.kt:172 */
  402    603   
mod _point_in_time_recovery_status;
  403    604   
         605  +
/* RustModule.kt:172 */
  404    606   
mod _projection;
  405    607   
         608  +
/* RustModule.kt:172 */
  406    609   
mod _projection_type;
  407    610   
         611  +
/* RustModule.kt:172 */
  408    612   
mod _provisioned_throughput;
  409    613   
         614  +
/* RustModule.kt:172 */
  410    615   
mod _provisioned_throughput_description;
  411    616   
         617  +
/* RustModule.kt:172 */
  412    618   
mod _provisioned_throughput_override;
  413    619   
         620  +
/* RustModule.kt:172 */
  414    621   
mod _put;
  415    622   
         623  +
/* RustModule.kt:172 */
  416    624   
mod _put_request;
  417    625   
         626  +
/* RustModule.kt:172 */
  418    627   
mod _replica;
  419    628   
         629  +
/* RustModule.kt:172 */
  420    630   
mod _replica_auto_scaling_description;
  421    631   
         632  +
/* RustModule.kt:172 */
  422    633   
mod _replica_auto_scaling_update;
  423    634   
         635  +
/* RustModule.kt:172 */
  424    636   
mod _replica_description;
  425    637   
         638  +
/* RustModule.kt:172 */
  426    639   
mod _replica_global_secondary_index;
  427    640   
         641  +
/* RustModule.kt:172 */
  428    642   
mod _replica_global_secondary_index_auto_scaling_description;
  429    643   
         644  +
/* RustModule.kt:172 */
  430    645   
mod _replica_global_secondary_index_auto_scaling_update;
  431    646   
         647  +
/* RustModule.kt:172 */
  432    648   
mod _replica_global_secondary_index_description;
  433    649   
         650  +
/* RustModule.kt:172 */
  434    651   
mod _replica_global_secondary_index_settings_description;
  435    652   
         653  +
/* RustModule.kt:172 */
  436    654   
mod _replica_global_secondary_index_settings_update;
  437    655   
         656  +
/* RustModule.kt:172 */
  438    657   
mod _replica_settings_description;
  439    658   
         659  +
/* RustModule.kt:172 */
  440    660   
mod _replica_settings_update;
  441    661   
         662  +
/* RustModule.kt:172 */
  442    663   
mod _replica_status;
  443    664   
         665  +
/* RustModule.kt:172 */
  444    666   
mod _replica_update;
  445    667   
         668  +
/* RustModule.kt:172 */
  446    669   
mod _replication_group_update;
  447    670   
         671  +
/* RustModule.kt:172 */
  448    672   
mod _restore_summary;
  449    673   
         674  +
/* RustModule.kt:172 */
  450    675   
mod _return_consumed_capacity;
  451    676   
         677  +
/* RustModule.kt:172 */
  452    678   
mod _return_item_collection_metrics;
  453    679   
         680  +
/* RustModule.kt:172 */
  454    681   
mod _return_value;
  455    682   
         683  +
/* RustModule.kt:172 */
  456    684   
mod _return_values_on_condition_check_failure;
  457    685   
         686  +
/* RustModule.kt:172 */
  458    687   
mod _s3_sse_algorithm;
  459    688   
         689  +
/* RustModule.kt:172 */
  460    690   
mod _scalar_attribute_type;
  461    691   
         692  +
/* RustModule.kt:172 */
  462    693   
mod _select;
  463    694   
         695  +
/* RustModule.kt:172 */
  464    696   
mod _source_table_details;
  465    697   
         698  +
/* RustModule.kt:172 */
  466    699   
mod _source_table_feature_details;
  467    700   
         701  +
/* RustModule.kt:172 */
  468    702   
mod _sse_description;
  469    703   
         704  +
/* RustModule.kt:172 */
  470    705   
mod _sse_specification;
  471    706   
         707  +
/* RustModule.kt:172 */
  472    708   
mod _sse_status;
  473    709   
         710  +
/* RustModule.kt:172 */
  474    711   
mod _sse_type;
  475    712   
         713  +
/* RustModule.kt:172 */
  476    714   
mod _stream_specification;
  477    715   
         716  +
/* RustModule.kt:172 */
  478    717   
mod _stream_view_type;
  479    718   
         719  +
/* RustModule.kt:172 */
  480    720   
mod _table_auto_scaling_description;
  481    721   
         722  +
/* RustModule.kt:172 */
  482    723   
mod _table_description;
  483    724   
         725  +
/* RustModule.kt:172 */
  484    726   
mod _table_status;
  485    727   
         728  +
/* RustModule.kt:172 */
  486    729   
mod _tag;
  487    730   
         731  +
/* RustModule.kt:172 */
  488    732   
mod _time_to_live_description;
  489    733   
         734  +
/* RustModule.kt:172 */
  490    735   
mod _time_to_live_specification;
  491    736   
         737  +
/* RustModule.kt:172 */
  492    738   
mod _time_to_live_status;
  493    739   
         740  +
/* RustModule.kt:172 */
  494    741   
mod _transact_get_item;
  495    742   
         743  +
/* RustModule.kt:172 */
  496    744   
mod _transact_write_item;
  497    745   
         746  +
/* RustModule.kt:172 */
  498    747   
mod _update;
  499    748   
         749  +
/* RustModule.kt:172 */
  500    750   
mod _update_global_secondary_index_action;
  501    751   
         752  +
/* RustModule.kt:172 */
  502    753   
mod _update_replication_group_member_action;
  503    754   
         755  +
/* RustModule.kt:172 */
  504    756   
mod _write_request;
  505    757   
  506         -
/// Builders
         758  +
/// /* CodegenDelegator.kt:51 */Builders
  507    759   
pub mod builders;
  508    760   
  509         -
/// Error types that Amazon DynamoDB can respond with.
         761  +
/// /* ClientRustModule.kt:121 */Error types that Amazon DynamoDB can respond with.
  510    762   
pub mod error;

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

@@ -1,1 +114,176 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Contains details of a table archival operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Contains details of a table archival operation.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct ArchivalSummary {
    7         -
    /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ArchivalSummary {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
    8     10   
    pub archival_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    9         -
    /// <p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
   10     12   
    /// <ul>
   11     13   
    /// <li>
   12     14   
    /// <p><code>INACCESSIBLE_ENCRYPTION_CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p></li>
   13     15   
    /// </ul>
   14     16   
    pub archival_reason: ::std::option::Option<::std::string::String>,
   15         -
    /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
   16     18   
    pub archival_backup_arn: ::std::option::Option<::std::string::String>,
          19  +
    /* StructureGenerator.kt:201 */
   17     20   
}
          21  +
/* StructureGenerator.kt:135 */
   18     22   
impl ArchivalSummary {
   19         -
    /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          23  +
    /// /* StructureGenerator.kt:231 */<p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          24  +
    /* StructureGenerator.kt:166 */
   20     25   
    pub fn archival_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          26  +
        /* StructureGenerator.kt:170 */
   21     27   
        self.archival_date_time.as_ref()
          28  +
        /* StructureGenerator.kt:166 */
   22     29   
    }
   23         -
    /// <p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
          30  +
    /// /* StructureGenerator.kt:231 */<p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
   24     31   
    /// <ul>
   25     32   
    /// <li>
   26     33   
    /// <p><code>INACCESSIBLE_ENCRYPTION_CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p></li>
   27     34   
    /// </ul>
          35  +
    /* StructureGenerator.kt:166 */
   28     36   
    pub fn archival_reason(&self) -> ::std::option::Option<&str> {
          37  +
        /* StructureGenerator.kt:169 */
   29     38   
        self.archival_reason.as_deref()
          39  +
        /* StructureGenerator.kt:166 */
   30     40   
    }
   31         -
    /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
          41  +
    /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
          42  +
    /* StructureGenerator.kt:166 */
   32     43   
    pub fn archival_backup_arn(&self) -> ::std::option::Option<&str> {
          44  +
        /* StructureGenerator.kt:169 */
   33     45   
        self.archival_backup_arn.as_deref()
          46  +
        /* StructureGenerator.kt:166 */
   34     47   
    }
          48  +
    /* StructureGenerator.kt:135 */
   35     49   
}
          50  +
/* ClientCodegenVisitor.kt:237 */
   36     51   
impl ArchivalSummary {
   37         -
    /// Creates a new builder-style object to manufacture [`ArchivalSummary`](crate::types::ArchivalSummary).
          52  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ArchivalSummary`](crate::types::ArchivalSummary).
          53  +
    /* BuilderGenerator.kt:175 */
   38     54   
    pub fn builder() -> crate::types::builders::ArchivalSummaryBuilder {
          55  +
        /* BuilderGenerator.kt:176 */
   39     56   
        crate::types::builders::ArchivalSummaryBuilder::default()
          57  +
        /* BuilderGenerator.kt:175 */
   40     58   
    }
          59  +
    /* ClientCodegenVisitor.kt:237 */
   41     60   
}
   42     61   
   43         -
/// A builder for [`ArchivalSummary`](crate::types::ArchivalSummary).
          62  +
/// /* BuilderGenerator.kt:342 */A builder for [`ArchivalSummary`](crate::types::ArchivalSummary).
          63  +
/* RustType.kt:516 */
   44     64   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          65  +
/* RustType.kt:516 */
   45     66   
#[non_exhaustive]
          67  +
/* BuilderGenerator.kt:345 */
   46     68   
pub struct ArchivalSummaryBuilder {
   47         -
    pub(crate) archival_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   48         -
    pub(crate) archival_reason: ::std::option::Option<::std::string::String>,
          69  +
    /* BuilderGenerator.kt:275 */ pub(crate) archival_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          70  +
    /* BuilderGenerator.kt:275 */ pub(crate) archival_reason: ::std::option::Option<::std::string::String>,
          71  +
    /* BuilderGenerator.kt:275 */
   49     72   
    pub(crate) archival_backup_arn: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:345 */
   50     74   
}
          75  +
/* BuilderGenerator.kt:355 */
   51     76   
impl ArchivalSummaryBuilder {
   52         -
    /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          77  +
    /// /* BuilderGenerator.kt:286 */<p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          78  +
    /* BuilderGenerator.kt:291 */
   53     79   
    pub fn archival_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
          80  +
        /* BuilderGenerator.kt:292 */
   54     81   
        self.archival_date_time = ::std::option::Option::Some(input);
          82  +
        /* BuilderGenerator.kt:293 */
   55     83   
        self
          84  +
        /* BuilderGenerator.kt:291 */
   56     85   
    }
   57         -
    /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          86  +
    /// /* BuilderGenerator.kt:312 */<p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          87  +
    /* BuilderGenerator.kt:314 */
   58     88   
    pub fn set_archival_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
          89  +
        /* BuilderGenerator.kt:315 */
   59     90   
        self.archival_date_time = input;
   60     91   
        self
          92  +
        /* BuilderGenerator.kt:314 */
   61     93   
    }
   62         -
    /// <p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          94  +
    /// /* BuilderGenerator.kt:334 */<p>The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.</p>
          95  +
    /* BuilderGenerator.kt:336 */
   63     96   
    pub fn get_archival_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
          97  +
        /* BuilderGenerator.kt:337 */
   64     98   
        &self.archival_date_time
          99  +
        /* BuilderGenerator.kt:336 */
   65    100   
    }
   66         -
    /// <p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
         101  +
    /// /* BuilderGenerator.kt:286 */<p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
   67    102   
    /// <ul>
   68    103   
    /// <li>
   69    104   
    /// <p><code>INACCESSIBLE_ENCRYPTION_CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p></li>
   70    105   
    /// </ul>
         106  +
    /* BuilderGenerator.kt:291 */
   71    107   
    pub fn archival_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         108  +
        /* BuilderGenerator.kt:292 */
   72    109   
        self.archival_reason = ::std::option::Option::Some(input.into());
         110  +
        /* BuilderGenerator.kt:293 */
   73    111   
        self
         112  +
        /* BuilderGenerator.kt:291 */
   74    113   
    }
   75         -
    /// <p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
         114  +
    /// /* BuilderGenerator.kt:312 */<p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
   76    115   
    /// <ul>
   77    116   
    /// <li>
   78    117   
    /// <p><code>INACCESSIBLE_ENCRYPTION_CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p></li>
   79    118   
    /// </ul>
         119  +
    /* BuilderGenerator.kt:314 */
   80    120   
    pub fn set_archival_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   81    122   
        self.archival_reason = input;
   82    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   83    125   
    }
   84         -
    /// <p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
         126  +
    /// /* BuilderGenerator.kt:334 */<p>The reason DynamoDB archived the table. Currently, the only possible value is:</p>
   85    127   
    /// <ul>
   86    128   
    /// <li>
   87    129   
    /// <p><code>INACCESSIBLE_ENCRYPTION_CREDENTIALS</code> - The table was archived due to the table's AWS KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.</p></li>
   88    130   
    /// </ul>
         131  +
    /* BuilderGenerator.kt:336 */
   89    132   
    pub fn get_archival_reason(&self) -> &::std::option::Option<::std::string::String> {
         133  +
        /* BuilderGenerator.kt:337 */
   90    134   
        &self.archival_reason
         135  +
        /* BuilderGenerator.kt:336 */
   91    136   
    }
   92         -
    /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         137  +
    /// /* BuilderGenerator.kt:286 */<p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         138  +
    /* BuilderGenerator.kt:291 */
   93    139   
    pub fn archival_backup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         140  +
        /* BuilderGenerator.kt:292 */
   94    141   
        self.archival_backup_arn = ::std::option::Option::Some(input.into());
         142  +
        /* BuilderGenerator.kt:293 */
   95    143   
        self
         144  +
        /* BuilderGenerator.kt:291 */
   96    145   
    }
   97         -
    /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         146  +
    /// /* BuilderGenerator.kt:312 */<p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         147  +
    /* BuilderGenerator.kt:314 */
   98    148   
    pub fn set_archival_backup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         149  +
        /* BuilderGenerator.kt:315 */
   99    150   
        self.archival_backup_arn = input;
  100    151   
        self
         152  +
        /* BuilderGenerator.kt:314 */
  101    153   
    }
  102         -
    /// <p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         154  +
    /// /* BuilderGenerator.kt:334 */<p>The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.</p>
         155  +
    /* BuilderGenerator.kt:336 */
  103    156   
    pub fn get_archival_backup_arn(&self) -> &::std::option::Option<::std::string::String> {
         157  +
        /* BuilderGenerator.kt:337 */
  104    158   
        &self.archival_backup_arn
         159  +
        /* BuilderGenerator.kt:336 */
  105    160   
    }
  106         -
    /// Consumes the builder and constructs a [`ArchivalSummary`](crate::types::ArchivalSummary).
         161  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ArchivalSummary`](crate::types::ArchivalSummary).
         162  +
    /* BuilderGenerator.kt:253 */
  107    163   
    pub fn build(self) -> crate::types::ArchivalSummary {
         164  +
        /* BuilderGenerator.kt:477 */
  108    165   
        crate::types::ArchivalSummary {
  109         -
            archival_date_time: self.archival_date_time,
         166  +
            /* BuilderGenerator.kt:481 */ archival_date_time: self.archival_date_time,
         167  +
            /* BuilderGenerator.kt:481 */
  110    168   
            archival_reason: self.archival_reason,
         169  +
            /* BuilderGenerator.kt:481 */
  111    170   
            archival_backup_arn: self.archival_backup_arn,
         171  +
            /* BuilderGenerator.kt:477 */
  112    172   
        }
         173  +
        /* BuilderGenerator.kt:253 */
  113    174   
    }
         175  +
    /* BuilderGenerator.kt:355 */
  114    176   
}

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

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

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

@@ -1,1 +128,174 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents an attribute for describing the key schema for the table and indexes.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents an attribute for describing the key schema for the table and indexes.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct AttributeDefinition {
    7         -
    /// <p>A name for the attribute.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct AttributeDefinition {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A name for the attribute.</p>
    8     10   
    pub attribute_name: ::std::string::String,
    9         -
    /// <p>The data type for the attribute, where:</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The data type for the attribute, where:</p>
   10     12   
    /// <ul>
   11     13   
    /// <li>
   12     14   
    /// <p><code>S</code> - the attribute is of type String</p></li>
   13     15   
    /// <li>
   14     16   
    /// <p><code>N</code> - the attribute is of type Number</p></li>
   15     17   
    /// <li>
   16     18   
    /// <p><code>B</code> - the attribute is of type Binary</p></li>
   17     19   
    /// </ul>
   18     20   
    pub attribute_type: crate::types::ScalarAttributeType,
          21  +
    /* StructureGenerator.kt:201 */
   19     22   
}
          23  +
/* StructureGenerator.kt:135 */
   20     24   
impl AttributeDefinition {
   21         -
    /// <p>A name for the attribute.</p>
          25  +
    /// /* StructureGenerator.kt:231 */<p>A name for the attribute.</p>
          26  +
    /* StructureGenerator.kt:166 */
   22     27   
    pub fn attribute_name(&self) -> &str {
          28  +
        /* StructureGenerator.kt:171 */
   23     29   
        use std::ops::Deref;
   24     30   
        self.attribute_name.deref()
          31  +
        /* StructureGenerator.kt:166 */
   25     32   
    }
   26         -
    /// <p>The data type for the attribute, where:</p>
          33  +
    /// /* StructureGenerator.kt:231 */<p>The data type for the attribute, where:</p>
   27     34   
    /// <ul>
   28     35   
    /// <li>
   29     36   
    /// <p><code>S</code> - the attribute is of type String</p></li>
   30     37   
    /// <li>
   31     38   
    /// <p><code>N</code> - the attribute is of type Number</p></li>
   32     39   
    /// <li>
   33     40   
    /// <p><code>B</code> - the attribute is of type Binary</p></li>
   34     41   
    /// </ul>
          42  +
    /* StructureGenerator.kt:166 */
   35     43   
    pub fn attribute_type(&self) -> &crate::types::ScalarAttributeType {
          44  +
        /* StructureGenerator.kt:172 */
   36     45   
        &self.attribute_type
          46  +
        /* StructureGenerator.kt:166 */
   37     47   
    }
          48  +
    /* StructureGenerator.kt:135 */
   38     49   
}
          50  +
/* ClientCodegenVisitor.kt:237 */
   39     51   
impl AttributeDefinition {
   40         -
    /// Creates a new builder-style object to manufacture [`AttributeDefinition`](crate::types::AttributeDefinition).
          52  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`AttributeDefinition`](crate::types::AttributeDefinition).
          53  +
    /* BuilderGenerator.kt:175 */
   41     54   
    pub fn builder() -> crate::types::builders::AttributeDefinitionBuilder {
          55  +
        /* BuilderGenerator.kt:176 */
   42     56   
        crate::types::builders::AttributeDefinitionBuilder::default()
          57  +
        /* BuilderGenerator.kt:175 */
   43     58   
    }
          59  +
    /* ClientCodegenVisitor.kt:237 */
   44     60   
}
   45     61   
   46         -
/// A builder for [`AttributeDefinition`](crate::types::AttributeDefinition).
          62  +
/// /* BuilderGenerator.kt:342 */A builder for [`AttributeDefinition`](crate::types::AttributeDefinition).
          63  +
/* RustType.kt:516 */
   47     64   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          65  +
/* RustType.kt:516 */
   48     66   
#[non_exhaustive]
          67  +
/* BuilderGenerator.kt:345 */
   49     68   
pub struct AttributeDefinitionBuilder {
   50         -
    pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          69  +
    /* BuilderGenerator.kt:275 */ pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          70  +
    /* BuilderGenerator.kt:275 */
   51     71   
    pub(crate) attribute_type: ::std::option::Option<crate::types::ScalarAttributeType>,
          72  +
    /* BuilderGenerator.kt:345 */
   52     73   
}
          74  +
/* BuilderGenerator.kt:355 */
   53     75   
impl AttributeDefinitionBuilder {
   54         -
    /// <p>A name for the attribute.</p>
   55         -
    /// This field is required.
          76  +
    /// /* BuilderGenerator.kt:286 */<p>A name for the attribute.</p>
          77  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          78  +
    /* BuilderGenerator.kt:291 */
   56     79   
    pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          80  +
        /* BuilderGenerator.kt:292 */
   57     81   
        self.attribute_name = ::std::option::Option::Some(input.into());
          82  +
        /* BuilderGenerator.kt:293 */
   58     83   
        self
          84  +
        /* BuilderGenerator.kt:291 */
   59     85   
    }
   60         -
    /// <p>A name for the attribute.</p>
          86  +
    /// /* BuilderGenerator.kt:312 */<p>A name for the attribute.</p>
          87  +
    /* BuilderGenerator.kt:314 */
   61     88   
    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          89  +
        /* BuilderGenerator.kt:315 */
   62     90   
        self.attribute_name = input;
   63     91   
        self
          92  +
        /* BuilderGenerator.kt:314 */
   64     93   
    }
   65         -
    /// <p>A name for the attribute.</p>
          94  +
    /// /* BuilderGenerator.kt:334 */<p>A name for the attribute.</p>
          95  +
    /* BuilderGenerator.kt:336 */
   66     96   
    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
          97  +
        /* BuilderGenerator.kt:337 */
   67     98   
        &self.attribute_name
          99  +
        /* BuilderGenerator.kt:336 */
   68    100   
    }
   69         -
    /// <p>The data type for the attribute, where:</p>
         101  +
    /// /* BuilderGenerator.kt:286 */<p>The data type for the attribute, where:</p>
   70    102   
    /// <ul>
   71    103   
    /// <li>
   72    104   
    /// <p><code>S</code> - the attribute is of type String</p></li>
   73    105   
    /// <li>
   74    106   
    /// <p><code>N</code> - the attribute is of type Number</p></li>
   75    107   
    /// <li>
   76    108   
    /// <p><code>B</code> - the attribute is of type Binary</p></li>
   77    109   
    /// </ul>
   78         -
    /// This field is required.
         110  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         111  +
    /* BuilderGenerator.kt:291 */
   79    112   
    pub fn attribute_type(mut self, input: crate::types::ScalarAttributeType) -> Self {
         113  +
        /* BuilderGenerator.kt:292 */
   80    114   
        self.attribute_type = ::std::option::Option::Some(input);
         115  +
        /* BuilderGenerator.kt:293 */
   81    116   
        self
         117  +
        /* BuilderGenerator.kt:291 */
   82    118   
    }
   83         -
    /// <p>The data type for the attribute, where:</p>
         119  +
    /// /* BuilderGenerator.kt:312 */<p>The data type for the attribute, where:</p>
   84    120   
    /// <ul>
   85    121   
    /// <li>
   86    122   
    /// <p><code>S</code> - the attribute is of type String</p></li>
   87    123   
    /// <li>
   88    124   
    /// <p><code>N</code> - the attribute is of type Number</p></li>
   89    125   
    /// <li>
   90    126   
    /// <p><code>B</code> - the attribute is of type Binary</p></li>
   91    127   
    /// </ul>
         128  +
    /* BuilderGenerator.kt:314 */
   92    129   
    pub fn set_attribute_type(mut self, input: ::std::option::Option<crate::types::ScalarAttributeType>) -> Self {
         130  +
        /* BuilderGenerator.kt:315 */
   93    131   
        self.attribute_type = input;
   94    132   
        self
         133  +
        /* BuilderGenerator.kt:314 */
   95    134   
    }
   96         -
    /// <p>The data type for the attribute, where:</p>
         135  +
    /// /* BuilderGenerator.kt:334 */<p>The data type for the attribute, where:</p>
   97    136   
    /// <ul>
   98    137   
    /// <li>
   99    138   
    /// <p><code>S</code> - the attribute is of type String</p></li>
  100    139   
    /// <li>
  101    140   
    /// <p><code>N</code> - the attribute is of type Number</p></li>
  102    141   
    /// <li>
  103    142   
    /// <p><code>B</code> - the attribute is of type Binary</p></li>
  104    143   
    /// </ul>
         144  +
    /* BuilderGenerator.kt:336 */
  105    145   
    pub fn get_attribute_type(&self) -> &::std::option::Option<crate::types::ScalarAttributeType> {
         146  +
        /* BuilderGenerator.kt:337 */
  106    147   
        &self.attribute_type
         148  +
        /* BuilderGenerator.kt:336 */
  107    149   
    }
  108         -
    /// Consumes the builder and constructs a [`AttributeDefinition`](crate::types::AttributeDefinition).
  109         -
    /// This method will fail if any of the following fields are not set:
  110         -
    /// - [`attribute_name`](crate::types::builders::AttributeDefinitionBuilder::attribute_name)
  111         -
    /// - [`attribute_type`](crate::types::builders::AttributeDefinitionBuilder::attribute_type)
         150  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`AttributeDefinition`](crate::types::AttributeDefinition).
         151  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         152  +
    /// /* BuilderGenerator.kt:246 */- [`attribute_name`](crate::types::builders::AttributeDefinitionBuilder::attribute_name)
         153  +
    /// /* BuilderGenerator.kt:246 */- [`attribute_type`](crate::types::builders::AttributeDefinitionBuilder::attribute_type)
         154  +
    /* BuilderGenerator.kt:253 */
  112    155   
    pub fn build(self) -> ::std::result::Result<crate::types::AttributeDefinition, ::aws_smithy_types::error::operation::BuildError> {
  113         -
        ::std::result::Result::Ok(crate::types::AttributeDefinition {
  114         -
            attribute_name: self.attribute_name.ok_or_else(|| {
  115         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  116         -
                    "attribute_name",
  117         -
                    "attribute_name was not specified but it is required when building AttributeDefinition",
  118         -
                )
  119         -
            })?,
  120         -
            attribute_type: self.attribute_type.ok_or_else(|| {
  121         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  122         -
                    "attribute_type",
  123         -
                    "attribute_type was not specified but it is required when building AttributeDefinition",
  124         -
                )
  125         -
            })?,
  126         -
        })
         156  +
        /* BuilderGenerator.kt:254 */
         157  +
        ::std::result::Result::Ok(
         158  +
            /* BuilderGenerator.kt:477 */crate::types::AttributeDefinition {
         159  +
                /* BuilderGenerator.kt:481 */attribute_name: self.attribute_name
         160  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         161  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("attribute_name", "attribute_name was not specified but it is required when building AttributeDefinition")
         162  +
                    /* BuilderGenerator.kt:494 */)?
         163  +
                ,
         164  +
                /* BuilderGenerator.kt:481 */attribute_type: self.attribute_type
         165  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         166  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("attribute_type", "attribute_type was not specified but it is required when building AttributeDefinition")
         167  +
                    /* BuilderGenerator.kt:494 */)?
         168  +
                ,
         169  +
            /* BuilderGenerator.kt:477 */}
         170  +
        /* BuilderGenerator.kt:254 */)
         171  +
        /* BuilderGenerator.kt:253 */
  127    172   
    }
         173  +
    /* BuilderGenerator.kt:355 */
  128    174   
}

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

@@ -1,1 +186,303 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the data for an attribute.</p>
           2  +
/* UnionGenerator.kt:67 */
           3  +
/// /* UnionGenerator.kt:67 */<p>Represents the data for an attribute.</p>
    4      4   
/// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
    5      5   
/// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
           6  +
/* RustType.kt:516 */
    6      7   
#[non_exhaustive]
           8  +
/* RustType.kt:516 */
    7      9   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    8         -
pub enum AttributeValue {
    9         -
    /// <p>An attribute of type Binary. For example:</p>
          10  +
pub /* UnionGenerator.kt:85 */ enum AttributeValue {
          11  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Binary. For example:</p>
   10     12   
    /// <p><code>"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"</code></p>
          13  +
    /* UnionGenerator.kt:190 */
   11     14   
    B(::aws_smithy_types::Blob),
   12         -
    /// <p>An attribute of type Boolean. For example:</p>
          15  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Boolean. For example:</p>
   13     16   
    /// <p><code>"BOOL": true</code></p>
          17  +
    /* UnionGenerator.kt:190 */
   14     18   
    Bool(bool),
   15         -
    /// <p>An attribute of type Binary Set. For example:</p>
          19  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Binary Set. For example:</p>
   16     20   
    /// <p><code>"BS": \["U3Vubnk=", "UmFpbnk=", "U25vd3k="\]</code></p>
          21  +
    /* UnionGenerator.kt:190 */
   17     22   
    Bs(::std::vec::Vec<::aws_smithy_types::Blob>),
   18         -
    /// <p>An attribute of type List. For example:</p>
          23  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type List. For example:</p>
   19     24   
    /// <p><code>"L": \[ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}\]</code></p>
          25  +
    /* UnionGenerator.kt:190 */
   20     26   
    L(::std::vec::Vec<crate::types::AttributeValue>),
   21         -
    /// <p>An attribute of type Map. For example:</p>
          27  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Map. For example:</p>
   22     28   
    /// <p><code>"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}</code></p>
          29  +
    /* UnionGenerator.kt:190 */
   23     30   
    M(::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>),
   24         -
    /// <p>An attribute of type Number. For example:</p>
          31  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Number. For example:</p>
   25     32   
    /// <p><code>"N": "123.45"</code></p>
   26     33   
    /// <p>Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.</p>
          34  +
    /* UnionGenerator.kt:190 */
   27     35   
    N(::std::string::String),
   28         -
    /// <p>An attribute of type Number Set. For example:</p>
          36  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Number Set. For example:</p>
   29     37   
    /// <p><code>"NS": \["42.2", "-19", "7.5", "3.14"\]</code></p>
   30     38   
    /// <p>Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.</p>
          39  +
    /* UnionGenerator.kt:190 */
   31     40   
    Ns(::std::vec::Vec<::std::string::String>),
   32         -
    /// <p>An attribute of type Null. For example:</p>
          41  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type Null. For example:</p>
   33     42   
    /// <p><code>"NULL": true</code></p>
          43  +
    /* UnionGenerator.kt:190 */
   34     44   
    Null(bool),
   35         -
    /// <p>An attribute of type String. For example:</p>
          45  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type String. For example:</p>
   36     46   
    /// <p><code>"S": "Hello"</code></p>
          47  +
    /* UnionGenerator.kt:190 */
   37     48   
    S(::std::string::String),
   38         -
    /// <p>An attribute of type String Set. For example:</p>
          49  +
    /// /* UnionGenerator.kt:90 */<p>An attribute of type String Set. For example:</p>
   39     50   
    /// <p><code>"SS": \["Giraffe", "Hippo" ,"Zebra"\]</code></p>
          51  +
    /* UnionGenerator.kt:190 */
   40     52   
    Ss(::std::vec::Vec<::std::string::String>),
   41         -
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          53  +
    /// /* UnionGenerator.kt:96 */The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
          54  +
    /* UnionGenerator.kt:97 */
   42     55   
    /// An unknown enum variant
          56  +
    /* UnionGenerator.kt:98 */
   43     57   
    ///
          58  +
    /* UnionGenerator.kt:99 */
   44     59   
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
          60  +
    /* UnionGenerator.kt:100 */
   45     61   
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
          62  +
    /* UnionGenerator.kt:101 */
   46     63   
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
          64  +
    /* UnionGenerator.kt:102 */
   47     65   
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
          66  +
    /* RustType.kt:516 */
   48     67   
    #[non_exhaustive]
          68  +
    /* UnionGenerator.kt:105 */
   49     69   
    Unknown,
          70  +
    /* UnionGenerator.kt:85 */
   50     71   
}
          72  +
/* UnionGenerator.kt:111 */
   51     73   
impl AttributeValue {
          74  +
    /* UnionGenerator.kt:217 */
   52     75   
    /// Tries to convert the enum instance into [`B`](crate::types::AttributeValue::B), extracting the inner [`Blob`](::aws_smithy_types::Blob).
          76  +
    /* UnionGenerator.kt:222 */
   53     77   
    /// Returns `Err(&Self)` if it can't be converted.
          78  +
    /* UnionGenerator.kt:223 */
   54     79   
    pub fn as_b(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> {
          80  +
        /* UnionGenerator.kt:227 */
   55     81   
        if let AttributeValue::B(val) = &self {
   56     82   
            ::std::result::Result::Ok(val)
   57     83   
        } else {
   58     84   
            ::std::result::Result::Err(self)
   59     85   
        }
          86  +
        /* UnionGenerator.kt:223 */
   60     87   
    }
          88  +
    /* UnionGenerator.kt:121 */
   61     89   
    /// Returns true if this is a [`B`](crate::types::AttributeValue::B).
          90  +
    /* UnionGenerator.kt:122 */
   62     91   
    pub fn is_b(&self) -> bool {
          92  +
        /* UnionGenerator.kt:123 */
   63     93   
        self.as_b().is_ok()
          94  +
        /* UnionGenerator.kt:122 */
   64     95   
    }
          96  +
    /* UnionGenerator.kt:217 */
   65     97   
    /// Tries to convert the enum instance into [`Bool`](crate::types::AttributeValue::Bool), extracting the inner [`bool`](bool).
          98  +
    /* UnionGenerator.kt:222 */
   66     99   
    /// Returns `Err(&Self)` if it can't be converted.
         100  +
    /* UnionGenerator.kt:223 */
   67    101   
    pub fn as_bool(&self) -> ::std::result::Result<&bool, &Self> {
         102  +
        /* UnionGenerator.kt:227 */
   68    103   
        if let AttributeValue::Bool(val) = &self {
   69    104   
            ::std::result::Result::Ok(val)
   70    105   
        } else {
   71    106   
            ::std::result::Result::Err(self)
   72    107   
        }
         108  +
        /* UnionGenerator.kt:223 */
   73    109   
    }
         110  +
    /* UnionGenerator.kt:121 */
   74    111   
    /// Returns true if this is a [`Bool`](crate::types::AttributeValue::Bool).
         112  +
    /* UnionGenerator.kt:122 */
   75    113   
    pub fn is_bool(&self) -> bool {
         114  +
        /* UnionGenerator.kt:123 */
   76    115   
        self.as_bool().is_ok()
         116  +
        /* UnionGenerator.kt:122 */
   77    117   
    }
         118  +
    /* UnionGenerator.kt:217 */
   78    119   
    /// Tries to convert the enum instance into [`Bs`](crate::types::AttributeValue::Bs), extracting the inner [`Vec`](::std::vec::Vec).
         120  +
    /* UnionGenerator.kt:222 */
   79    121   
    /// Returns `Err(&Self)` if it can't be converted.
         122  +
    /* UnionGenerator.kt:223 */
   80    123   
    pub fn as_bs(&self) -> ::std::result::Result<&::std::vec::Vec<::aws_smithy_types::Blob>, &Self> {
         124  +
        /* UnionGenerator.kt:227 */
   81    125   
        if let AttributeValue::Bs(val) = &self {
   82    126   
            ::std::result::Result::Ok(val)
   83    127   
        } else {
   84    128   
            ::std::result::Result::Err(self)
   85    129   
        }
         130  +
        /* UnionGenerator.kt:223 */
   86    131   
    }
         132  +
    /* UnionGenerator.kt:121 */
   87    133   
    /// Returns true if this is a [`Bs`](crate::types::AttributeValue::Bs).
         134  +
    /* UnionGenerator.kt:122 */
   88    135   
    pub fn is_bs(&self) -> bool {
         136  +
        /* UnionGenerator.kt:123 */
   89    137   
        self.as_bs().is_ok()
         138  +
        /* UnionGenerator.kt:122 */
   90    139   
    }
         140  +
    /* UnionGenerator.kt:217 */
   91    141   
    /// Tries to convert the enum instance into [`L`](crate::types::AttributeValue::L), extracting the inner [`Vec`](::std::vec::Vec).
         142  +
    /* UnionGenerator.kt:222 */
   92    143   
    /// Returns `Err(&Self)` if it can't be converted.
         144  +
    /* UnionGenerator.kt:223 */
   93    145   
    pub fn as_l(&self) -> ::std::result::Result<&::std::vec::Vec<crate::types::AttributeValue>, &Self> {
         146  +
        /* UnionGenerator.kt:227 */
   94    147   
        if let AttributeValue::L(val) = &self {
   95    148   
            ::std::result::Result::Ok(val)
   96    149   
        } else {
   97    150   
            ::std::result::Result::Err(self)
   98    151   
        }
         152  +
        /* UnionGenerator.kt:223 */
   99    153   
    }
         154  +
    /* UnionGenerator.kt:121 */
  100    155   
    /// Returns true if this is a [`L`](crate::types::AttributeValue::L).
         156  +
    /* UnionGenerator.kt:122 */
  101    157   
    pub fn is_l(&self) -> bool {
         158  +
        /* UnionGenerator.kt:123 */
  102    159   
        self.as_l().is_ok()
         160  +
        /* UnionGenerator.kt:122 */
  103    161   
    }
         162  +
    /* UnionGenerator.kt:217 */
  104    163   
    /// Tries to convert the enum instance into [`M`](crate::types::AttributeValue::M), extracting the inner [`HashMap`](::std::collections::HashMap).
         164  +
    /* UnionGenerator.kt:222 */
  105    165   
    /// Returns `Err(&Self)` if it can't be converted.
         166  +
    /* UnionGenerator.kt:223 */
  106    167   
    pub fn as_m(&self) -> ::std::result::Result<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>, &Self> {
         168  +
        /* UnionGenerator.kt:227 */
  107    169   
        if let AttributeValue::M(val) = &self {
  108    170   
            ::std::result::Result::Ok(val)
  109    171   
        } else {
  110    172   
            ::std::result::Result::Err(self)
  111    173   
        }
         174  +
        /* UnionGenerator.kt:223 */
  112    175   
    }
         176  +
    /* UnionGenerator.kt:121 */
  113    177   
    /// Returns true if this is a [`M`](crate::types::AttributeValue::M).
         178  +
    /* UnionGenerator.kt:122 */
  114    179   
    pub fn is_m(&self) -> bool {
         180  +
        /* UnionGenerator.kt:123 */
  115    181   
        self.as_m().is_ok()
         182  +
        /* UnionGenerator.kt:122 */
  116    183   
    }
         184  +
    /* UnionGenerator.kt:217 */
  117    185   
    /// Tries to convert the enum instance into [`N`](crate::types::AttributeValue::N), extracting the inner [`String`](::std::string::String).
         186  +
    /* UnionGenerator.kt:222 */
  118    187   
    /// Returns `Err(&Self)` if it can't be converted.
         188  +
    /* UnionGenerator.kt:223 */
  119    189   
    pub fn as_n(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         190  +
        /* UnionGenerator.kt:227 */
  120    191   
        if let AttributeValue::N(val) = &self {
  121    192   
            ::std::result::Result::Ok(val)
  122    193   
        } else {
  123    194   
            ::std::result::Result::Err(self)
  124    195   
        }
         196  +
        /* UnionGenerator.kt:223 */
  125    197   
    }
         198  +
    /* UnionGenerator.kt:121 */
  126    199   
    /// Returns true if this is a [`N`](crate::types::AttributeValue::N).
         200  +
    /* UnionGenerator.kt:122 */
  127    201   
    pub fn is_n(&self) -> bool {
         202  +
        /* UnionGenerator.kt:123 */
  128    203   
        self.as_n().is_ok()
         204  +
        /* UnionGenerator.kt:122 */
  129    205   
    }
         206  +
    /* UnionGenerator.kt:217 */
  130    207   
    /// Tries to convert the enum instance into [`Ns`](crate::types::AttributeValue::Ns), extracting the inner [`Vec`](::std::vec::Vec).
         208  +
    /* UnionGenerator.kt:222 */
  131    209   
    /// Returns `Err(&Self)` if it can't be converted.
         210  +
    /* UnionGenerator.kt:223 */
  132    211   
    pub fn as_ns(&self) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
         212  +
        /* UnionGenerator.kt:227 */
  133    213   
        if let AttributeValue::Ns(val) = &self {
  134    214   
            ::std::result::Result::Ok(val)
  135    215   
        } else {
  136    216   
            ::std::result::Result::Err(self)
  137    217   
        }
         218  +
        /* UnionGenerator.kt:223 */
  138    219   
    }
         220  +
    /* UnionGenerator.kt:121 */
  139    221   
    /// Returns true if this is a [`Ns`](crate::types::AttributeValue::Ns).
         222  +
    /* UnionGenerator.kt:122 */
  140    223   
    pub fn is_ns(&self) -> bool {
         224  +
        /* UnionGenerator.kt:123 */
  141    225   
        self.as_ns().is_ok()
         226  +
        /* UnionGenerator.kt:122 */
  142    227   
    }
         228  +
    /* UnionGenerator.kt:217 */
  143    229   
    /// Tries to convert the enum instance into [`Null`](crate::types::AttributeValue::Null), extracting the inner [`bool`](bool).
         230  +
    /* UnionGenerator.kt:222 */
  144    231   
    /// Returns `Err(&Self)` if it can't be converted.
         232  +
    /* UnionGenerator.kt:223 */
  145    233   
    pub fn as_null(&self) -> ::std::result::Result<&bool, &Self> {
         234  +
        /* UnionGenerator.kt:227 */
  146    235   
        if let AttributeValue::Null(val) = &self {
  147    236   
            ::std::result::Result::Ok(val)
  148    237   
        } else {
  149    238   
            ::std::result::Result::Err(self)
  150    239   
        }
         240  +
        /* UnionGenerator.kt:223 */
  151    241   
    }
         242  +
    /* UnionGenerator.kt:121 */
  152    243   
    /// Returns true if this is a [`Null`](crate::types::AttributeValue::Null).
         244  +
    /* UnionGenerator.kt:122 */
  153    245   
    pub fn is_null(&self) -> bool {
         246  +
        /* UnionGenerator.kt:123 */
  154    247   
        self.as_null().is_ok()
         248  +
        /* UnionGenerator.kt:122 */
  155    249   
    }
         250  +
    /* UnionGenerator.kt:217 */
  156    251   
    /// Tries to convert the enum instance into [`S`](crate::types::AttributeValue::S), extracting the inner [`String`](::std::string::String).
         252  +
    /* UnionGenerator.kt:222 */
  157    253   
    /// Returns `Err(&Self)` if it can't be converted.
         254  +
    /* UnionGenerator.kt:223 */
  158    255   
    pub fn as_s(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         256  +
        /* UnionGenerator.kt:227 */
  159    257   
        if let AttributeValue::S(val) = &self {
  160    258   
            ::std::result::Result::Ok(val)
  161    259   
        } else {
  162    260   
            ::std::result::Result::Err(self)
  163    261   
        }
         262  +
        /* UnionGenerator.kt:223 */
  164    263   
    }
         264  +
    /* UnionGenerator.kt:121 */
  165    265   
    /// Returns true if this is a [`S`](crate::types::AttributeValue::S).
         266  +
    /* UnionGenerator.kt:122 */
  166    267   
    pub fn is_s(&self) -> bool {
         268  +
        /* UnionGenerator.kt:123 */
  167    269   
        self.as_s().is_ok()
         270  +
        /* UnionGenerator.kt:122 */
  168    271   
    }
         272  +
    /* UnionGenerator.kt:217 */
  169    273   
    /// Tries to convert the enum instance into [`Ss`](crate::types::AttributeValue::Ss), extracting the inner [`Vec`](::std::vec::Vec).
         274  +
    /* UnionGenerator.kt:222 */
  170    275   
    /// Returns `Err(&Self)` if it can't be converted.
         276  +
    /* UnionGenerator.kt:223 */
  171    277   
    pub fn as_ss(&self) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
         278  +
        /* UnionGenerator.kt:227 */
  172    279   
        if let AttributeValue::Ss(val) = &self {
  173    280   
            ::std::result::Result::Ok(val)
  174    281   
        } else {
  175    282   
            ::std::result::Result::Err(self)
  176    283   
        }
         284  +
        /* UnionGenerator.kt:223 */
  177    285   
    }
         286  +
    /* UnionGenerator.kt:121 */
  178    287   
    /// Returns true if this is a [`Ss`](crate::types::AttributeValue::Ss).
         288  +
    /* UnionGenerator.kt:122 */
  179    289   
    pub fn is_ss(&self) -> bool {
         290  +
        /* UnionGenerator.kt:123 */
  180    291   
        self.as_ss().is_ok()
         292  +
        /* UnionGenerator.kt:122 */
  181    293   
    }
         294  +
    /* UnionGenerator.kt:127 */
  182    295   
    /// Returns true if the enum instance is the `Unknown` variant.
         296  +
    /* UnionGenerator.kt:128 */
  183    297   
    pub fn is_unknown(&self) -> bool {
         298  +
        /* UnionGenerator.kt:129 */
  184    299   
        matches!(self, Self::Unknown)
         300  +
        /* UnionGenerator.kt:128 */
  185    301   
    }
         302  +
    /* UnionGenerator.kt:111 */
  186    303   
}

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

@@ -1,1 +235,282 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>For the <code>UpdateItem</code> operation, represents the attributes to be modified, the action to perform on each, and the new value for each.</p><note>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>For the <code>UpdateItem</code> operation, represents the attributes to be modified, the action to perform on each, and the new value for each.</p><note>
    4      4   
/// <p>You cannot use <code>UpdateItem</code> to update any primary key attributes. Instead, you will need to delete the item, and then use <code>PutItem</code> to create a new item with new attributes.</p>
    5      5   
/// </note>
    6      6   
/// <p>Attribute values cannot be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests with empty values will be rejected with a <code>ValidationException</code> exception.</p>
           7  +
/* RustType.kt:516 */
    7      8   
#[non_exhaustive]
           9  +
/* RustType.kt:516 */
    8     10   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    9         -
pub struct AttributeValueUpdate {
   10         -
    /// <p>Represents the data for an attribute.</p>
          11  +
pub /* StructureGenerator.kt:201 */ struct AttributeValueUpdate {
          12  +
    /// /* StructureGenerator.kt:231 */<p>Represents the data for an attribute.</p>
   11     13   
    /// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
   12     14   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   13     15   
    pub value: ::std::option::Option<crate::types::AttributeValue>,
   14         -
    /// <p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
          16  +
    /// /* StructureGenerator.kt:231 */<p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
   15     17   
    /// <p><b>If an item with the specified <i>Key</i> is found in the table:</b></p>
   16     18   
    /// <ul>
   17     19   
    /// <li>
   18     20   
    /// <p><code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.</p></li>
   19     21   
    /// <li>
   20     22   
    /// <p><code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p>
   21     23   
    /// <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specified <code>\[a,c\]</code>, then the final attribute value would be <code>\[b\]</code>. Specifying an empty set is an error.</p></li>
   22     24   
    /// <li>
   23     25   
    /// <p><code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
   24     26   
    /// <ul>
   25     27   
    /// <li>
   26     28   
    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
   27     29   
    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p>
   28     30   
    /// <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p>
   29     31   
    /// </note></li>
   30     32   
    /// <li>
   31     33   
    /// <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value would be <code>\[1,2,3\]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
   32     34   
    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p></li>
   33     35   
    /// </ul>
   34     36   
    /// <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p></li>
   35     37   
    /// </ul>
   36     38   
    /// <p><b>If no item with the specified <i>Key</i> is found:</b></p>
   37     39   
    /// <ul>
   38     40   
    /// <li>
   39     41   
    /// <p><code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute.</p></li>
   40     42   
    /// <li>
   41     43   
    /// <p><code>DELETE</code> - Nothing happens; there is no attribute to delete.</p></li>
   42     44   
    /// <li>
   43     45   
    /// <p><code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p></li>
   44     46   
    /// </ul>
   45     47   
    pub action: ::std::option::Option<crate::types::AttributeAction>,
          48  +
    /* StructureGenerator.kt:201 */
   46     49   
}
          50  +
/* StructureGenerator.kt:135 */
   47     51   
impl AttributeValueUpdate {
   48         -
    /// <p>Represents the data for an attribute.</p>
          52  +
    /// /* StructureGenerator.kt:231 */<p>Represents the data for an attribute.</p>
   49     53   
    /// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
   50     54   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          55  +
    /* StructureGenerator.kt:166 */
   51     56   
    pub fn value(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
          57  +
        /* StructureGenerator.kt:170 */
   52     58   
        self.value.as_ref()
          59  +
        /* StructureGenerator.kt:166 */
   53     60   
    }
   54         -
    /// <p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
          61  +
    /// /* StructureGenerator.kt:231 */<p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
   55     62   
    /// <p><b>If an item with the specified <i>Key</i> is found in the table:</b></p>
   56     63   
    /// <ul>
   57     64   
    /// <li>
   58     65   
    /// <p><code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.</p></li>
   59     66   
    /// <li>
   60     67   
    /// <p><code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p>
   61     68   
    /// <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specified <code>\[a,c\]</code>, then the final attribute value would be <code>\[b\]</code>. Specifying an empty set is an error.</p></li>
   62     69   
    /// <li>
   63     70   
    /// <p><code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
   64     71   
    /// <ul>
   65     72   
    /// <li>
   66     73   
    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
   67     74   
    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p>
   68     75   
    /// <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p>
   69     76   
    /// </note></li>
   70     77   
    /// <li>
   71     78   
    /// <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value would be <code>\[1,2,3\]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
   72     79   
    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p></li>
   73     80   
    /// </ul>
   74     81   
    /// <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p></li>
   75     82   
    /// </ul>
   76     83   
    /// <p><b>If no item with the specified <i>Key</i> is found:</b></p>
   77     84   
    /// <ul>
   78     85   
    /// <li>
   79     86   
    /// <p><code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute.</p></li>
   80     87   
    /// <li>
   81     88   
    /// <p><code>DELETE</code> - Nothing happens; there is no attribute to delete.</p></li>
   82     89   
    /// <li>
   83     90   
    /// <p><code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p></li>
   84     91   
    /// </ul>
          92  +
    /* StructureGenerator.kt:166 */
   85     93   
    pub fn action(&self) -> ::std::option::Option<&crate::types::AttributeAction> {
          94  +
        /* StructureGenerator.kt:170 */
   86     95   
        self.action.as_ref()
          96  +
        /* StructureGenerator.kt:166 */
   87     97   
    }
          98  +
    /* StructureGenerator.kt:135 */
   88     99   
}
         100  +
/* ClientCodegenVisitor.kt:237 */
   89    101   
impl AttributeValueUpdate {
   90         -
    /// Creates a new builder-style object to manufacture [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         102  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         103  +
    /* BuilderGenerator.kt:175 */
   91    104   
    pub fn builder() -> crate::types::builders::AttributeValueUpdateBuilder {
         105  +
        /* BuilderGenerator.kt:176 */
   92    106   
        crate::types::builders::AttributeValueUpdateBuilder::default()
         107  +
        /* BuilderGenerator.kt:175 */
   93    108   
    }
         109  +
    /* ClientCodegenVisitor.kt:237 */
   94    110   
}
   95    111   
   96         -
/// A builder for [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         112  +
/// /* BuilderGenerator.kt:342 */A builder for [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         113  +
/* RustType.kt:516 */
   97    114   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         115  +
/* RustType.kt:516 */
   98    116   
#[non_exhaustive]
         117  +
/* BuilderGenerator.kt:345 */
   99    118   
pub struct AttributeValueUpdateBuilder {
  100         -
    pub(crate) value: ::std::option::Option<crate::types::AttributeValue>,
  101         -
    pub(crate) action: ::std::option::Option<crate::types::AttributeAction>,
         119  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<crate::types::AttributeValue>,
         120  +
    /* BuilderGenerator.kt:275 */ pub(crate) action: ::std::option::Option<crate::types::AttributeAction>,
         121  +
    /* BuilderGenerator.kt:345 */
  102    122   
}
         123  +
/* BuilderGenerator.kt:355 */
  103    124   
impl AttributeValueUpdateBuilder {
  104         -
    /// <p>Represents the data for an attribute.</p>
         125  +
    /// /* BuilderGenerator.kt:286 */<p>Represents the data for an attribute.</p>
  105    126   
    /// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
  106    127   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         128  +
    /* BuilderGenerator.kt:291 */
  107    129   
    pub fn value(mut self, input: crate::types::AttributeValue) -> Self {
         130  +
        /* BuilderGenerator.kt:292 */
  108    131   
        self.value = ::std::option::Option::Some(input);
         132  +
        /* BuilderGenerator.kt:293 */
  109    133   
        self
         134  +
        /* BuilderGenerator.kt:291 */
  110    135   
    }
  111         -
    /// <p>Represents the data for an attribute.</p>
         136  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the data for an attribute.</p>
  112    137   
    /// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
  113    138   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         139  +
    /* BuilderGenerator.kt:314 */
  114    140   
    pub fn set_value(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
         141  +
        /* BuilderGenerator.kt:315 */
  115    142   
        self.value = input;
  116    143   
        self
         144  +
        /* BuilderGenerator.kt:314 */
  117    145   
    }
  118         -
    /// <p>Represents the data for an attribute.</p>
         146  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the data for an attribute.</p>
  119    147   
    /// <p>Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.</p>
  120    148   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes">Data Types</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         149  +
    /* BuilderGenerator.kt:336 */
  121    150   
    pub fn get_value(&self) -> &::std::option::Option<crate::types::AttributeValue> {
         151  +
        /* BuilderGenerator.kt:337 */
  122    152   
        &self.value
         153  +
        /* BuilderGenerator.kt:336 */
  123    154   
    }
  124         -
    /// <p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
         155  +
    /// /* BuilderGenerator.kt:286 */<p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
  125    156   
    /// <p><b>If an item with the specified <i>Key</i> is found in the table:</b></p>
  126    157   
    /// <ul>
  127    158   
    /// <li>
  128    159   
    /// <p><code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.</p></li>
  129    160   
    /// <li>
  130    161   
    /// <p><code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p>
  131    162   
    /// <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specified <code>\[a,c\]</code>, then the final attribute value would be <code>\[b\]</code>. Specifying an empty set is an error.</p></li>
  132    163   
    /// <li>
  133    164   
    /// <p><code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
  134    165   
    /// <ul>
  135    166   
    /// <li>
  136    167   
    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
  137    168   
    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p>
  138    169   
    /// <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p>
  139    170   
    /// </note></li>
  140    171   
    /// <li>
  141    172   
    /// <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value would be <code>\[1,2,3\]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
  142    173   
    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p></li>
  143    174   
    /// </ul>
  144    175   
    /// <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p></li>
  145    176   
    /// </ul>
  146    177   
    /// <p><b>If no item with the specified <i>Key</i> is found:</b></p>
  147    178   
    /// <ul>
  148    179   
    /// <li>
  149    180   
    /// <p><code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute.</p></li>
  150    181   
    /// <li>
  151    182   
    /// <p><code>DELETE</code> - Nothing happens; there is no attribute to delete.</p></li>
  152    183   
    /// <li>
  153    184   
    /// <p><code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p></li>
  154    185   
    /// </ul>
         186  +
    /* BuilderGenerator.kt:291 */
  155    187   
    pub fn action(mut self, input: crate::types::AttributeAction) -> Self {
         188  +
        /* BuilderGenerator.kt:292 */
  156    189   
        self.action = ::std::option::Option::Some(input);
         190  +
        /* BuilderGenerator.kt:293 */
  157    191   
        self
         192  +
        /* BuilderGenerator.kt:291 */
  158    193   
    }
  159         -
    /// <p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
         194  +
    /// /* BuilderGenerator.kt:312 */<p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
  160    195   
    /// <p><b>If an item with the specified <i>Key</i> is found in the table:</b></p>
  161    196   
    /// <ul>
  162    197   
    /// <li>
  163    198   
    /// <p><code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.</p></li>
  164    199   
    /// <li>
  165    200   
    /// <p><code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p>
  166    201   
    /// <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specified <code>\[a,c\]</code>, then the final attribute value would be <code>\[b\]</code>. Specifying an empty set is an error.</p></li>
  167    202   
    /// <li>
  168    203   
    /// <p><code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
  169    204   
    /// <ul>
  170    205   
    /// <li>
  171    206   
    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
  172    207   
    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p>
  173    208   
    /// <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p>
  174    209   
    /// </note></li>
  175    210   
    /// <li>
  176    211   
    /// <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value would be <code>\[1,2,3\]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
  177    212   
    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p></li>
  178    213   
    /// </ul>
  179    214   
    /// <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p></li>
  180    215   
    /// </ul>
  181    216   
    /// <p><b>If no item with the specified <i>Key</i> is found:</b></p>
  182    217   
    /// <ul>
  183    218   
    /// <li>
  184    219   
    /// <p><code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute.</p></li>
  185    220   
    /// <li>
  186    221   
    /// <p><code>DELETE</code> - Nothing happens; there is no attribute to delete.</p></li>
  187    222   
    /// <li>
  188    223   
    /// <p><code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p></li>
  189    224   
    /// </ul>
         225  +
    /* BuilderGenerator.kt:314 */
  190    226   
    pub fn set_action(mut self, input: ::std::option::Option<crate::types::AttributeAction>) -> Self {
         227  +
        /* BuilderGenerator.kt:315 */
  191    228   
        self.action = input;
  192    229   
        self
         230  +
        /* BuilderGenerator.kt:314 */
  193    231   
    }
  194         -
    /// <p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
         232  +
    /// /* BuilderGenerator.kt:334 */<p>Specifies how to perform the update. Valid values are <code>PUT</code> (default), <code>DELETE</code>, and <code>ADD</code>. The behavior depends on whether the specified primary key already exists in the table.</p>
  195    233   
    /// <p><b>If an item with the specified <i>Key</i> is found in the table:</b></p>
  196    234   
    /// <ul>
  197    235   
    /// <li>
  198    236   
    /// <p><code>PUT</code> - Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.</p></li>
  199    237   
    /// <li>
  200    238   
    /// <p><code>DELETE</code> - If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.</p>
  201    239   
    /// <p>If a <i>set</i> of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set <code>\[a,b,c\]</code> and the <code>DELETE</code> action specified <code>\[a,c\]</code>, then the final attribute value would be <code>\[b\]</code>. Specifying an empty set is an error.</p></li>
  202    240   
    /// <li>
  203    241   
    /// <p><code>ADD</code> - If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior of <code>ADD</code> depends on the data type of the attribute:</p>
  204    242   
    /// <ul>
  205    243   
    /// <li>
  206    244   
    /// <p>If the existing attribute is a number, and if <code>Value</code> is also a number, then the <code>Value</code> is mathematically added to the existing attribute. If <code>Value</code> is a negative number, then it is subtracted from the existing attribute.</p><note>
  207    245   
    /// <p>If you use <code>ADD</code> to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.</p>
  208    246   
    /// <p>In addition, if you use <code>ADD</code> to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses <code>0</code> as the initial value. For example, suppose that the item you want to update does not yet have an attribute named <i>itemcount</i>, but you decide to <code>ADD</code> the number <code>3</code> to this attribute anyway, even though it currently does not exist. DynamoDB will create the <i>itemcount</i> attribute, set its initial value to <code>0</code>, and finally add <code>3</code> to it. The result will be a new <i>itemcount</i> attribute in the item, with a value of <code>3</code>.</p>
  209    247   
    /// </note></li>
  210    248   
    /// <li>
  211    249   
    /// <p>If the existing data type is a set, and if the <code>Value</code> is also a set, then the <code>Value</code> is added to the existing set. (This is a <i>set</i> operation, not mathematical addition.) For example, if the attribute value was the set <code>\[1,2\]</code>, and the <code>ADD</code> action specified <code>\[3\]</code>, then the final attribute value would be <code>\[1,2,3\]</code>. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.</p>
  212    250   
    /// <p>Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the <code>Value</code> must also be a set of strings. The same holds true for number sets and binary sets.</p></li>
  213    251   
    /// </ul>
  214    252   
    /// <p>This action is only valid for an existing attribute whose data type is number or is a set. Do not use <code>ADD</code> for any other data types.</p></li>
  215    253   
    /// </ul>
  216    254   
    /// <p><b>If no item with the specified <i>Key</i> is found:</b></p>
  217    255   
    /// <ul>
  218    256   
    /// <li>
  219    257   
    /// <p><code>PUT</code> - DynamoDB creates a new item with the specified primary key, and then adds the attribute.</p></li>
  220    258   
    /// <li>
  221    259   
    /// <p><code>DELETE</code> - Nothing happens; there is no attribute to delete.</p></li>
  222    260   
    /// <li>
  223    261   
    /// <p><code>ADD</code> - DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.</p></li>
  224    262   
    /// </ul>
         263  +
    /* BuilderGenerator.kt:336 */
  225    264   
    pub fn get_action(&self) -> &::std::option::Option<crate::types::AttributeAction> {
         265  +
        /* BuilderGenerator.kt:337 */
  226    266   
        &self.action
         267  +
        /* BuilderGenerator.kt:336 */
  227    268   
    }
  228         -
    /// Consumes the builder and constructs a [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         269  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`AttributeValueUpdate`](crate::types::AttributeValueUpdate).
         270  +
    /* BuilderGenerator.kt:253 */
  229    271   
    pub fn build(self) -> crate::types::AttributeValueUpdate {
         272  +
        /* BuilderGenerator.kt:477 */
  230    273   
        crate::types::AttributeValueUpdate {
  231         -
            value: self.value,
         274  +
            /* BuilderGenerator.kt:481 */ value: self.value,
         275  +
            /* BuilderGenerator.kt:481 */
  232    276   
            action: self.action,
         277  +
            /* BuilderGenerator.kt:477 */
  233    278   
        }
         279  +
        /* BuilderGenerator.kt:253 */
  234    280   
    }
         281  +
    /* BuilderGenerator.kt:355 */
  235    282   
}

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

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

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

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