Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/protocol_serde/shape_unit_union.rs

@@ -1,1 +70,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborParserGenerator.kt:749 */
    2      3   
pub(crate) fn de_unit_union(
    3      4   
    decoder: &mut ::aws_smithy_cbor::Decoder,
    4      5   
) -> ::std::result::Result<crate::model::UnitUnion, ::aws_smithy_cbor::decode::DeserializeError> {
    5      6   
    fn pair(
    6      7   
        decoder: &mut ::aws_smithy_cbor::Decoder,
    7      8   
    ) -> ::std::result::Result<crate::model::UnitUnion, ::aws_smithy_cbor::decode::DeserializeError>
    8      9   
    {
    9     10   
        Ok(match decoder.str()?.as_ref() {
   10     11   
            "unitA" => {
   11     12   
                decoder.skip()?;
   12     13   
                crate::model::UnitUnion::UnitA
   13     14   
            }
   14     15   
            "unitB" => {
   15     16   
                decoder.skip()?;
   16     17   
                crate::model::UnitUnion::UnitB
   17     18   
            }
   18     19   
            variant => {
   19     20   
                return Err(
   20     21   
                    ::aws_smithy_cbor::decode::DeserializeError::unknown_union_variant(
   21     22   
                        variant,
   22     23   
                        decoder.position(),
   23     24   
                    ),
   24     25   
                )
   25     26   
            }
   26     27   
        })
   27     28   
    }
   28     29   
   29     30   
    match decoder.map()? {
   30     31   
        None => {
   31     32   
            let variant = pair(decoder)?;
   32     33   
            match decoder.datatype()? {
   33     34   
                ::aws_smithy_cbor::data::Type::Break => {
   34     35   
                    decoder.skip()?;
   35     36   
                    Ok(variant)
   36     37   
                }
   37     38   
                ty => Err(
   38     39   
                    ::aws_smithy_cbor::decode::DeserializeError::unexpected_union_variant(
   39     40   
                        ty,
   40     41   
                        decoder.position(),
   41     42   
                    ),
   42     43   
                ),
   43     44   
            }
   44     45   
        }
   45     46   
        Some(1) => pair(decoder),
   46     47   
        Some(_) => Err(
   47     48   
            ::aws_smithy_cbor::decode::DeserializeError::mixed_union_variants(decoder.position()),
   48     49   
        ),
   49     50   
    }
   50     51   
}
   51     52   
          53  +
/* CborSerializerGenerator.kt:528 */
   52     54   
pub fn ser_unit_union(
   53     55   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   54     56   
    input: &crate::model::UnitUnion,
   55     57   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          58  +
    /* CborSerializerGenerator.kt:545 */
   56     59   
    encoder.map(1);
          60  +
    /* CborSerializerGenerator.kt:548 */
   57     61   
    match input {
          62  +
        /* CborSerializerGenerator.kt:556 */
   58     63   
        crate::model::UnitUnion::UnitA => {
          64  +
            /* SerializerUtil.kt:42 */
          65  +
            {
          66  +
                /* CborSerializerGenerator.kt:486 */
   59     67   
                encoder.str("unitA");
          68  +
                /* CborSerializerGenerator.kt:348 */
   60     69   
                encoder.begin_map();
          70  +
                /* CborSerializerGenerator.kt:358 */
   61     71   
                encoder.end();
          72  +
                /* SerializerUtil.kt:42 */
          73  +
            }
          74  +
            /* CborSerializerGenerator.kt:556 */
   62     75   
        }
          76  +
        /* CborSerializerGenerator.kt:556 */
   63     77   
        crate::model::UnitUnion::UnitB => {
          78  +
            /* SerializerUtil.kt:42 */
          79  +
            {
          80  +
                /* CborSerializerGenerator.kt:486 */
   64     81   
                encoder.str("unitB");
          82  +
                /* CborSerializerGenerator.kt:348 */
   65     83   
                encoder.begin_map();
          84  +
                /* CborSerializerGenerator.kt:358 */
   66     85   
                encoder.end();
          86  +
                /* SerializerUtil.kt:42 */
   67     87   
            }
          88  +
            /* CborSerializerGenerator.kt:556 */
          89  +
        } /* CborSerializerGenerator.kt:548 */
   68     90   
    }
          91  +
    /* CborSerializerGenerator.kt:568 */
   69     92   
    ::std::result::Result::Ok(())
          93  +
    /* CborSerializerGenerator.kt:528 */
   70     94   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/protocol_serde/shape_validation_exception.rs

@@ -1,1 +40,66 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:228 */
    2      3   
pub fn ser_validation_exception_error(
    3      4   
    value: &crate::error::ValidationException,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::std::vec::Vec<u8>,
    6      7   
    ::aws_smithy_types::error::operation::SerializationError,
    7      8   
> {
           9  +
    /* CborSerializerGenerator.kt:233 */
    8     10   
    let mut encoder = ::aws_smithy_cbor::Encoder::new(::std::vec::Vec::new());
          11  +
    /* CborSerializerGenerator.kt:235 */
    9     12   
    {
          13  +
        /* CborSerializerGenerator.kt:236 */
   10     14   
        let encoder = &mut encoder;
          15  +
        /* CborSerializerGenerator.kt:403 */
   11     16   
        crate::protocol_serde::shape_validation_exception::ser_validation_exception(
   12     17   
            encoder, value,
   13     18   
        )?;
          19  +
        /* CborSerializerGenerator.kt:235 */
   14     20   
    }
          21  +
    /* CborSerializerGenerator.kt:242 */
   15     22   
    ::std::result::Result::Ok(encoder.into_writer())
          23  +
    /* CborSerializerGenerator.kt:228 */
   16     24   
}
   17     25   
          26  +
/* CborSerializerGenerator.kt:369 */
   18     27   
pub fn ser_validation_exception(
   19     28   
    encoder: &mut ::aws_smithy_cbor::Encoder,
   20     29   
    #[allow(unused)] input: &crate::error::ValidationException,
   21     30   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          31  +
    /* CborSerializerGenerator.kt:377 */
   22     32   
    encoder.begin_map();
          33  +
    /* AddTypeFieldToServerErrorsCborCustomization.kt:47 */
   23     34   
    encoder
   24     35   
        .str("__type")
   25     36   
        .str("smithy.framework#ValidationException");
          37  +
    /* SerializerUtil.kt:42 */
   26     38   
    {
          39  +
        /* CborSerializerGenerator.kt:462 */
   27     40   
        encoder.str("message").str(input.message.as_str());
          41  +
        /* SerializerUtil.kt:42 */
   28     42   
    }
          43  +
    /* CborSerializerGenerator.kt:414 */
   29     44   
    if let Some(var_1) = &input.field_list {
          45  +
        /* CborSerializerGenerator.kt:486 */
   30     46   
        encoder.str("fieldList");
          47  +
        /* CborSerializerGenerator.kt:504 */
   31     48   
        encoder.array((*var_1).len());
          49  +
        /* CborSerializerGenerator.kt:506 */
   32     50   
        for item_2 in var_1 {
          51  +
            /* SerializerUtil.kt:42 */
   33     52   
            {
          53  +
                /* CborSerializerGenerator.kt:403 */
   34     54   
                crate::protocol_serde::shape_validation_exception_field::ser_validation_exception_field(encoder, item_2 )?;
          55  +
                /* SerializerUtil.kt:42 */
   35     56   
            }
          57  +
            /* CborSerializerGenerator.kt:506 */
   36     58   
        }
          59  +
        /* CborSerializerGenerator.kt:414 */
   37     60   
    }
          61  +
    /* CborSerializerGenerator.kt:393 */
   38     62   
    encoder.end();
          63  +
    /* CborSerializerGenerator.kt:394 */
   39     64   
    Ok(())
          65  +
    /* CborSerializerGenerator.kt:369 */
   40     66   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/protocol_serde/shape_validation_exception_field.rs

@@ -1,1 +15,26 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CborSerializerGenerator.kt:369 */
    2      3   
pub fn ser_validation_exception_field(
    3      4   
    encoder: &mut ::aws_smithy_cbor::Encoder,
    4      5   
    #[allow(unused)] input: &crate::model::ValidationExceptionField,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* CborSerializerGenerator.kt:377 */
    6      8   
    encoder.begin_map();
           9  +
    /* SerializerUtil.kt:42 */
    7     10   
    {
          11  +
        /* CborSerializerGenerator.kt:462 */
    8     12   
        encoder.str("path").str(input.path.as_str());
          13  +
        /* SerializerUtil.kt:42 */
    9     14   
    }
          15  +
    /* SerializerUtil.kt:42 */
   10     16   
    {
          17  +
        /* CborSerializerGenerator.kt:462 */
   11     18   
        encoder.str("message").str(input.message.as_str());
          19  +
        /* SerializerUtil.kt:42 */
   12     20   
    }
          21  +
    /* CborSerializerGenerator.kt:393 */
   13     22   
    encoder.end();
          23  +
    /* CborSerializerGenerator.kt:394 */
   14     24   
    Ok(())
          25  +
    /* CborSerializerGenerator.kt:369 */
   15     26   
}

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/service.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerServiceGenerator.kt:795 */
    2      3   
/// The service builder for [`RpcV2CborService`].
    3      4   
///
    4      5   
/// Constructed via [`RpcV2CborService::builder`].
    5      6   
pub struct RpcV2CborServiceBuilder<Body, L, HttpPl, ModelPl> {
    6      7   
    complex_struct_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      8   
    empty_struct_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8      9   
    error_serialization_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9     10   
    simple_struct_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10     11   
    single_member_struct_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11     12   
    layer: L,
@@ -1235,1236 +1294,1296 @@
 1255   1256   
            "smithy.protocoltests.rpcv2Cbor",
 1256   1257   
            "RpcV2CborService",
 1257   1258   
        );
 1258   1259   
 1259   1260   
    const VERSION: Option<&'static str> = Some("");
 1260   1261   
 1261   1262   
    type Protocol = ::aws_smithy_http_server::protocol::rpc_v2_cbor::RpcV2Cbor;
 1262   1263   
 1263   1264   
    type Operations = Operation;
 1264   1265   
}
        1266  +
/* ServiceConfigGenerator.kt:178 */
 1265   1267   
/// Configuration for the [`RpcV2CborService`]. This is the central place where to register and
 1266   1268   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
 1267   1269   
///
 1268   1270   
/// ```rust,no_run
 1269   1271   
/// # use rpcv2cbor_extras::RpcV2CborServiceConfig;
 1270   1272   
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
 1271   1273   
/// # use ::tower::layer::util::Identity;
 1272   1274   
/// # let authentication_plugin = IdentityPlugin;
 1273   1275   
/// # let authorization_plugin = IdentityPlugin;
 1274   1276   
/// # let server_request_id_provider_layer = Identity::new();
@@ -1356,1358 +1415,1418 @@
 1376   1378   
 1377   1379   
    /// Build the configuration.
 1378   1380   
    pub fn build(self) -> super::RpcV2CborServiceConfig<L, H, M> {
 1379   1381   
        super::RpcV2CborServiceConfig {
 1380   1382   
            layers: self.layers,
 1381   1383   
            http_plugins: self.http_plugins,
 1382   1384   
            model_plugins: self.model_plugins,
 1383   1385   
        }
 1384   1386   
    }
 1385   1387   
}
        1388  +
/* ScopeMacroGenerator.kt:81 */
 1386   1389   
/// A macro to help with scoping [plugins](crate::server::plugin) to a subset of all operations.
 1387   1390   
///
 1388   1391   
/// In contrast to [`crate::server::scope`](crate::server::scope), this macro has knowledge
 1389   1392   
/// of the service and any operations _not_ specified will be placed in the opposing group.
 1390   1393   
///
 1391   1394   
/// # Example
 1392   1395   
///
 1393   1396   
/// ```rust
 1394   1397   
/// scope! {
 1395   1398   
///     /// Includes [`ComplexStructOperation`], excluding all other operations.

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/types.rs

@@ -1,1 +0,7 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
           4  +
/* ServerRequiredCustomizations.kt:69 */
    3      5   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
    4      6   
pub use ::aws_smithy_types::Blob;
    5         -
pub use ::aws_smithy_types::DateTime;
           7  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/unconstrained.rs

@@ -1,1 +188,229 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* UnconstrainedUnionGenerator.kt:121 */
    3      4   
impl crate::constrained::Constrained for crate::model::ComplexUnion {
    4      5   
    type Unconstrained =
    5      6   
        crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained;
    6      7   
}
    7      8   
    8      9   
impl From<crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained>
    9     10   
    for crate::constrained::MaybeConstrained<crate::model::ComplexUnion>
   10     11   
{
   11     12   
    fn from(
   12     13   
        value: crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained,
   13     14   
    ) -> Self {
   14     15   
        Self::Unconstrained(value)
   15     16   
    }
   16     17   
}
   17     18   
   18     19   
pub(crate) mod complex_union_unconstrained {
   19     20   
          21  +
    /* UnconstrainedUnionGenerator.kt:82 */
   20     22   
    #[allow(clippy::enum_variant_names)]
   21     23   
    #[derive(Debug, Clone)]
   22     24   
    pub(crate) enum ComplexUnionUnconstrained {
          25  +
        /* UnconstrainedUnionGenerator.kt:95 */
   23     26   
        ComplexStruct(crate::model::complex_struct::Builder),
          27  +
        /* UnconstrainedUnionGenerator.kt:95 */
   24     28   
        List(::std::vec::Vec<::std::string::String>),
          29  +
        /* UnconstrainedUnionGenerator.kt:95 */
   25     30   
        Map(::std::collections::HashMap<::std::string::String, i32>),
          31  +
        /* UnconstrainedUnionGenerator.kt:95 */
   26     32   
        Structure(crate::model::simple_struct::Builder),
          33  +
        /* UnconstrainedUnionGenerator.kt:95 */
   27     34   
        Union(crate::model::SimpleUnion),
          35  +
        /* UnconstrainedUnionGenerator.kt:82 */
   28     36   
    }
          37  +
    /* UnconstrainedUnionGenerator.kt:103 */
   29     38   
    impl ::std::convert::TryFrom<ComplexUnionUnconstrained> for crate::model::ComplexUnion {
   30     39   
        type Error = crate::model::complex_union::ConstraintViolation;
   31     40   
   32     41   
        fn try_from(value: ComplexUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
   33     42   
            Ok(
   34     43   
        match value {
   35     44   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained::ComplexStruct(unconstrained) => Self::ComplexStruct(
   36     45   
                unconstrained
   37     46   
                                        .try_into()
   38     47   
                                        
   39     48   
                                        
   40     49   
                                        .map_err(Self::Error::ComplexStruct)?
   41     50   
            ),
   42     51   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained::List(unconstrained) => Self::List(
   43     52   
                unconstrained
   44     53   
            ),
   45     54   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained::Map(unconstrained) => Self::Map(
   46     55   
                unconstrained
   47     56   
            ),
   48     57   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained::Structure(unconstrained) => Self::Structure(
   49     58   
                unconstrained
   50     59   
                                        .try_into()
   51     60   
                                        
   52     61   
                                        
   53     62   
                                        .map_err(Self::Error::Structure)?
   54     63   
            ),
   55     64   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained::Union(unconstrained) => Self::Union(
   56     65   
                unconstrained
   57     66   
            ),
   58     67   
        }
   59     68   
    )
   60     69   
        }
   61     70   
    }
          71  +
          72  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   62     73   
}
   63     74   
pub(crate) mod complex_map_unconstrained {
   64     75   
          76  +
    /* UnconstrainedMapGenerator.kt:79 */
   65     77   
    #[derive(Debug, Clone)]
   66     78   
    pub(crate) struct ComplexMapUnconstrained(
   67     79   
        pub(crate)  std::collections::HashMap<
   68     80   
            ::std::string::String,
   69     81   
            crate::unconstrained::complex_union_unconstrained::ComplexUnionUnconstrained,
   70     82   
        >,
   71     83   
    );
   72     84   
   73     85   
    impl From<ComplexMapUnconstrained>
   74     86   
        for crate::constrained::MaybeConstrained<
   75     87   
            crate::constrained::complex_map_constrained::ComplexMapConstrained,
   76     88   
        >
   77     89   
    {
   78     90   
        fn from(value: ComplexMapUnconstrained) -> Self {
   79     91   
            Self::Unconstrained(value)
   80     92   
        }
   81     93   
    }
          94  +
    /* UnconstrainedMapGenerator.kt:101 */
   82     95   
    impl std::convert::TryFrom<ComplexMapUnconstrained>
   83     96   
        for crate::constrained::complex_map_constrained::ComplexMapConstrained
   84     97   
    {
          98  +
        /* UnconstrainedMapGenerator.kt:102 */
   85     99   
        type Error = crate::model::complex_map::ConstraintViolation;
         100  +
        /* UnconstrainedMapGenerator.kt:104 */
   86    101   
        fn try_from(value: ComplexMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         102  +
            /* UnconstrainedMapGenerator.kt:186 */
   87    103   
            let res: ::std::result::Result<
   88    104   
                ::std::collections::HashMap<::std::string::String, crate::model::ComplexUnion>,
   89    105   
                Self::Error,
   90    106   
            > = value
   91    107   
                .0
   92    108   
                .into_iter()
   93    109   
                .map(
   94    110   
                    |(k, v)| match crate::model::ComplexUnion::try_from(v).map_err(Box::new) {
   95    111   
                        Ok(v) => Ok((k, v)),
   96    112   
                        Err(inner_constraint_violation) => {
   97    113   
                            Err(Self::Error::Value(k, inner_constraint_violation))
   98    114   
                        }
   99    115   
                    },
  100    116   
                )
  101    117   
                .collect();
  102    118   
            let hm = res?;
         119  +
            /* UnconstrainedMapGenerator.kt:247 */
  103    120   
            Ok(Self(hm))
         121  +
            /* UnconstrainedMapGenerator.kt:104 */
  104    122   
        }
         123  +
        /* UnconstrainedMapGenerator.kt:101 */
  105    124   
    }
         125  +
         126  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  106    127   
}
  107    128   
pub(crate) mod complex_list_unconstrained {
  108    129   
         130  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  109    131   
    #[derive(Debug, Clone)]
  110    132   
    pub(crate) struct ComplexListUnconstrained(
  111    133   
        pub(crate) 
  112    134   
            std::vec::Vec<crate::unconstrained::complex_map_unconstrained::ComplexMapUnconstrained>,
  113    135   
    );
  114    136   
  115    137   
    impl From<ComplexListUnconstrained>
  116    138   
        for crate::constrained::MaybeConstrained<
  117    139   
            crate::constrained::complex_list_constrained::ComplexListConstrained,
  118    140   
        >
  119    141   
    {
  120    142   
        fn from(value: ComplexListUnconstrained) -> Self {
  121    143   
            Self::Unconstrained(value)
  122    144   
        }
  123    145   
    }
         146  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  124    147   
    impl std::convert::TryFrom<ComplexListUnconstrained>
  125    148   
        for crate::constrained::complex_list_constrained::ComplexListConstrained
  126    149   
    {
         150  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  127    151   
        type Error = crate::model::complex_list::ConstraintViolation;
         152  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  128    153   
        fn try_from(value: ComplexListUnconstrained) -> std::result::Result<Self, Self::Error> {
         154  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  129    155   
            let res: ::std::result::Result<
  130    156   
                ::std::vec::Vec<crate::constrained::complex_map_constrained::ComplexMapConstrained>,
  131    157   
                (usize, crate::model::complex_map::ConstraintViolation),
  132    158   
            > = value
  133    159   
                .0
  134    160   
                .into_iter()
  135    161   
                .enumerate()
  136    162   
                .map(|(idx, inner)| {
  137    163   
                    inner
  138    164   
                        .try_into()
  139    165   
                        .map_err(|inner_violation| (idx, inner_violation))
  140    166   
                })
  141    167   
                .collect();
  142    168   
            let inner = res
  143    169   
                .map_err(|(idx, inner_violation)| (idx, Box::new(inner_violation)))
  144    170   
                .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         171  +
            /* UnconstrainedCollectionGenerator.kt:191 */
  145    172   
            Ok(Self(inner))
         173  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  146    174   
        }
         175  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  147    176   
    }
         177  +
         178  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  148    179   
}
  149    180   
pub(crate) mod struct_list_unconstrained {
  150    181   
         182  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  151    183   
    #[derive(Debug, Clone)]
  152    184   
    pub(crate) struct StructListUnconstrained(
  153    185   
        pub(crate) std::vec::Vec<crate::model::simple_struct::Builder>,
  154    186   
    );
  155    187   
  156    188   
    impl From<StructListUnconstrained>
  157    189   
        for crate::constrained::MaybeConstrained<
  158    190   
            crate::constrained::struct_list_constrained::StructListConstrained,
  159    191   
        >
  160    192   
    {
  161    193   
        fn from(value: StructListUnconstrained) -> Self {
  162    194   
            Self::Unconstrained(value)
  163    195   
        }
  164    196   
    }
         197  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  165    198   
    impl std::convert::TryFrom<StructListUnconstrained>
  166    199   
        for crate::constrained::struct_list_constrained::StructListConstrained
  167    200   
    {
         201  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  168    202   
        type Error = crate::model::struct_list::ConstraintViolation;
         203  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  169    204   
        fn try_from(value: StructListUnconstrained) -> std::result::Result<Self, Self::Error> {
         205  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  170    206   
            let res: ::std::result::Result<
  171    207   
                ::std::vec::Vec<crate::model::SimpleStruct>,
  172    208   
                (usize, crate::model::simple_struct::ConstraintViolation),
  173    209   
            > = value
  174    210   
                .0
  175    211   
                .into_iter()
  176    212   
                .enumerate()
  177    213   
                .map(|(idx, inner)| {
  178    214   
                    inner
  179    215   
                        .try_into()
  180    216   
                        .map_err(|inner_violation| (idx, inner_violation))
  181    217   
                })
  182    218   
                .collect();
  183    219   
            let inner =
  184    220   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         221  +
            /* UnconstrainedCollectionGenerator.kt:191 */
  185    222   
            Ok(Self(inner))
         223  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  186    224   
        }
         225  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  187    226   
    }
         227  +
         228  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  188    229   
}

tmp-codegen-diff/codegen-server-test/s3/rust-server-codegen/src/error.rs

@@ -1,1 +329,651 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerOperationErrorGenerator.kt:63 */
    2      3   
/// Error type for the `GetObject` operation.
           4  +
/* ServerOperationErrorGenerator.kt:64 */
    3      5   
/// Each variant represents an error that can occur for the `GetObject` operation.
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::fmt::Debug)]
    5         -
pub enum GetObjectError {
    6         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           8  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum GetObjectError {
           9  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          10  +
    /* ServerOperationErrorGenerator.kt:71 */
    7     11   
    ValidationException(crate::error::ValidationException),
          12  +
    /* ServerOperationErrorGenerator.kt:66 */
    8     13   
}
          14  +
/* ServerOperationErrorGenerator.kt:75 */
    9     15   
impl ::std::fmt::Display for GetObjectError {
          16  +
    /* ServerOperationErrorGenerator.kt:76 */
   10     17   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          18  +
        /* ServerOperationErrorGenerator.kt:139 */
   11     19   
        match &self {
   12         -
            GetObjectError::ValidationException(_inner) => _inner.fmt(f),
          20  +
            /* ServerOperationErrorGenerator.kt:142 */
          21  +
            GetObjectError::ValidationException(_inner) =>
          22  +
            /* ServerOperationErrorGenerator.kt:78 */
          23  +
            {
          24  +
                _inner.fmt(f)
          25  +
            }
          26  +
            /* ServerOperationErrorGenerator.kt:139 */
   13     27   
        }
          28  +
        /* ServerOperationErrorGenerator.kt:76 */
   14     29   
    }
          30  +
    /* ServerOperationErrorGenerator.kt:75 */
   15     31   
}
          32  +
/* ServerOperationErrorGenerator.kt:83 */
   16     33   
impl GetObjectError {
          34  +
    /* ServerOperationErrorGenerator.kt:87 */
   17     35   
    /// Returns `true` if the error kind is `GetObjectError::ValidationException`.
          36  +
    /* ServerOperationErrorGenerator.kt:88 */
   18     37   
    pub fn is_validation_exception(&self) -> bool {
          38  +
        /* ServerOperationErrorGenerator.kt:89 */
   19     39   
        matches!(&self, GetObjectError::ValidationException(_))
          40  +
        /* ServerOperationErrorGenerator.kt:88 */
   20     41   
    }
          42  +
    /* ServerOperationErrorGenerator.kt:92 */
   21     43   
    /// Returns the error name string by matching the correct variant.
          44  +
    /* ServerOperationErrorGenerator.kt:93 */
   22     45   
    pub fn name(&self) -> &'static str {
          46  +
        /* ServerOperationErrorGenerator.kt:139 */
   23     47   
        match &self {
   24         -
            GetObjectError::ValidationException(_inner) => _inner.name(),
          48  +
            /* ServerOperationErrorGenerator.kt:142 */
          49  +
            GetObjectError::ValidationException(_inner) =>
          50  +
            /* ServerOperationErrorGenerator.kt:95 */
          51  +
            {
          52  +
                _inner.name()
   25     53   
            }
          54  +
            /* ServerOperationErrorGenerator.kt:139 */
   26     55   
        }
          56  +
        /* ServerOperationErrorGenerator.kt:93 */
          57  +
    }
          58  +
    /* ServerOperationErrorGenerator.kt:83 */
   27     59   
}
          60  +
/* ServerOperationErrorGenerator.kt:100 */
   28     61   
impl ::std::error::Error for GetObjectError {
          62  +
    /* ServerOperationErrorGenerator.kt:101 */
   29     63   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          64  +
        /* ServerOperationErrorGenerator.kt:139 */
   30     65   
        match &self {
   31         -
            GetObjectError::ValidationException(_inner) => Some(_inner),
          66  +
            /* ServerOperationErrorGenerator.kt:142 */
          67  +
            GetObjectError::ValidationException(_inner) =>
          68  +
            /* ServerOperationErrorGenerator.kt:103 */
          69  +
            {
          70  +
                Some(_inner)
   32     71   
            }
          72  +
            /* ServerOperationErrorGenerator.kt:139 */
   33     73   
        }
          74  +
        /* ServerOperationErrorGenerator.kt:101 */
          75  +
    }
          76  +
    /* ServerOperationErrorGenerator.kt:100 */
   34     77   
}
          78  +
/* ServerOperationErrorGenerator.kt:110 */
   35     79   
impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetObjectError {
          80  +
    /* ServerOperationErrorGenerator.kt:111 */
   36     81   
    fn from(variant: crate::error::ValidationException) -> crate::error::GetObjectError {
          82  +
        /* ServerOperationErrorGenerator.kt:112 */
   37     83   
        Self::ValidationException(variant)
          84  +
        /* ServerOperationErrorGenerator.kt:111 */
   38     85   
    }
          86  +
    /* ServerOperationErrorGenerator.kt:110 */
   39     87   
}
   40     88   
   41         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          89  +
/// /* StructureGenerator.kt:197 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          90  +
/* RustType.kt:516 */
   42     91   
#[derive(
   43     92   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   44     93   
)]
   45         -
pub struct ValidationException {
   46         -
    /// A summary of the validation failure.
          94  +
pub /* StructureGenerator.kt:201 */ struct ValidationException {
          95  +
    /// /* StructureGenerator.kt:231 */A summary of the validation failure.
   47     96   
    pub message: ::std::string::String,
   48         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          97  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   49     98   
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          99  +
    /* StructureGenerator.kt:201 */
   50    100   
}
         101  +
/* StructureGenerator.kt:135 */
   51    102   
impl ValidationException {
   52         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         103  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         104  +
    /* StructureGenerator.kt:166 */
   53    105   
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         106  +
        /* StructureGenerator.kt:169 */
   54    107   
        self.field_list.as_deref()
         108  +
        /* StructureGenerator.kt:166 */
   55    109   
    }
         110  +
    /* StructureGenerator.kt:135 */
   56    111   
}
         112  +
/* ErrorImplGenerator.kt:99 */
   57    113   
impl ValidationException {
         114  +
    /* ErrorImplGenerator.kt:128 */
   58    115   
    /// Returns the error message.
   59    116   
    pub fn message(&self) -> &str {
   60    117   
        &self.message
   61    118   
    }
         119  +
    /* ErrorImplGenerator.kt:141 */
   62    120   
    #[doc(hidden)]
   63    121   
    /// Returns the error name.
   64    122   
    pub fn name(&self) -> &'static str {
   65    123   
        "ValidationException"
   66    124   
    }
         125  +
    /* ErrorImplGenerator.kt:99 */
   67    126   
}
         127  +
/* ErrorImplGenerator.kt:153 */
   68    128   
impl ::std::fmt::Display for ValidationException {
         129  +
    /* ErrorImplGenerator.kt:154 */
   69    130   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         131  +
        /* ErrorImplGenerator.kt:161 */
   70    132   
        ::std::write!(f, "ValidationException")?;
         133  +
        /* ErrorImplGenerator.kt:166 */
   71    134   
        {
         135  +
            /* ErrorImplGenerator.kt:167 */
   72    136   
            ::std::write!(f, ": {}", &self.message)?;
         137  +
            /* ErrorImplGenerator.kt:166 */
   73    138   
        }
         139  +
        /* ErrorImplGenerator.kt:171 */
   74    140   
        Ok(())
         141  +
        /* ErrorImplGenerator.kt:154 */
   75    142   
    }
         143  +
    /* ErrorImplGenerator.kt:153 */
   76    144   
}
         145  +
/* ErrorImplGenerator.kt:175 */
   77    146   
impl ::std::error::Error for ValidationException {}
         147  +
/* ServerCodegenVisitor.kt:345 */
   78    148   
impl ValidationException {
   79         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         149  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         150  +
    /* ServerBuilderGenerator.kt:295 */
   80    151   
    pub fn builder() -> crate::error::validation_exception::Builder {
         152  +
        /* ServerBuilderGenerator.kt:296 */
   81    153   
        crate::error::validation_exception::Builder::default()
         154  +
        /* ServerBuilderGenerator.kt:295 */
   82    155   
    }
         156  +
    /* ServerCodegenVisitor.kt:345 */
   83    157   
}
   84    158   
         159  +
/* ServerOperationErrorGenerator.kt:63 */
   85    160   
/// Error type for the `DeleteObjectTagging` operation.
         161  +
/* ServerOperationErrorGenerator.kt:64 */
   86    162   
/// Each variant represents an error that can occur for the `DeleteObjectTagging` operation.
         163  +
/* RustType.kt:516 */
   87    164   
#[derive(::std::fmt::Debug)]
   88         -
pub enum DeleteObjectTaggingError {
   89         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         165  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum DeleteObjectTaggingError {
         166  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         167  +
    /* ServerOperationErrorGenerator.kt:71 */
   90    168   
    ValidationException(crate::error::ValidationException),
         169  +
    /* ServerOperationErrorGenerator.kt:66 */
   91    170   
}
         171  +
/* ServerOperationErrorGenerator.kt:75 */
   92    172   
impl ::std::fmt::Display for DeleteObjectTaggingError {
         173  +
    /* ServerOperationErrorGenerator.kt:76 */
   93    174   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         175  +
        /* ServerOperationErrorGenerator.kt:139 */
   94    176   
        match &self {
   95         -
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.fmt(f),
         177  +
            /* ServerOperationErrorGenerator.kt:142 */
         178  +
            DeleteObjectTaggingError::ValidationException(_inner) =>
         179  +
            /* ServerOperationErrorGenerator.kt:78 */
         180  +
            {
         181  +
                _inner.fmt(f)
   96    182   
            }
         183  +
            /* ServerOperationErrorGenerator.kt:139 */
   97    184   
        }
         185  +
        /* ServerOperationErrorGenerator.kt:76 */
         186  +
    }
         187  +
    /* ServerOperationErrorGenerator.kt:75 */
   98    188   
}
         189  +
/* ServerOperationErrorGenerator.kt:83 */
   99    190   
impl DeleteObjectTaggingError {
         191  +
    /* ServerOperationErrorGenerator.kt:87 */
  100    192   
    /// Returns `true` if the error kind is `DeleteObjectTaggingError::ValidationException`.
         193  +
    /* ServerOperationErrorGenerator.kt:88 */
  101    194   
    pub fn is_validation_exception(&self) -> bool {
         195  +
        /* ServerOperationErrorGenerator.kt:89 */
  102    196   
        matches!(&self, DeleteObjectTaggingError::ValidationException(_))
         197  +
        /* ServerOperationErrorGenerator.kt:88 */
  103    198   
    }
         199  +
    /* ServerOperationErrorGenerator.kt:92 */
  104    200   
    /// Returns the error name string by matching the correct variant.
         201  +
    /* ServerOperationErrorGenerator.kt:93 */
  105    202   
    pub fn name(&self) -> &'static str {
         203  +
        /* ServerOperationErrorGenerator.kt:139 */
  106    204   
        match &self {
  107         -
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.name(),
         205  +
            /* ServerOperationErrorGenerator.kt:142 */
         206  +
            DeleteObjectTaggingError::ValidationException(_inner) =>
         207  +
            /* ServerOperationErrorGenerator.kt:95 */
         208  +
            {
         209  +
                _inner.name()
  108    210   
            }
         211  +
            /* ServerOperationErrorGenerator.kt:139 */
  109    212   
        }
         213  +
        /* ServerOperationErrorGenerator.kt:93 */
         214  +
    }
         215  +
    /* ServerOperationErrorGenerator.kt:83 */
  110    216   
}
         217  +
/* ServerOperationErrorGenerator.kt:100 */
  111    218   
impl ::std::error::Error for DeleteObjectTaggingError {
         219  +
    /* ServerOperationErrorGenerator.kt:101 */
  112    220   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         221  +
        /* ServerOperationErrorGenerator.kt:139 */
  113    222   
        match &self {
  114         -
            DeleteObjectTaggingError::ValidationException(_inner) => Some(_inner),
         223  +
            /* ServerOperationErrorGenerator.kt:142 */
         224  +
            DeleteObjectTaggingError::ValidationException(_inner) =>
         225  +
            /* ServerOperationErrorGenerator.kt:103 */
         226  +
            {
         227  +
                Some(_inner)
  115    228   
            }
         229  +
            /* ServerOperationErrorGenerator.kt:139 */
  116    230   
        }
         231  +
        /* ServerOperationErrorGenerator.kt:101 */
         232  +
    }
         233  +
    /* ServerOperationErrorGenerator.kt:100 */
  117    234   
}
         235  +
/* ServerOperationErrorGenerator.kt:110 */
  118    236   
impl ::std::convert::From<crate::error::ValidationException>
  119    237   
    for crate::error::DeleteObjectTaggingError
  120    238   
{
         239  +
    /* ServerOperationErrorGenerator.kt:111 */
  121    240   
    fn from(variant: crate::error::ValidationException) -> crate::error::DeleteObjectTaggingError {
         241  +
        /* ServerOperationErrorGenerator.kt:112 */
  122    242   
        Self::ValidationException(variant)
         243  +
        /* ServerOperationErrorGenerator.kt:111 */
  123    244   
    }
         245  +
    /* ServerOperationErrorGenerator.kt:110 */
  124    246   
}
  125    247   
         248  +
/* ServerOperationErrorGenerator.kt:63 */
  126    249   
/// Error type for the `GetBucketLocation` operation.
         250  +
/* ServerOperationErrorGenerator.kt:64 */
  127    251   
/// Each variant represents an error that can occur for the `GetBucketLocation` operation.
         252  +
/* RustType.kt:516 */
  128    253   
#[derive(::std::fmt::Debug)]
  129         -
pub enum GetBucketLocationError {
  130         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         254  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum GetBucketLocationError {
         255  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         256  +
    /* ServerOperationErrorGenerator.kt:71 */
  131    257   
    ValidationException(crate::error::ValidationException),
         258  +
    /* ServerOperationErrorGenerator.kt:66 */
  132    259   
}
         260  +
/* ServerOperationErrorGenerator.kt:75 */
  133    261   
impl ::std::fmt::Display for GetBucketLocationError {
         262  +
    /* ServerOperationErrorGenerator.kt:76 */
  134    263   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         264  +
        /* ServerOperationErrorGenerator.kt:139 */
  135    265   
        match &self {
  136         -
            GetBucketLocationError::ValidationException(_inner) => _inner.fmt(f),
         266  +
            /* ServerOperationErrorGenerator.kt:142 */
         267  +
            GetBucketLocationError::ValidationException(_inner) =>
         268  +
            /* ServerOperationErrorGenerator.kt:78 */
         269  +
            {
         270  +
                _inner.fmt(f)
  137    271   
            }
         272  +
            /* ServerOperationErrorGenerator.kt:139 */
  138    273   
        }
         274  +
        /* ServerOperationErrorGenerator.kt:76 */
         275  +
    }
         276  +
    /* ServerOperationErrorGenerator.kt:75 */
  139    277   
}
         278  +
/* ServerOperationErrorGenerator.kt:83 */
  140    279   
impl GetBucketLocationError {
         280  +
    /* ServerOperationErrorGenerator.kt:87 */
  141    281   
    /// Returns `true` if the error kind is `GetBucketLocationError::ValidationException`.
         282  +
    /* ServerOperationErrorGenerator.kt:88 */
  142    283   
    pub fn is_validation_exception(&self) -> bool {
         284  +
        /* ServerOperationErrorGenerator.kt:89 */
  143    285   
        matches!(&self, GetBucketLocationError::ValidationException(_))
         286  +
        /* ServerOperationErrorGenerator.kt:88 */
  144    287   
    }
         288  +
    /* ServerOperationErrorGenerator.kt:92 */
  145    289   
    /// Returns the error name string by matching the correct variant.
         290  +
    /* ServerOperationErrorGenerator.kt:93 */
  146    291   
    pub fn name(&self) -> &'static str {
         292  +
        /* ServerOperationErrorGenerator.kt:139 */
  147    293   
        match &self {
  148         -
            GetBucketLocationError::ValidationException(_inner) => _inner.name(),
         294  +
            /* ServerOperationErrorGenerator.kt:142 */
         295  +
            GetBucketLocationError::ValidationException(_inner) =>
         296  +
            /* ServerOperationErrorGenerator.kt:95 */
         297  +
            {
         298  +
                _inner.name()
  149    299   
            }
         300  +
            /* ServerOperationErrorGenerator.kt:139 */
  150    301   
        }
         302  +
        /* ServerOperationErrorGenerator.kt:93 */
         303  +
    }
         304  +
    /* ServerOperationErrorGenerator.kt:83 */
  151    305   
}
         306  +
/* ServerOperationErrorGenerator.kt:100 */
  152    307   
impl ::std::error::Error for GetBucketLocationError {
         308  +
    /* ServerOperationErrorGenerator.kt:101 */
  153    309   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         310  +
        /* ServerOperationErrorGenerator.kt:139 */
  154    311   
        match &self {
  155         -
            GetBucketLocationError::ValidationException(_inner) => Some(_inner),
         312  +
            /* ServerOperationErrorGenerator.kt:142 */
         313  +
            GetBucketLocationError::ValidationException(_inner) =>
         314  +
            /* ServerOperationErrorGenerator.kt:103 */
         315  +
            {
         316  +
                Some(_inner)
  156    317   
            }
         318  +
            /* ServerOperationErrorGenerator.kt:139 */
  157    319   
        }
         320  +
        /* ServerOperationErrorGenerator.kt:101 */
         321  +
    }
         322  +
    /* ServerOperationErrorGenerator.kt:100 */
  158    323   
}
         324  +
/* ServerOperationErrorGenerator.kt:110 */
  159    325   
impl ::std::convert::From<crate::error::ValidationException>
  160    326   
    for crate::error::GetBucketLocationError
  161    327   
{
         328  +
    /* ServerOperationErrorGenerator.kt:111 */
  162    329   
    fn from(variant: crate::error::ValidationException) -> crate::error::GetBucketLocationError {
         330  +
        /* ServerOperationErrorGenerator.kt:112 */
  163    331   
        Self::ValidationException(variant)
         332  +
        /* ServerOperationErrorGenerator.kt:111 */
  164    333   
    }
         334  +
    /* ServerOperationErrorGenerator.kt:110 */
  165    335   
}
  166    336   
         337  +
/* ServerOperationErrorGenerator.kt:63 */
  167    338   
/// Error type for the `ListObjectsV2` operation.
         339  +
/* ServerOperationErrorGenerator.kt:64 */
  168    340   
/// Each variant represents an error that can occur for the `ListObjectsV2` operation.
         341  +
/* RustType.kt:516 */
  169    342   
#[derive(::std::fmt::Debug)]
  170         -
pub enum ListObjectsV2Error {
         343  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum ListObjectsV2Error {
         344  +
    /* ServerOperationErrorGenerator.kt:68 */
  171    345   
    #[allow(missing_docs)] // documentation missing in model
         346  +
    /* ServerOperationErrorGenerator.kt:71 */
  172    347   
    NoSuchBucket(crate::error::NoSuchBucket),
  173         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         348  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         349  +
    /* ServerOperationErrorGenerator.kt:71 */
  174    350   
    ValidationException(crate::error::ValidationException),
         351  +
    /* ServerOperationErrorGenerator.kt:66 */
  175    352   
}
         353  +
/* ServerOperationErrorGenerator.kt:75 */
  176    354   
impl ::std::fmt::Display for ListObjectsV2Error {
         355  +
    /* ServerOperationErrorGenerator.kt:76 */
  177    356   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         357  +
        /* ServerOperationErrorGenerator.kt:139 */
  178    358   
        match &self {
  179         -
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.fmt(f),
  180         -
            ListObjectsV2Error::ValidationException(_inner) => _inner.fmt(f),
         359  +
            /* ServerOperationErrorGenerator.kt:142 */
         360  +
            ListObjectsV2Error::NoSuchBucket(_inner) =>
         361  +
            /* ServerOperationErrorGenerator.kt:78 */
         362  +
            {
         363  +
                _inner.fmt(f)
         364  +
            }
         365  +
            ,
         366  +
            /* ServerOperationErrorGenerator.kt:142 */
         367  +
            ListObjectsV2Error::ValidationException(_inner) =>
         368  +
            /* ServerOperationErrorGenerator.kt:78 */
         369  +
            {
         370  +
                _inner.fmt(f)
         371  +
            }
         372  +
            /* ServerOperationErrorGenerator.kt:139 */
  181    373   
        }
         374  +
        /* ServerOperationErrorGenerator.kt:76 */
  182    375   
    }
         376  +
    /* ServerOperationErrorGenerator.kt:75 */
  183    377   
}
         378  +
/* ServerOperationErrorGenerator.kt:83 */
  184    379   
impl ListObjectsV2Error {
         380  +
    /* ServerOperationErrorGenerator.kt:87 */
  185    381   
    /// Returns `true` if the error kind is `ListObjectsV2Error::NoSuchBucket`.
         382  +
    /* ServerOperationErrorGenerator.kt:88 */
  186    383   
    pub fn is_no_such_bucket(&self) -> bool {
         384  +
        /* ServerOperationErrorGenerator.kt:89 */
  187    385   
        matches!(&self, ListObjectsV2Error::NoSuchBucket(_))
         386  +
        /* ServerOperationErrorGenerator.kt:88 */
  188    387   
    }
         388  +
    /* ServerOperationErrorGenerator.kt:87 */
  189    389   
    /// Returns `true` if the error kind is `ListObjectsV2Error::ValidationException`.
         390  +
    /* ServerOperationErrorGenerator.kt:88 */
  190    391   
    pub fn is_validation_exception(&self) -> bool {
         392  +
        /* ServerOperationErrorGenerator.kt:89 */
  191    393   
        matches!(&self, ListObjectsV2Error::ValidationException(_))
         394  +
        /* ServerOperationErrorGenerator.kt:88 */
  192    395   
    }
         396  +
    /* ServerOperationErrorGenerator.kt:92 */
  193    397   
    /// Returns the error name string by matching the correct variant.
         398  +
    /* ServerOperationErrorGenerator.kt:93 */
  194    399   
    pub fn name(&self) -> &'static str {
         400  +
        /* ServerOperationErrorGenerator.kt:139 */
  195    401   
        match &self {
  196         -
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.name(),
  197         -
            ListObjectsV2Error::ValidationException(_inner) => _inner.name(),
         402  +
            /* ServerOperationErrorGenerator.kt:142 */
         403  +
            ListObjectsV2Error::NoSuchBucket(_inner) =>
         404  +
            /* ServerOperationErrorGenerator.kt:95 */
         405  +
            {
         406  +
                _inner.name()
         407  +
            }
         408  +
            ,
         409  +
            /* ServerOperationErrorGenerator.kt:142 */
         410  +
            ListObjectsV2Error::ValidationException(_inner) =>
         411  +
            /* ServerOperationErrorGenerator.kt:95 */
         412  +
            {
         413  +
                _inner.name()
         414  +
            }
         415  +
            /* ServerOperationErrorGenerator.kt:139 */
  198    416   
        }
         417  +
        /* ServerOperationErrorGenerator.kt:93 */
  199    418   
    }
         419  +
    /* ServerOperationErrorGenerator.kt:83 */
  200    420   
}
         421  +
/* ServerOperationErrorGenerator.kt:100 */
  201    422   
impl ::std::error::Error for ListObjectsV2Error {
         423  +
    /* ServerOperationErrorGenerator.kt:101 */
  202    424   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         425  +
        /* ServerOperationErrorGenerator.kt:139 */
  203    426   
        match &self {
  204         -
            ListObjectsV2Error::NoSuchBucket(_inner) => Some(_inner),
  205         -
            ListObjectsV2Error::ValidationException(_inner) => Some(_inner),
         427  +
            /* ServerOperationErrorGenerator.kt:142 */
         428  +
            ListObjectsV2Error::NoSuchBucket(_inner) =>
         429  +
            /* ServerOperationErrorGenerator.kt:103 */
         430  +
            {
         431  +
                Some(_inner)
         432  +
            }
         433  +
            ,
         434  +
            /* ServerOperationErrorGenerator.kt:142 */
         435  +
            ListObjectsV2Error::ValidationException(_inner) =>
         436  +
            /* ServerOperationErrorGenerator.kt:103 */
         437  +
            {
         438  +
                Some(_inner)
         439  +
            }
         440  +
            /* ServerOperationErrorGenerator.kt:139 */
  206    441   
        }
         442  +
        /* ServerOperationErrorGenerator.kt:101 */
  207    443   
    }
         444  +
    /* ServerOperationErrorGenerator.kt:100 */
  208    445   
}
         446  +
/* ServerOperationErrorGenerator.kt:110 */
  209    447   
impl ::std::convert::From<crate::error::NoSuchBucket> for crate::error::ListObjectsV2Error {
         448  +
    /* ServerOperationErrorGenerator.kt:111 */
  210    449   
    fn from(variant: crate::error::NoSuchBucket) -> crate::error::ListObjectsV2Error {
         450  +
        /* ServerOperationErrorGenerator.kt:112 */
  211    451   
        Self::NoSuchBucket(variant)
         452  +
        /* ServerOperationErrorGenerator.kt:111 */
  212    453   
    }
         454  +
    /* ServerOperationErrorGenerator.kt:110 */
  213    455   
}
         456  +
/* ServerOperationErrorGenerator.kt:110 */
  214    457   
impl ::std::convert::From<crate::error::ValidationException> for crate::error::ListObjectsV2Error {
         458  +
    /* ServerOperationErrorGenerator.kt:111 */
  215    459   
    fn from(variant: crate::error::ValidationException) -> crate::error::ListObjectsV2Error {
         460  +
        /* ServerOperationErrorGenerator.kt:112 */
  216    461   
        Self::ValidationException(variant)
         462  +
        /* ServerOperationErrorGenerator.kt:111 */
  217    463   
    }
         464  +
    /* ServerOperationErrorGenerator.kt:110 */
  218    465   
}
  219    466   
         467  +
/* StructureGenerator.kt:197 */
  220    468   
#[allow(missing_docs)] // documentation missing in model
         469  +
/* RustType.kt:516 */
  221    470   
#[derive(
  222    471   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  223    472   
)]
  224         -
pub struct NoSuchBucket {}
         473  +
pub /* StructureGenerator.kt:201 */ struct NoSuchBucket {/* StructureGenerator.kt:201 */}
         474  +
/* ErrorImplGenerator.kt:99 */
  225    475   
impl NoSuchBucket {
         476  +
    /* ErrorImplGenerator.kt:141 */
  226    477   
    #[doc(hidden)]
  227    478   
    /// Returns the error name.
  228    479   
    pub fn name(&self) -> &'static str {
  229    480   
        "NoSuchBucket"
  230    481   
    }
         482  +
    /* ErrorImplGenerator.kt:99 */
  231    483   
}
         484  +
/* ErrorImplGenerator.kt:153 */
  232    485   
impl ::std::fmt::Display for NoSuchBucket {
         486  +
    /* ErrorImplGenerator.kt:154 */
  233    487   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         488  +
        /* ErrorImplGenerator.kt:161 */
  234    489   
        ::std::write!(f, "NoSuchBucket")?;
         490  +
        /* ErrorImplGenerator.kt:171 */
  235    491   
        Ok(())
         492  +
        /* ErrorImplGenerator.kt:154 */
  236    493   
    }
         494  +
    /* ErrorImplGenerator.kt:153 */
  237    495   
}
         496  +
/* ErrorImplGenerator.kt:175 */
  238    497   
impl ::std::error::Error for NoSuchBucket {}
         498  +
/* ServerCodegenVisitor.kt:345 */
  239    499   
impl NoSuchBucket {
  240         -
    /// Creates a new builder-style object to manufacture [`NoSuchBucket`](crate::error::NoSuchBucket).
         500  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NoSuchBucket`](crate::error::NoSuchBucket).
         501  +
    /* ServerBuilderGenerator.kt:295 */
  241    502   
    pub fn builder() -> crate::error::no_such_bucket::Builder {
         503  +
        /* ServerBuilderGenerator.kt:296 */
  242    504   
        crate::error::no_such_bucket::Builder::default()
         505  +
        /* ServerBuilderGenerator.kt:295 */
  243    506   
    }
         507  +
    /* ServerCodegenVisitor.kt:345 */
  244    508   
}
  245         -
/// See [`ValidationException`](crate::error::ValidationException).
         509  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
  246    510   
pub mod validation_exception {
  247    511   
         512  +
    /* RustType.kt:516 */
  248    513   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  249         -
    /// Holds one variant for each of the ways the builder can fail.
         514  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         515  +
    /* RustType.kt:516 */
  250    516   
    #[non_exhaustive]
         517  +
    /* ServerBuilderConstraintViolations.kt:75 */
  251    518   
    #[allow(clippy::enum_variant_names)]
  252    519   
    pub enum ConstraintViolation {
  253         -
        /// `message` was not provided but it is required when building `ValidationException`.
         520  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
         521  +
        /* ServerBuilderConstraintViolations.kt:143 */
  254    522   
        MissingMessage,
         523  +
        /* ServerBuilderConstraintViolations.kt:75 */
  255    524   
    }
         525  +
    /* ServerBuilderConstraintViolations.kt:117 */
  256    526   
    impl ::std::fmt::Display for ConstraintViolation {
         527  +
        /* ServerBuilderConstraintViolations.kt:118 */
  257    528   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         529  +
            /* ServerBuilderConstraintViolations.kt:119 */
  258    530   
            match self {
  259         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
  260         -
            }
         531  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         532  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         533  +
            /* ServerBuilderConstraintViolations.kt:118 */
  261    534   
        }
         535  +
        /* ServerBuilderConstraintViolations.kt:117 */
  262    536   
    }
         537  +
    /* ServerBuilderConstraintViolations.kt:84 */
  263    538   
    impl ::std::error::Error for ConstraintViolation {}
         539  +
    /* ServerBuilderGenerator.kt:446 */
  264    540   
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
  265    541   
        type Error = ConstraintViolation;
  266    542   
  267    543   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  268    544   
            builder.build()
  269    545   
        }
  270    546   
    }
  271         -
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         547  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
         548  +
    /* RustType.kt:516 */
  272    549   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         550  +
    /* ServerBuilderGenerator.kt:211 */
  273    551   
    pub struct Builder {
         552  +
        /* ServerBuilderGenerator.kt:308 */
  274    553   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         554  +
        /* ServerBuilderGenerator.kt:308 */
  275    555   
        pub(crate) field_list:
  276    556   
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         557  +
        /* ServerBuilderGenerator.kt:211 */
  277    558   
    }
         559  +
    /* ServerBuilderGenerator.kt:215 */
  278    560   
    impl Builder {
  279         -
        /// A summary of the validation failure.
         561  +
        /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
         562  +
        /* ServerBuilderGenerator.kt:343 */
  280    563   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  281         -
            self.message = Some(input);
         564  +
            /* ServerBuilderGenerator.kt:344 */
         565  +
            self.message =
         566  +
                /* ServerBuilderGenerator.kt:345 */Some(
         567  +
                    /* ServerBuilderGenerator.kt:376 */input
         568  +
                /* ServerBuilderGenerator.kt:345 */)
         569  +
            /* ServerBuilderGenerator.kt:344 */;
  282    570   
            self
         571  +
            /* ServerBuilderGenerator.kt:343 */
  283    572   
        }
  284         -
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         573  +
        /// /* ServerBuilderGenerator.kt:331 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         574  +
        /* ServerBuilderGenerator.kt:343 */
  285    575   
        pub fn field_list(
  286    576   
            mut self,
  287    577   
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  288    578   
        ) -> Self {
  289         -
            self.field_list = input;
         579  +
            /* ServerBuilderGenerator.kt:344 */
         580  +
            self.field_list =
         581  +
                /* ServerBuilderGenerator.kt:376 */input
         582  +
            /* ServerBuilderGenerator.kt:344 */;
  290    583   
            self
         584  +
            /* ServerBuilderGenerator.kt:343 */
  291    585   
        }
  292         -
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
  293         -
        ///
         586  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         587  +
        /// /* ServerBuilderGenerator.kt:260 */
  294    588   
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
  295    589   
        ///
         590  +
        /* ServerBuilderGenerator.kt:271 */
  296    591   
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
  297    592   
            self.build_enforcing_all_constraints()
  298    593   
        }
         594  +
        /* ServerBuilderGenerator.kt:283 */
  299    595   
        fn build_enforcing_all_constraints(
  300    596   
            self,
  301    597   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  302         -
            Ok(crate::error::ValidationException {
  303         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         598  +
            /* ServerBuilderGenerator.kt:287 */
         599  +
            Ok(
         600  +
                /* ServerBuilderGenerator.kt:542 */
         601  +
                crate::error::ValidationException {
         602  +
                    /* ServerBuilderGenerator.kt:546 */
         603  +
                    message: self
         604  +
                        .message
         605  +
                        /* ServerBuilderGenerator.kt:569 */
         606  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
         607  +
                    /* ServerBuilderGenerator.kt:546 */
  304    608   
                    field_list: self.field_list,
  305         -
            })
         609  +
                    /* ServerBuilderGenerator.kt:542 */
         610  +
                }, /* ServerBuilderGenerator.kt:287 */
         611  +
            )
         612  +
            /* ServerBuilderGenerator.kt:283 */
  306    613   
        }
         614  +
        /* ServerBuilderGenerator.kt:215 */
  307    615   
    }
         616  +
         617  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  308    618   
}
  309         -
/// See [`NoSuchBucket`](crate::error::NoSuchBucket).
         619  +
/// /* ServerBuilderGenerator.kt:171 */See [`NoSuchBucket`](crate::error::NoSuchBucket).
  310    620   
pub mod no_such_bucket {
  311    621   
         622  +
    /* ServerBuilderGenerator.kt:461 */
  312    623   
    impl ::std::convert::From<Builder> for crate::error::NoSuchBucket {
  313    624   
        fn from(builder: Builder) -> Self {
  314    625   
            builder.build()
  315    626   
        }
  316    627   
    }
  317         -
    /// A builder for [`NoSuchBucket`](crate::error::NoSuchBucket).
         628  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`NoSuchBucket`](crate::error::NoSuchBucket).
         629  +
    /* RustType.kt:516 */
  318    630   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  319         -
    pub struct Builder {}
         631  +
    /* ServerBuilderGenerator.kt:211 */
         632  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         633  +
    /* ServerBuilderGenerator.kt:215 */
  320    634   
    impl Builder {
  321         -
        /// Consumes the builder and constructs a [`NoSuchBucket`](crate::error::NoSuchBucket).
         635  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NoSuchBucket`](crate::error::NoSuchBucket).
         636  +
        /* ServerBuilderGenerator.kt:271 */
  322    637   
        pub fn build(self) -> crate::error::NoSuchBucket {
  323    638   
            self.build_enforcing_all_constraints()
  324    639   
        }
         640  +
        /* ServerBuilderGenerator.kt:283 */
  325    641   
        fn build_enforcing_all_constraints(self) -> crate::error::NoSuchBucket {
  326         -
            crate::error::NoSuchBucket {}
         642  +
            /* ServerBuilderGenerator.kt:542 */
         643  +
            crate::error::NoSuchBucket {
         644  +
            /* ServerBuilderGenerator.kt:542 */}
         645  +
            /* ServerBuilderGenerator.kt:283 */
  327    646   
        }
         647  +
        /* ServerBuilderGenerator.kt:215 */
  328    648   
    }
         649  +
         650  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  329    651   
}

tmp-codegen-diff/codegen-server-test/s3/rust-server-codegen/src/input.rs

@@ -1,1 +877,1367 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(
    4      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      7   
)]
    6         -
pub struct GetObjectInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct GetObjectInput {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub bucket: ::std::string::String,
          12  +
    /* StructureGenerator.kt:231 */
    9     13   
    #[allow(missing_docs)] // documentation missing in model
   10     14   
    pub key: crate::model::ObjectKey,
          15  +
    /* StructureGenerator.kt:201 */
   11     16   
}
          17  +
/* StructureGenerator.kt:135 */
   12     18   
impl GetObjectInput {
          19  +
    /* StructureGenerator.kt:231 */
   13     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   14     22   
    pub fn bucket(&self) -> &str {
          23  +
        /* StructureGenerator.kt:171 */
   15     24   
        use std::ops::Deref;
   16     25   
        self.bucket.deref()
          26  +
        /* StructureGenerator.kt:166 */
   17     27   
    }
          28  +
    /* StructureGenerator.kt:231 */
   18     29   
    #[allow(missing_docs)] // documentation missing in model
          30  +
                           /* StructureGenerator.kt:166 */
   19     31   
    pub fn key(&self) -> &crate::model::ObjectKey {
          32  +
        /* StructureGenerator.kt:172 */
   20     33   
        &self.key
          34  +
        /* StructureGenerator.kt:166 */
   21     35   
    }
          36  +
    /* StructureGenerator.kt:135 */
   22     37   
}
          38  +
/* ServerCodegenVisitor.kt:345 */
   23     39   
impl GetObjectInput {
   24         -
    /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
          40  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
          41  +
    /* ServerBuilderGenerator.kt:295 */
   25     42   
    pub fn builder() -> crate::input::get_object_input::Builder {
          43  +
        /* ServerBuilderGenerator.kt:296 */
   26     44   
        crate::input::get_object_input::Builder::default()
          45  +
        /* ServerBuilderGenerator.kt:295 */
   27     46   
    }
          47  +
    /* ServerCodegenVisitor.kt:345 */
   28     48   
}
          49  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   29     50   
impl crate::constrained::Constrained for crate::input::GetObjectInput {
   30     51   
    type Unconstrained = crate::input::get_object_input::Builder;
   31     52   
}
   32     53   
          54  +
/* StructureGenerator.kt:197 */
   33     55   
#[allow(missing_docs)] // documentation missing in model
          56  +
/* RustType.kt:516 */
   34     57   
#[derive(
   35     58   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   36     59   
)]
   37         -
pub struct DeleteObjectTaggingInput {
          60  +
pub /* StructureGenerator.kt:201 */ struct DeleteObjectTaggingInput {
          61  +
    /* StructureGenerator.kt:231 */
   38     62   
    #[allow(missing_docs)] // documentation missing in model
   39     63   
    pub bucket: ::std::string::String,
          64  +
    /* StructureGenerator.kt:231 */
   40     65   
    #[allow(missing_docs)] // documentation missing in model
   41     66   
    pub key: crate::model::ObjectKey,
          67  +
    /* StructureGenerator.kt:231 */
   42     68   
    #[allow(missing_docs)] // documentation missing in model
   43     69   
    pub version_id: ::std::option::Option<::std::string::String>,
          70  +
    /* StructureGenerator.kt:231 */
   44     71   
    #[allow(missing_docs)] // documentation missing in model
   45     72   
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
          73  +
    /* StructureGenerator.kt:201 */
   46     74   
}
          75  +
/* StructureGenerator.kt:135 */
   47     76   
impl DeleteObjectTaggingInput {
          77  +
    /* StructureGenerator.kt:231 */
   48     78   
    #[allow(missing_docs)] // documentation missing in model
          79  +
                           /* StructureGenerator.kt:166 */
   49     80   
    pub fn bucket(&self) -> &str {
          81  +
        /* StructureGenerator.kt:171 */
   50     82   
        use std::ops::Deref;
   51     83   
        self.bucket.deref()
          84  +
        /* StructureGenerator.kt:166 */
   52     85   
    }
          86  +
    /* StructureGenerator.kt:231 */
   53     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* StructureGenerator.kt:166 */
   54     89   
    pub fn key(&self) -> &crate::model::ObjectKey {
          90  +
        /* StructureGenerator.kt:172 */
   55     91   
        &self.key
          92  +
        /* StructureGenerator.kt:166 */
   56     93   
    }
          94  +
    /* StructureGenerator.kt:231 */
   57     95   
    #[allow(missing_docs)] // documentation missing in model
          96  +
                           /* StructureGenerator.kt:166 */
   58     97   
    pub fn version_id(&self) -> ::std::option::Option<&str> {
          98  +
        /* StructureGenerator.kt:169 */
   59     99   
        self.version_id.as_deref()
         100  +
        /* StructureGenerator.kt:166 */
   60    101   
    }
         102  +
    /* StructureGenerator.kt:231 */
   61    103   
    #[allow(missing_docs)] // documentation missing in model
         104  +
                           /* StructureGenerator.kt:166 */
   62    105   
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
         106  +
        /* StructureGenerator.kt:169 */
   63    107   
        self.expected_bucket_owner.as_deref()
         108  +
        /* StructureGenerator.kt:166 */
   64    109   
    }
         110  +
    /* StructureGenerator.kt:135 */
   65    111   
}
         112  +
/* ServerCodegenVisitor.kt:345 */
   66    113   
impl DeleteObjectTaggingInput {
   67         -
    /// Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         114  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         115  +
    /* ServerBuilderGenerator.kt:295 */
   68    116   
    pub fn builder() -> crate::input::delete_object_tagging_input::Builder {
         117  +
        /* ServerBuilderGenerator.kt:296 */
   69    118   
        crate::input::delete_object_tagging_input::Builder::default()
         119  +
        /* ServerBuilderGenerator.kt:295 */
   70    120   
    }
         121  +
    /* ServerCodegenVisitor.kt:345 */
   71    122   
}
         123  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   72    124   
impl crate::constrained::Constrained for crate::input::DeleteObjectTaggingInput {
   73    125   
    type Unconstrained = crate::input::delete_object_tagging_input::Builder;
   74    126   
}
   75    127   
         128  +
/* StructureGenerator.kt:197 */
   76    129   
#[allow(missing_docs)] // documentation missing in model
         130  +
/* RustType.kt:516 */
   77    131   
#[derive(
   78    132   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   79    133   
)]
   80         -
pub struct GetBucketLocationInput {
         134  +
pub /* StructureGenerator.kt:201 */ struct GetBucketLocationInput {
         135  +
    /* StructureGenerator.kt:231 */
   81    136   
    #[allow(missing_docs)] // documentation missing in model
   82    137   
    pub bucket: ::std::string::String,
         138  +
    /* StructureGenerator.kt:201 */
   83    139   
}
         140  +
/* StructureGenerator.kt:135 */
   84    141   
impl GetBucketLocationInput {
         142  +
    /* StructureGenerator.kt:231 */
   85    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* StructureGenerator.kt:166 */
   86    145   
    pub fn bucket(&self) -> &str {
         146  +
        /* StructureGenerator.kt:171 */
   87    147   
        use std::ops::Deref;
   88    148   
        self.bucket.deref()
         149  +
        /* StructureGenerator.kt:166 */
   89    150   
    }
         151  +
    /* StructureGenerator.kt:135 */
   90    152   
}
         153  +
/* ServerCodegenVisitor.kt:345 */
   91    154   
impl GetBucketLocationInput {
   92         -
    /// Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         155  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         156  +
    /* ServerBuilderGenerator.kt:295 */
   93    157   
    pub fn builder() -> crate::input::get_bucket_location_input::Builder {
         158  +
        /* ServerBuilderGenerator.kt:296 */
   94    159   
        crate::input::get_bucket_location_input::Builder::default()
         160  +
        /* ServerBuilderGenerator.kt:295 */
   95    161   
    }
         162  +
    /* ServerCodegenVisitor.kt:345 */
   96    163   
}
         164  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   97    165   
impl crate::constrained::Constrained for crate::input::GetBucketLocationInput {
   98    166   
    type Unconstrained = crate::input::get_bucket_location_input::Builder;
   99    167   
}
  100    168   
         169  +
/* StructureGenerator.kt:197 */
  101    170   
#[allow(missing_docs)] // documentation missing in model
         171  +
/* RustType.kt:516 */
  102    172   
#[derive(
  103    173   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  104    174   
)]
  105         -
pub struct ListObjectsV2Input {
         175  +
pub /* StructureGenerator.kt:201 */ struct ListObjectsV2Input {
         176  +
    /* StructureGenerator.kt:231 */
  106    177   
    #[allow(missing_docs)] // documentation missing in model
  107    178   
    pub bucket: ::std::string::String,
         179  +
    /* StructureGenerator.kt:231 */
  108    180   
    #[allow(missing_docs)] // documentation missing in model
  109    181   
    pub delimiter: ::std::option::Option<::std::string::String>,
         182  +
    /* StructureGenerator.kt:231 */
  110    183   
    #[allow(missing_docs)] // documentation missing in model
  111    184   
    pub encoding_type: ::std::option::Option<crate::model::EncodingType>,
         185  +
    /* StructureGenerator.kt:231 */
  112    186   
    #[allow(missing_docs)] // documentation missing in model
  113    187   
    pub max_keys: ::std::option::Option<i32>,
         188  +
    /* StructureGenerator.kt:231 */
  114    189   
    #[allow(missing_docs)] // documentation missing in model
  115    190   
    pub prefix: ::std::option::Option<::std::string::String>,
         191  +
    /* StructureGenerator.kt:231 */
  116    192   
    #[allow(missing_docs)] // documentation missing in model
  117    193   
    pub continuation_token: ::std::option::Option<::std::string::String>,
         194  +
    /* StructureGenerator.kt:231 */
  118    195   
    #[allow(missing_docs)] // documentation missing in model
  119    196   
    pub fetch_owner: ::std::option::Option<bool>,
         197  +
    /* StructureGenerator.kt:231 */
  120    198   
    #[allow(missing_docs)] // documentation missing in model
  121    199   
    pub start_after: ::std::option::Option<::std::string::String>,
         200  +
    /* StructureGenerator.kt:231 */
  122    201   
    #[allow(missing_docs)] // documentation missing in model
  123    202   
    pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
         203  +
    /* StructureGenerator.kt:231 */
  124    204   
    #[allow(missing_docs)] // documentation missing in model
  125    205   
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
         206  +
    /* StructureGenerator.kt:201 */
  126    207   
}
         208  +
/* StructureGenerator.kt:135 */
  127    209   
impl ListObjectsV2Input {
         210  +
    /* StructureGenerator.kt:231 */
  128    211   
    #[allow(missing_docs)] // documentation missing in model
         212  +
                           /* StructureGenerator.kt:166 */
  129    213   
    pub fn bucket(&self) -> &str {
         214  +
        /* StructureGenerator.kt:171 */
  130    215   
        use std::ops::Deref;
  131    216   
        self.bucket.deref()
         217  +
        /* StructureGenerator.kt:166 */
  132    218   
    }
         219  +
    /* StructureGenerator.kt:231 */
  133    220   
    #[allow(missing_docs)] // documentation missing in model
         221  +
                           /* StructureGenerator.kt:166 */
  134    222   
    pub fn delimiter(&self) -> ::std::option::Option<&str> {
         223  +
        /* StructureGenerator.kt:169 */
  135    224   
        self.delimiter.as_deref()
         225  +
        /* StructureGenerator.kt:166 */
  136    226   
    }
         227  +
    /* StructureGenerator.kt:231 */
  137    228   
    #[allow(missing_docs)] // documentation missing in model
         229  +
                           /* StructureGenerator.kt:166 */
  138    230   
    pub fn encoding_type(&self) -> ::std::option::Option<&crate::model::EncodingType> {
         231  +
        /* StructureGenerator.kt:170 */
  139    232   
        self.encoding_type.as_ref()
         233  +
        /* StructureGenerator.kt:166 */
  140    234   
    }
         235  +
    /* StructureGenerator.kt:231 */
  141    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* StructureGenerator.kt:166 */
  142    238   
    pub fn max_keys(&self) -> ::std::option::Option<i32> {
         239  +
        /* StructureGenerator.kt:168 */
  143    240   
        self.max_keys
         241  +
        /* StructureGenerator.kt:166 */
  144    242   
    }
         243  +
    /* StructureGenerator.kt:231 */
  145    244   
    #[allow(missing_docs)] // documentation missing in model
         245  +
                           /* StructureGenerator.kt:166 */
  146    246   
    pub fn prefix(&self) -> ::std::option::Option<&str> {
         247  +
        /* StructureGenerator.kt:169 */
  147    248   
        self.prefix.as_deref()
         249  +
        /* StructureGenerator.kt:166 */
  148    250   
    }
         251  +
    /* StructureGenerator.kt:231 */
  149    252   
    #[allow(missing_docs)] // documentation missing in model
         253  +
                           /* StructureGenerator.kt:166 */
  150    254   
    pub fn continuation_token(&self) -> ::std::option::Option<&str> {
         255  +
        /* StructureGenerator.kt:169 */
  151    256   
        self.continuation_token.as_deref()
         257  +
        /* StructureGenerator.kt:166 */
  152    258   
    }
         259  +
    /* StructureGenerator.kt:231 */
  153    260   
    #[allow(missing_docs)] // documentation missing in model
         261  +
                           /* StructureGenerator.kt:166 */
  154    262   
    pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
         263  +
        /* StructureGenerator.kt:168 */
  155    264   
        self.fetch_owner
         265  +
        /* StructureGenerator.kt:166 */
  156    266   
    }
         267  +
    /* StructureGenerator.kt:231 */
  157    268   
    #[allow(missing_docs)] // documentation missing in model
         269  +
                           /* StructureGenerator.kt:166 */
  158    270   
    pub fn start_after(&self) -> ::std::option::Option<&str> {
         271  +
        /* StructureGenerator.kt:169 */
  159    272   
        self.start_after.as_deref()
         273  +
        /* StructureGenerator.kt:166 */
  160    274   
    }
         275  +
    /* StructureGenerator.kt:231 */
  161    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* StructureGenerator.kt:166 */
  162    278   
    pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
         279  +
        /* StructureGenerator.kt:170 */
  163    280   
        self.request_payer.as_ref()
         281  +
        /* StructureGenerator.kt:166 */
  164    282   
    }
         283  +
    /* StructureGenerator.kt:231 */
  165    284   
    #[allow(missing_docs)] // documentation missing in model
         285  +
                           /* StructureGenerator.kt:166 */
  166    286   
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
         287  +
        /* StructureGenerator.kt:169 */
  167    288   
        self.expected_bucket_owner.as_deref()
         289  +
        /* StructureGenerator.kt:166 */
  168    290   
    }
         291  +
    /* StructureGenerator.kt:135 */
  169    292   
}
         293  +
/* ServerCodegenVisitor.kt:345 */
  170    294   
impl ListObjectsV2Input {
  171         -
    /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         295  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         296  +
    /* ServerBuilderGenerator.kt:295 */
  172    297   
    pub fn builder() -> crate::input::list_objects_v2_input::Builder {
         298  +
        /* ServerBuilderGenerator.kt:296 */
  173    299   
        crate::input::list_objects_v2_input::Builder::default()
         300  +
        /* ServerBuilderGenerator.kt:295 */
  174    301   
    }
         302  +
    /* ServerCodegenVisitor.kt:345 */
  175    303   
}
         304  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  176    305   
impl crate::constrained::Constrained for crate::input::ListObjectsV2Input {
  177    306   
    type Unconstrained = crate::input::list_objects_v2_input::Builder;
  178    307   
}
  179         -
/// See [`GetObjectInput`](crate::input::GetObjectInput).
         308  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetObjectInput`](crate::input::GetObjectInput).
  180    309   
pub mod get_object_input {
  181    310   
         311  +
    /* RustType.kt:516 */
  182    312   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  183         -
    /// Holds one variant for each of the ways the builder can fail.
         313  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         314  +
    /* RustType.kt:516 */
  184    315   
    #[non_exhaustive]
         316  +
    /* ServerBuilderConstraintViolations.kt:75 */
  185    317   
    #[allow(clippy::enum_variant_names)]
  186    318   
    pub enum ConstraintViolation {
  187         -
        /// `bucket` was not provided but it is required when building `GetObjectInput`.
         319  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `GetObjectInput`.
         320  +
        /* ServerBuilderConstraintViolations.kt:143 */
  188    321   
        MissingBucket,
  189         -
        /// `key` was not provided but it is required when building `GetObjectInput`.
         322  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`key` was not provided but it is required when building `GetObjectInput`.
         323  +
        /* ServerBuilderConstraintViolations.kt:143 */
  190    324   
        MissingKey,
  191         -
        /// Constraint violation occurred building member `key` when building `GetObjectInput`.
         325  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `key` when building `GetObjectInput`.
         326  +
        /* RustType.kt:516 */
  192    327   
        #[doc(hidden)]
         328  +
        /* ServerBuilderConstraintViolations.kt:164 */
  193    329   
        Key(crate::model::object_key::ConstraintViolation),
         330  +
        /* ServerBuilderConstraintViolations.kt:75 */
  194    331   
    }
         332  +
    /* ServerBuilderConstraintViolations.kt:117 */
  195    333   
    impl ::std::fmt::Display for ConstraintViolation {
         334  +
        /* ServerBuilderConstraintViolations.kt:118 */
  196    335   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         336  +
            /* ServerBuilderConstraintViolations.kt:119 */
  197    337   
            match self {
  198         -
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
  199         -
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
  200         -
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
  201         -
            }
         338  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
         339  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
         340  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
         341  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         342  +
            /* ServerBuilderConstraintViolations.kt:118 */
  202    343   
        }
         344  +
        /* ServerBuilderConstraintViolations.kt:117 */
  203    345   
    }
         346  +
    /* ServerBuilderConstraintViolations.kt:84 */
  204    347   
    impl ::std::error::Error for ConstraintViolation {}
         348  +
    /* ServerBuilderConstraintViolations.kt:171 */
  205    349   
    impl ConstraintViolation {
  206    350   
        pub(crate) fn as_validation_exception_field(
  207    351   
            self,
  208    352   
            path: ::std::string::String,
  209    353   
        ) -> crate::model::ValidationExceptionField {
  210    354   
            match self {
  211    355   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  212    356   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  213    357   
                                                path: path + "/Bucket",
  214    358   
                                            },
  215    359   
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  216    360   
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  217    361   
                                                path: path + "/Key",
  218    362   
                                            },
  219    363   
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
  220    364   
        }
  221    365   
        }
  222    366   
    }
         367  +
    /* ServerBuilderGenerator.kt:234 */
  223    368   
    impl ::std::convert::From<ConstraintViolation>
  224    369   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  225    370   
    {
  226    371   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  227    372   
            let first_validation_exception_field =
  228    373   
                constraint_violation.as_validation_exception_field("".to_owned());
  229    374   
            let validation_exception = crate::error::ValidationException {
  230    375   
                message: format!(
  231    376   
                    "1 validation error detected. {}",
  232    377   
                    &first_validation_exception_field.message
  233    378   
                ),
  234    379   
                field_list: Some(vec![first_validation_exception_field]),
  235    380   
            };
  236    381   
            Self::ConstraintViolation(
  237    382   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  238    383   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  239    384   
                            )
  240    385   
        }
  241    386   
    }
         387  +
    /* ServerBuilderGenerator.kt:244 */
  242    388   
    impl ::std::convert::From<Builder>
  243    389   
        for crate::constrained::MaybeConstrained<crate::input::GetObjectInput>
  244    390   
    {
  245    391   
        fn from(builder: Builder) -> Self {
  246    392   
            Self::Unconstrained(builder)
  247    393   
        }
  248    394   
    }
         395  +
    /* ServerBuilderGenerator.kt:446 */
  249    396   
    impl ::std::convert::TryFrom<Builder> for crate::input::GetObjectInput {
  250    397   
        type Error = ConstraintViolation;
  251    398   
  252    399   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  253    400   
            builder.build()
  254    401   
        }
  255    402   
    }
  256         -
    /// A builder for [`GetObjectInput`](crate::input::GetObjectInput).
         403  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetObjectInput`](crate::input::GetObjectInput).
         404  +
    /* RustType.kt:516 */
  257    405   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         406  +
    /* ServerBuilderGenerator.kt:211 */
  258    407   
    pub struct Builder {
         408  +
        /* ServerBuilderGenerator.kt:308 */
  259    409   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         410  +
        /* ServerBuilderGenerator.kt:308 */
  260    411   
        pub(crate) key:
  261    412   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         413  +
        /* ServerBuilderGenerator.kt:211 */
  262    414   
    }
         415  +
    /* ServerBuilderGenerator.kt:215 */
  263    416   
    impl Builder {
         417  +
        /* ServerBuilderGenerator.kt:331 */
  264    418   
        #[allow(missing_docs)] // documentation missing in model
         419  +
                               /* ServerBuilderGenerator.kt:343 */
  265    420   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  266         -
            self.bucket = Some(input);
         421  +
            /* ServerBuilderGenerator.kt:344 */
         422  +
            self.bucket =
         423  +
                /* ServerBuilderGenerator.kt:345 */Some(
         424  +
                    /* ServerBuilderGenerator.kt:376 */input
         425  +
                /* ServerBuilderGenerator.kt:345 */)
         426  +
            /* ServerBuilderGenerator.kt:344 */;
  267    427   
            self
         428  +
            /* ServerBuilderGenerator.kt:343 */
  268    429   
        }
         430  +
        /* ServerBuilderGenerator.kt:426 */
  269    431   
        #[allow(missing_docs)] // documentation missing in model
         432  +
                               /* ServerBuilderGenerator.kt:428 */
  270    433   
        pub(crate) fn set_bucket(
  271    434   
            mut self,
  272    435   
            input: impl ::std::convert::Into<::std::string::String>,
  273    436   
        ) -> Self {
         437  +
            /* ServerBuilderGenerator.kt:429 */
  274    438   
            self.bucket = Some(input.into());
  275    439   
            self
         440  +
            /* ServerBuilderGenerator.kt:428 */
  276    441   
        }
         442  +
        /* ServerBuilderGenerator.kt:331 */
  277    443   
        #[allow(missing_docs)] // documentation missing in model
         444  +
                               /* ServerBuilderGenerator.kt:343 */
  278    445   
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
  279         -
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         446  +
            /* ServerBuilderGenerator.kt:344 */
         447  +
            self.key =
         448  +
                /* ServerBuilderGenerator.kt:345 */Some(
         449  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
         450  +
                /* ServerBuilderGenerator.kt:345 */)
         451  +
            /* ServerBuilderGenerator.kt:344 */;
  280    452   
            self
         453  +
            /* ServerBuilderGenerator.kt:343 */
  281    454   
        }
         455  +
        /* ServerBuilderGenerator.kt:426 */
  282    456   
        #[allow(missing_docs)] // documentation missing in model
         457  +
                               /* ServerBuilderGenerator.kt:428 */
  283    458   
        pub(crate) fn set_key(
  284    459   
            mut self,
  285    460   
            input: impl ::std::convert::Into<
  286    461   
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
  287    462   
            >,
  288    463   
        ) -> Self {
         464  +
            /* ServerBuilderGenerator.kt:429 */
  289    465   
            self.key = Some(input.into());
  290    466   
            self
         467  +
            /* ServerBuilderGenerator.kt:428 */
  291    468   
        }
  292         -
        /// Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
  293         -
        ///
         469  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
         470  +
        /// /* ServerBuilderGenerator.kt:260 */
  294    471   
        /// The builder fails to construct a [`GetObjectInput`](crate::input::GetObjectInput) if a [`ConstraintViolation`] occurs.
  295    472   
        ///
  296         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         473  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         474  +
        /* ServerBuilderGenerator.kt:271 */
  297    475   
        pub fn build(self) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
  298    476   
            self.build_enforcing_all_constraints()
  299    477   
        }
         478  +
        /* ServerBuilderGenerator.kt:283 */
  300    479   
        fn build_enforcing_all_constraints(
  301    480   
            self,
  302    481   
        ) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
  303         -
            Ok(crate::input::GetObjectInput {
  304         -
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         482  +
            /* ServerBuilderGenerator.kt:287 */
         483  +
            Ok(
         484  +
                /* ServerBuilderGenerator.kt:542 */
         485  +
                crate::input::GetObjectInput {
         486  +
                    /* ServerBuilderGenerator.kt:546 */
         487  +
                    bucket: self
         488  +
                        .bucket
         489  +
                        /* ServerBuilderGenerator.kt:569 */
         490  +
                        .ok_or(ConstraintViolation::MissingBucket)?,
         491  +
                    /* ServerBuilderGenerator.kt:546 */
  305    492   
                    key: self
  306    493   
                        .key
         494  +
                        /* ServerBuilderGenerator.kt:602 */
  307    495   
                        .map(|v| match v {
  308    496   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  309    497   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  310    498   
                        })
         499  +
                        /* ServerBuilderGenerator.kt:614 */
  311    500   
                        .map(|res| res.map_err(ConstraintViolation::Key))
  312    501   
                        .transpose()?
         502  +
                        /* ServerBuilderGenerator.kt:569 */
  313    503   
                        .ok_or(ConstraintViolation::MissingKey)?,
  314         -
            })
         504  +
                    /* ServerBuilderGenerator.kt:542 */
         505  +
                }, /* ServerBuilderGenerator.kt:287 */
         506  +
            )
         507  +
            /* ServerBuilderGenerator.kt:283 */
  315    508   
        }
         509  +
        /* ServerBuilderGenerator.kt:215 */
  316    510   
    }
         511  +
         512  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  317    513   
}
  318         -
/// See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         514  +
/// /* ServerBuilderGenerator.kt:171 */See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
  319    515   
pub mod delete_object_tagging_input {
  320    516   
         517  +
    /* RustType.kt:516 */
  321    518   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  322         -
    /// Holds one variant for each of the ways the builder can fail.
         519  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         520  +
    /* RustType.kt:516 */
  323    521   
    #[non_exhaustive]
         522  +
    /* ServerBuilderConstraintViolations.kt:75 */
  324    523   
    #[allow(clippy::enum_variant_names)]
  325    524   
    pub enum ConstraintViolation {
  326         -
        /// `bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
         525  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
         526  +
        /* ServerBuilderConstraintViolations.kt:143 */
  327    527   
        MissingBucket,
  328         -
        /// `key` was not provided but it is required when building `DeleteObjectTaggingInput`.
         528  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`key` was not provided but it is required when building `DeleteObjectTaggingInput`.
         529  +
        /* ServerBuilderConstraintViolations.kt:143 */
  329    530   
        MissingKey,
  330         -
        /// Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
         531  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
         532  +
        /* RustType.kt:516 */
  331    533   
        #[doc(hidden)]
         534  +
        /* ServerBuilderConstraintViolations.kt:164 */
  332    535   
        Key(crate::model::object_key::ConstraintViolation),
         536  +
        /* ServerBuilderConstraintViolations.kt:75 */
  333    537   
    }
         538  +
    /* ServerBuilderConstraintViolations.kt:117 */
  334    539   
    impl ::std::fmt::Display for ConstraintViolation {
         540  +
        /* ServerBuilderConstraintViolations.kt:118 */
  335    541   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         542  +
            /* ServerBuilderConstraintViolations.kt:119 */
  336    543   
            match self {
  337         -
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
  338         -
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
  339         -
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
  340         -
            }
         544  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         545  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         546  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
         547  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         548  +
            /* ServerBuilderConstraintViolations.kt:118 */
  341    549   
        }
         550  +
        /* ServerBuilderConstraintViolations.kt:117 */
  342    551   
    }
         552  +
    /* ServerBuilderConstraintViolations.kt:84 */
  343    553   
    impl ::std::error::Error for ConstraintViolation {}
         554  +
    /* ServerBuilderConstraintViolations.kt:171 */
  344    555   
    impl ConstraintViolation {
  345    556   
        pub(crate) fn as_validation_exception_field(
  346    557   
            self,
  347    558   
            path: ::std::string::String,
  348    559   
        ) -> crate::model::ValidationExceptionField {
  349    560   
            match self {
  350    561   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  351    562   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  352    563   
                                                path: path + "/Bucket",
  353    564   
                                            },
  354    565   
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  355    566   
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  356    567   
                                                path: path + "/Key",
  357    568   
                                            },
  358    569   
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
  359    570   
        }
  360    571   
        }
  361    572   
    }
         573  +
    /* ServerBuilderGenerator.kt:234 */
  362    574   
    impl ::std::convert::From<ConstraintViolation>
  363    575   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  364    576   
    {
  365    577   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  366    578   
            let first_validation_exception_field =
  367    579   
                constraint_violation.as_validation_exception_field("".to_owned());
  368    580   
            let validation_exception = crate::error::ValidationException {
  369    581   
                message: format!(
  370    582   
                    "1 validation error detected. {}",
  371    583   
                    &first_validation_exception_field.message
  372    584   
                ),
  373    585   
                field_list: Some(vec![first_validation_exception_field]),
  374    586   
            };
  375    587   
            Self::ConstraintViolation(
  376    588   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  377    589   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  378    590   
                            )
  379    591   
        }
  380    592   
    }
         593  +
    /* ServerBuilderGenerator.kt:244 */
  381    594   
    impl ::std::convert::From<Builder>
  382    595   
        for crate::constrained::MaybeConstrained<crate::input::DeleteObjectTaggingInput>
  383    596   
    {
  384    597   
        fn from(builder: Builder) -> Self {
  385    598   
            Self::Unconstrained(builder)
  386    599   
        }
  387    600   
    }
         601  +
    /* ServerBuilderGenerator.kt:446 */
  388    602   
    impl ::std::convert::TryFrom<Builder> for crate::input::DeleteObjectTaggingInput {
  389    603   
        type Error = ConstraintViolation;
  390    604   
  391    605   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  392    606   
            builder.build()
  393    607   
        }
  394    608   
    }
  395         -
    /// A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         609  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         610  +
    /* RustType.kt:516 */
  396    611   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         612  +
    /* ServerBuilderGenerator.kt:211 */
  397    613   
    pub struct Builder {
         614  +
        /* ServerBuilderGenerator.kt:308 */
  398    615   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         616  +
        /* ServerBuilderGenerator.kt:308 */
  399    617   
        pub(crate) key:
  400    618   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         619  +
        /* ServerBuilderGenerator.kt:308 */
  401    620   
        pub(crate) version_id: ::std::option::Option<::std::string::String>,
         621  +
        /* ServerBuilderGenerator.kt:308 */
  402    622   
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
         623  +
        /* ServerBuilderGenerator.kt:211 */
  403    624   
    }
         625  +
    /* ServerBuilderGenerator.kt:215 */
  404    626   
    impl Builder {
         627  +
        /* ServerBuilderGenerator.kt:331 */
  405    628   
        #[allow(missing_docs)] // documentation missing in model
         629  +
                               /* ServerBuilderGenerator.kt:343 */
  406    630   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  407         -
            self.bucket = Some(input);
         631  +
            /* ServerBuilderGenerator.kt:344 */
         632  +
            self.bucket =
         633  +
                /* ServerBuilderGenerator.kt:345 */Some(
         634  +
                    /* ServerBuilderGenerator.kt:376 */input
         635  +
                /* ServerBuilderGenerator.kt:345 */)
         636  +
            /* ServerBuilderGenerator.kt:344 */;
  408    637   
            self
         638  +
            /* ServerBuilderGenerator.kt:343 */
  409    639   
        }
         640  +
        /* ServerBuilderGenerator.kt:426 */
  410    641   
        #[allow(missing_docs)] // documentation missing in model
         642  +
                               /* ServerBuilderGenerator.kt:428 */
  411    643   
        pub(crate) fn set_bucket(
  412    644   
            mut self,
  413    645   
            input: impl ::std::convert::Into<::std::string::String>,
  414    646   
        ) -> Self {
         647  +
            /* ServerBuilderGenerator.kt:429 */
  415    648   
            self.bucket = Some(input.into());
  416    649   
            self
         650  +
            /* ServerBuilderGenerator.kt:428 */
  417    651   
        }
         652  +
        /* ServerBuilderGenerator.kt:331 */
  418    653   
        #[allow(missing_docs)] // documentation missing in model
         654  +
                               /* ServerBuilderGenerator.kt:343 */
  419    655   
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
  420         -
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         656  +
            /* ServerBuilderGenerator.kt:344 */
         657  +
            self.key =
         658  +
                /* ServerBuilderGenerator.kt:345 */Some(
         659  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
         660  +
                /* ServerBuilderGenerator.kt:345 */)
         661  +
            /* ServerBuilderGenerator.kt:344 */;
  421    662   
            self
         663  +
            /* ServerBuilderGenerator.kt:343 */
  422    664   
        }
         665  +
        /* ServerBuilderGenerator.kt:426 */
  423    666   
        #[allow(missing_docs)] // documentation missing in model
         667  +
                               /* ServerBuilderGenerator.kt:428 */
  424    668   
        pub(crate) fn set_key(
  425    669   
            mut self,
  426    670   
            input: impl ::std::convert::Into<
  427    671   
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
  428    672   
            >,
  429    673   
        ) -> Self {
         674  +
            /* ServerBuilderGenerator.kt:429 */
  430    675   
            self.key = Some(input.into());
  431    676   
            self
         677  +
            /* ServerBuilderGenerator.kt:428 */
  432    678   
        }
         679  +
        /* ServerBuilderGenerator.kt:331 */
  433    680   
        #[allow(missing_docs)] // documentation missing in model
         681  +
                               /* ServerBuilderGenerator.kt:343 */
  434    682   
        pub fn version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  435         -
            self.version_id = input;
         683  +
            /* ServerBuilderGenerator.kt:344 */
         684  +
            self.version_id =
         685  +
                /* ServerBuilderGenerator.kt:376 */input
         686  +
            /* ServerBuilderGenerator.kt:344 */;
  436    687   
            self
         688  +
            /* ServerBuilderGenerator.kt:343 */
  437    689   
        }
         690  +
        /* ServerBuilderGenerator.kt:426 */
  438    691   
        #[allow(missing_docs)] // documentation missing in model
         692  +
                               /* ServerBuilderGenerator.kt:428 */
  439    693   
        pub(crate) fn set_version_id(
  440    694   
            mut self,
  441    695   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  442    696   
        ) -> Self {
         697  +
            /* ServerBuilderGenerator.kt:429 */
  443    698   
            self.version_id = input.map(|v| v.into());
  444    699   
            self
         700  +
            /* ServerBuilderGenerator.kt:428 */
  445    701   
        }
         702  +
        /* ServerBuilderGenerator.kt:331 */
  446    703   
        #[allow(missing_docs)] // documentation missing in model
         704  +
                               /* ServerBuilderGenerator.kt:343 */
  447    705   
        pub fn expected_bucket_owner(
  448    706   
            mut self,
  449    707   
            input: ::std::option::Option<::std::string::String>,
  450    708   
        ) -> Self {
  451         -
            self.expected_bucket_owner = input;
         709  +
            /* ServerBuilderGenerator.kt:344 */
         710  +
            self.expected_bucket_owner =
         711  +
                /* ServerBuilderGenerator.kt:376 */input
         712  +
            /* ServerBuilderGenerator.kt:344 */;
  452    713   
            self
         714  +
            /* ServerBuilderGenerator.kt:343 */
  453    715   
        }
         716  +
        /* ServerBuilderGenerator.kt:426 */
  454    717   
        #[allow(missing_docs)] // documentation missing in model
         718  +
                               /* ServerBuilderGenerator.kt:428 */
  455    719   
        pub(crate) fn set_expected_bucket_owner(
  456    720   
            mut self,
  457    721   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  458    722   
        ) -> Self {
         723  +
            /* ServerBuilderGenerator.kt:429 */
  459    724   
            self.expected_bucket_owner = input.map(|v| v.into());
  460    725   
            self
         726  +
            /* ServerBuilderGenerator.kt:428 */
  461    727   
        }
  462         -
        /// Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
  463         -
        ///
         728  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         729  +
        /// /* ServerBuilderGenerator.kt:260 */
  464    730   
        /// The builder fails to construct a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput) if a [`ConstraintViolation`] occurs.
  465    731   
        ///
  466         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         732  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         733  +
        /* ServerBuilderGenerator.kt:271 */
  467    734   
        pub fn build(self) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
  468    735   
            self.build_enforcing_all_constraints()
  469    736   
        }
         737  +
        /* ServerBuilderGenerator.kt:283 */
  470    738   
        fn build_enforcing_all_constraints(
  471    739   
            self,
  472    740   
        ) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
  473         -
            Ok(crate::input::DeleteObjectTaggingInput {
  474         -
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         741  +
            /* ServerBuilderGenerator.kt:287 */
         742  +
            Ok(
         743  +
                /* ServerBuilderGenerator.kt:542 */
         744  +
                crate::input::DeleteObjectTaggingInput {
         745  +
                    /* ServerBuilderGenerator.kt:546 */
         746  +
                    bucket: self
         747  +
                        .bucket
         748  +
                        /* ServerBuilderGenerator.kt:569 */
         749  +
                        .ok_or(ConstraintViolation::MissingBucket)?,
         750  +
                    /* ServerBuilderGenerator.kt:546 */
  475    751   
                    key: self
  476    752   
                        .key
         753  +
                        /* ServerBuilderGenerator.kt:602 */
  477    754   
                        .map(|v| match v {
  478    755   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  479    756   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  480    757   
                        })
         758  +
                        /* ServerBuilderGenerator.kt:614 */
  481    759   
                        .map(|res| res.map_err(ConstraintViolation::Key))
  482    760   
                        .transpose()?
         761  +
                        /* ServerBuilderGenerator.kt:569 */
  483    762   
                        .ok_or(ConstraintViolation::MissingKey)?,
         763  +
                    /* ServerBuilderGenerator.kt:546 */
  484    764   
                    version_id: self.version_id,
         765  +
                    /* ServerBuilderGenerator.kt:546 */
  485    766   
                    expected_bucket_owner: self.expected_bucket_owner,
  486         -
            })
         767  +
                    /* ServerBuilderGenerator.kt:542 */
         768  +
                }, /* ServerBuilderGenerator.kt:287 */
         769  +
            )
         770  +
            /* ServerBuilderGenerator.kt:283 */
  487    771   
        }
         772  +
        /* ServerBuilderGenerator.kt:215 */
  488    773   
    }
         774  +
         775  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  489    776   
}
  490         -
/// See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         777  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
  491    778   
pub mod get_bucket_location_input {
  492    779   
         780  +
    /* RustType.kt:516 */
  493    781   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  494         -
    /// Holds one variant for each of the ways the builder can fail.
         782  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         783  +
    /* RustType.kt:516 */
  495    784   
    #[non_exhaustive]
         785  +
    /* ServerBuilderConstraintViolations.kt:75 */
  496    786   
    #[allow(clippy::enum_variant_names)]
  497    787   
    pub enum ConstraintViolation {
  498         -
        /// `bucket` was not provided but it is required when building `GetBucketLocationInput`.
         788  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `GetBucketLocationInput`.
         789  +
        /* ServerBuilderConstraintViolations.kt:143 */
  499    790   
        MissingBucket,
         791  +
        /* ServerBuilderConstraintViolations.kt:75 */
  500    792   
    }
         793  +
    /* ServerBuilderConstraintViolations.kt:117 */
  501    794   
    impl ::std::fmt::Display for ConstraintViolation {
         795  +
        /* ServerBuilderConstraintViolations.kt:118 */
  502    796   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         797  +
            /* ServerBuilderConstraintViolations.kt:119 */
  503    798   
            match self {
  504         -
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetBucketLocationInput`"),
  505         -
            }
         799  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetBucketLocationInput`"),
         800  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         801  +
            /* ServerBuilderConstraintViolations.kt:118 */
  506    802   
        }
         803  +
        /* ServerBuilderConstraintViolations.kt:117 */
  507    804   
    }
         805  +
    /* ServerBuilderConstraintViolations.kt:84 */
  508    806   
    impl ::std::error::Error for ConstraintViolation {}
         807  +
    /* ServerBuilderConstraintViolations.kt:171 */
  509    808   
    impl ConstraintViolation {
  510    809   
        pub(crate) fn as_validation_exception_field(
  511    810   
            self,
  512    811   
            path: ::std::string::String,
  513    812   
        ) -> crate::model::ValidationExceptionField {
  514    813   
            match self {
  515    814   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  516    815   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  517    816   
                                                path: path + "/Bucket",
  518    817   
                                            },
  519    818   
        }
  520    819   
        }
  521    820   
    }
         821  +
    /* ServerBuilderGenerator.kt:234 */
  522    822   
    impl ::std::convert::From<ConstraintViolation>
  523    823   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  524    824   
    {
  525    825   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  526    826   
            let first_validation_exception_field =
  527    827   
                constraint_violation.as_validation_exception_field("".to_owned());
  528    828   
            let validation_exception = crate::error::ValidationException {
  529    829   
                message: format!(
  530    830   
                    "1 validation error detected. {}",
  531    831   
                    &first_validation_exception_field.message
  532    832   
                ),
  533    833   
                field_list: Some(vec![first_validation_exception_field]),
  534    834   
            };
  535    835   
            Self::ConstraintViolation(
  536    836   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  537    837   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  538    838   
                            )
  539    839   
        }
  540    840   
    }
         841  +
    /* ServerBuilderGenerator.kt:244 */
  541    842   
    impl ::std::convert::From<Builder>
  542    843   
        for crate::constrained::MaybeConstrained<crate::input::GetBucketLocationInput>
  543    844   
    {
  544    845   
        fn from(builder: Builder) -> Self {
  545    846   
            Self::Unconstrained(builder)
  546    847   
        }
  547    848   
    }
         849  +
    /* ServerBuilderGenerator.kt:446 */
  548    850   
    impl ::std::convert::TryFrom<Builder> for crate::input::GetBucketLocationInput {
  549    851   
        type Error = ConstraintViolation;
  550    852   
  551    853   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  552    854   
            builder.build()
  553    855   
        }
  554    856   
    }
  555         -
    /// A builder for [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         857  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         858  +
    /* RustType.kt:516 */
  556    859   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         860  +
    /* ServerBuilderGenerator.kt:211 */
  557    861   
    pub struct Builder {
         862  +
        /* ServerBuilderGenerator.kt:308 */
  558    863   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         864  +
        /* ServerBuilderGenerator.kt:211 */
  559    865   
    }
         866  +
    /* ServerBuilderGenerator.kt:215 */
  560    867   
    impl Builder {
         868  +
        /* ServerBuilderGenerator.kt:331 */
  561    869   
        #[allow(missing_docs)] // documentation missing in model
         870  +
                               /* ServerBuilderGenerator.kt:343 */
  562    871   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  563         -
            self.bucket = Some(input);
         872  +
            /* ServerBuilderGenerator.kt:344 */
         873  +
            self.bucket =
         874  +
                /* ServerBuilderGenerator.kt:345 */Some(
         875  +
                    /* ServerBuilderGenerator.kt:376 */input
         876  +
                /* ServerBuilderGenerator.kt:345 */)
         877  +
            /* ServerBuilderGenerator.kt:344 */;
  564    878   
            self
         879  +
            /* ServerBuilderGenerator.kt:343 */
  565    880   
        }
         881  +
        /* ServerBuilderGenerator.kt:426 */
  566    882   
        #[allow(missing_docs)] // documentation missing in model
         883  +
                               /* ServerBuilderGenerator.kt:428 */
  567    884   
        pub(crate) fn set_bucket(
  568    885   
            mut self,
  569    886   
            input: impl ::std::convert::Into<::std::string::String>,
  570    887   
        ) -> Self {
         888  +
            /* ServerBuilderGenerator.kt:429 */
  571    889   
            self.bucket = Some(input.into());
  572    890   
            self
         891  +
            /* ServerBuilderGenerator.kt:428 */
  573    892   
        }
  574         -
        /// Consumes the builder and constructs a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
  575         -
        ///
         893  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
         894  +
        /// /* ServerBuilderGenerator.kt:260 */
  576    895   
        /// The builder fails to construct a [`GetBucketLocationInput`](crate::input::GetBucketLocationInput) if a [`ConstraintViolation`] occurs.
  577    896   
        ///
         897  +
        /* ServerBuilderGenerator.kt:271 */
  578    898   
        pub fn build(self) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
  579    899   
            self.build_enforcing_all_constraints()
  580    900   
        }
         901  +
        /* ServerBuilderGenerator.kt:283 */
  581    902   
        fn build_enforcing_all_constraints(
  582    903   
            self,
  583    904   
        ) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
  584         -
            Ok(crate::input::GetBucketLocationInput {
  585         -
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
  586         -
            })
         905  +
            /* ServerBuilderGenerator.kt:287 */
         906  +
            Ok(
         907  +
                /* ServerBuilderGenerator.kt:542 */
         908  +
                crate::input::GetBucketLocationInput {
         909  +
                    /* ServerBuilderGenerator.kt:546 */
         910  +
                    bucket: self
         911  +
                        .bucket
         912  +
                        /* ServerBuilderGenerator.kt:569 */
         913  +
                        .ok_or(ConstraintViolation::MissingBucket)?,
         914  +
                    /* ServerBuilderGenerator.kt:542 */
         915  +
                }, /* ServerBuilderGenerator.kt:287 */
         916  +
            )
         917  +
            /* ServerBuilderGenerator.kt:283 */
  587    918   
        }
         919  +
        /* ServerBuilderGenerator.kt:215 */
  588    920   
    }
         921  +
         922  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  589    923   
}
  590         -
/// See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         924  +
/// /* ServerBuilderGenerator.kt:171 */See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  591    925   
pub mod list_objects_v2_input {
  592    926   
         927  +
    /* RustType.kt:516 */
  593    928   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  594         -
    /// Holds one variant for each of the ways the builder can fail.
         929  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         930  +
    /* RustType.kt:516 */
  595    931   
    #[non_exhaustive]
         932  +
    /* ServerBuilderConstraintViolations.kt:75 */
  596    933   
    #[allow(clippy::enum_variant_names)]
  597    934   
    pub enum ConstraintViolation {
  598         -
        /// `bucket` was not provided but it is required when building `ListObjectsV2Input`.
         935  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`bucket` was not provided but it is required when building `ListObjectsV2Input`.
         936  +
        /* ServerBuilderConstraintViolations.kt:143 */
  599    937   
        MissingBucket,
  600         -
        /// Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
         938  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
         939  +
        /* RustType.kt:516 */
  601    940   
        #[doc(hidden)]
         941  +
        /* ServerBuilderConstraintViolations.kt:164 */
  602    942   
        EncodingType(crate::model::encoding_type::ConstraintViolation),
  603         -
        /// Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
         943  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
         944  +
        /* RustType.kt:516 */
  604    945   
        #[doc(hidden)]
         946  +
        /* ServerBuilderConstraintViolations.kt:164 */
  605    947   
        RequestPayer(crate::model::request_payer::ConstraintViolation),
         948  +
        /* ServerBuilderConstraintViolations.kt:75 */
  606    949   
    }
         950  +
    /* ServerBuilderConstraintViolations.kt:117 */
  607    951   
    impl ::std::fmt::Display for ConstraintViolation {
         952  +
        /* ServerBuilderConstraintViolations.kt:118 */
  608    953   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         954  +
            /* ServerBuilderConstraintViolations.kt:119 */
  609    955   
            match self {
  610         -
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
  611         -
                ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
  612         -
                ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
  613         -
            }
         956  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
         957  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
         958  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
         959  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         960  +
            /* ServerBuilderConstraintViolations.kt:118 */
  614    961   
        }
         962  +
        /* ServerBuilderConstraintViolations.kt:117 */
  615    963   
    }
         964  +
    /* ServerBuilderConstraintViolations.kt:84 */
  616    965   
    impl ::std::error::Error for ConstraintViolation {}
         966  +
    /* ServerBuilderConstraintViolations.kt:171 */
  617    967   
    impl ConstraintViolation {
  618    968   
        pub(crate) fn as_validation_exception_field(
  619    969   
            self,
  620    970   
            path: ::std::string::String,
  621    971   
        ) -> crate::model::ValidationExceptionField {
  622    972   
            match self {
  623    973   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  624    974   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  625    975   
                                                path: path + "/Bucket",
  626    976   
                                            },
  627    977   
            ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
  628    978   
            ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
  629    979   
        }
  630    980   
        }
  631    981   
    }
         982  +
    /* ServerBuilderGenerator.kt:234 */
  632    983   
    impl ::std::convert::From<ConstraintViolation>
  633    984   
        for ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection
  634    985   
    {
  635    986   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  636    987   
            let first_validation_exception_field =
  637    988   
                constraint_violation.as_validation_exception_field("".to_owned());
  638    989   
            let validation_exception = crate::error::ValidationException {
  639    990   
                message: format!(
  640    991   
                    "1 validation error detected. {}",
  641    992   
                    &first_validation_exception_field.message
  642    993   
                ),
  643    994   
                field_list: Some(vec![first_validation_exception_field]),
  644    995   
            };
  645    996   
            Self::ConstraintViolation(
  646    997   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  647    998   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  648    999   
                            )
  649   1000   
        }
  650   1001   
    }
        1002  +
    /* ServerBuilderGenerator.kt:244 */
  651   1003   
    impl ::std::convert::From<Builder>
  652   1004   
        for crate::constrained::MaybeConstrained<crate::input::ListObjectsV2Input>
  653   1005   
    {
  654   1006   
        fn from(builder: Builder) -> Self {
  655   1007   
            Self::Unconstrained(builder)
  656   1008   
        }
  657   1009   
    }
        1010  +
    /* ServerBuilderGenerator.kt:446 */
  658   1011   
    impl ::std::convert::TryFrom<Builder> for crate::input::ListObjectsV2Input {
  659   1012   
        type Error = ConstraintViolation;
  660   1013   
  661   1014   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  662   1015   
            builder.build()
  663   1016   
        }
  664   1017   
    }
  665         -
    /// A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
        1018  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
        1019  +
    /* RustType.kt:516 */
  666   1020   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1021  +
    /* ServerBuilderGenerator.kt:211 */
  667   1022   
    pub struct Builder {
        1023  +
        /* ServerBuilderGenerator.kt:308 */
  668   1024   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
        1025  +
        /* ServerBuilderGenerator.kt:308 */
  669   1026   
        pub(crate) delimiter: ::std::option::Option<::std::string::String>,
        1027  +
        /* ServerBuilderGenerator.kt:308 */
  670   1028   
        pub(crate) encoding_type:
  671   1029   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EncodingType>>,
  672         -
        pub(crate) max_keys: ::std::option::Option<i32>,
        1030  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) max_keys: ::std::option::Option<i32>,
        1031  +
        /* ServerBuilderGenerator.kt:308 */
  673   1032   
        pub(crate) prefix: ::std::option::Option<::std::string::String>,
        1033  +
        /* ServerBuilderGenerator.kt:308 */
  674   1034   
        pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
        1035  +
        /* ServerBuilderGenerator.kt:308 */
  675   1036   
        pub(crate) fetch_owner: ::std::option::Option<bool>,
        1037  +
        /* ServerBuilderGenerator.kt:308 */
  676   1038   
        pub(crate) start_after: ::std::option::Option<::std::string::String>,
        1039  +
        /* ServerBuilderGenerator.kt:308 */
  677   1040   
        pub(crate) request_payer:
  678   1041   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RequestPayer>>,
        1042  +
        /* ServerBuilderGenerator.kt:308 */
  679   1043   
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
        1044  +
        /* ServerBuilderGenerator.kt:211 */
  680   1045   
    }
        1046  +
    /* ServerBuilderGenerator.kt:215 */
  681   1047   
    impl Builder {
        1048  +
        /* ServerBuilderGenerator.kt:331 */
  682   1049   
        #[allow(missing_docs)] // documentation missing in model
        1050  +
                               /* ServerBuilderGenerator.kt:343 */
  683   1051   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  684         -
            self.bucket = Some(input);
        1052  +
            /* ServerBuilderGenerator.kt:344 */
        1053  +
            self.bucket =
        1054  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1055  +
                    /* ServerBuilderGenerator.kt:376 */input
        1056  +
                /* ServerBuilderGenerator.kt:345 */)
        1057  +
            /* ServerBuilderGenerator.kt:344 */;
  685   1058   
            self
        1059  +
            /* ServerBuilderGenerator.kt:343 */
  686   1060   
        }
        1061  +
        /* ServerBuilderGenerator.kt:426 */
  687   1062   
        #[allow(missing_docs)] // documentation missing in model
        1063  +
                               /* ServerBuilderGenerator.kt:428 */
  688   1064   
        pub(crate) fn set_bucket(
  689   1065   
            mut self,
  690   1066   
            input: impl ::std::convert::Into<::std::string::String>,
  691   1067   
        ) -> Self {
        1068  +
            /* ServerBuilderGenerator.kt:429 */
  692   1069   
            self.bucket = Some(input.into());
  693   1070   
            self
        1071  +
            /* ServerBuilderGenerator.kt:428 */
  694   1072   
        }
        1073  +
        /* ServerBuilderGenerator.kt:331 */
  695   1074   
        #[allow(missing_docs)] // documentation missing in model
        1075  +
                               /* ServerBuilderGenerator.kt:343 */
  696   1076   
        pub fn delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  697         -
            self.delimiter = input;
        1077  +
            /* ServerBuilderGenerator.kt:344 */
        1078  +
            self.delimiter =
        1079  +
                /* ServerBuilderGenerator.kt:376 */input
        1080  +
            /* ServerBuilderGenerator.kt:344 */;
  698   1081   
            self
        1082  +
            /* ServerBuilderGenerator.kt:343 */
  699   1083   
        }
        1084  +
        /* ServerBuilderGenerator.kt:426 */
  700   1085   
        #[allow(missing_docs)] // documentation missing in model
        1086  +
                               /* ServerBuilderGenerator.kt:428 */
  701   1087   
        pub(crate) fn set_delimiter(
  702   1088   
            mut self,
  703   1089   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  704   1090   
        ) -> Self {
        1091  +
            /* ServerBuilderGenerator.kt:429 */
  705   1092   
            self.delimiter = input.map(|v| v.into());
  706   1093   
            self
        1094  +
            /* ServerBuilderGenerator.kt:428 */
  707   1095   
        }
        1096  +
        /* ServerBuilderGenerator.kt:331 */
  708   1097   
        #[allow(missing_docs)] // documentation missing in model
        1098  +
                               /* ServerBuilderGenerator.kt:343 */
  709   1099   
        pub fn encoding_type(
  710   1100   
            mut self,
  711   1101   
            input: ::std::option::Option<crate::model::EncodingType>,
  712   1102   
        ) -> Self {
  713         -
            self.encoding_type = input.map(
  714         -
                #[allow(clippy::redundant_closure)]
  715         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  716         -
            );
        1103  +
            /* ServerBuilderGenerator.kt:344 */
        1104  +
            self.encoding_type =
        1105  +
                /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
        1106  +
            /* ServerBuilderGenerator.kt:344 */;
  717   1107   
            self
        1108  +
            /* ServerBuilderGenerator.kt:343 */
  718   1109   
        }
        1110  +
        /* ServerBuilderGenerator.kt:426 */
  719   1111   
        #[allow(missing_docs)] // documentation missing in model
        1112  +
                               /* ServerBuilderGenerator.kt:428 */
  720   1113   
        pub(crate) fn set_encoding_type(
  721   1114   
            mut self,
  722   1115   
            input: Option<
  723   1116   
                impl ::std::convert::Into<
  724   1117   
                    crate::constrained::MaybeConstrained<crate::model::EncodingType>,
  725   1118   
                >,
  726   1119   
            >,
  727   1120   
        ) -> Self {
        1121  +
            /* ServerBuilderGenerator.kt:429 */
  728   1122   
            self.encoding_type = input.map(|v| v.into());
  729   1123   
            self
        1124  +
            /* ServerBuilderGenerator.kt:428 */
  730   1125   
        }
        1126  +
        /* ServerBuilderGenerator.kt:331 */
  731   1127   
        #[allow(missing_docs)] // documentation missing in model
        1128  +
                               /* ServerBuilderGenerator.kt:343 */
  732   1129   
        pub fn max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
  733         -
            self.max_keys = input;
        1130  +
            /* ServerBuilderGenerator.kt:344 */
        1131  +
            self.max_keys =
        1132  +
                /* ServerBuilderGenerator.kt:376 */input
        1133  +
            /* ServerBuilderGenerator.kt:344 */;
  734   1134   
            self
        1135  +
            /* ServerBuilderGenerator.kt:343 */
  735   1136   
        }
        1137  +
        /* ServerBuilderGenerator.kt:426 */
  736   1138   
        #[allow(missing_docs)] // documentation missing in model
        1139  +
                               /* ServerBuilderGenerator.kt:428 */
  737   1140   
        pub(crate) fn set_max_keys(
  738   1141   
            mut self,
  739   1142   
            input: Option<impl ::std::convert::Into<i32>>,
  740   1143   
        ) -> Self {
        1144  +
            /* ServerBuilderGenerator.kt:429 */
  741   1145   
            self.max_keys = input.map(|v| v.into());
  742   1146   
            self
        1147  +
            /* ServerBuilderGenerator.kt:428 */
  743   1148   
        }
        1149  +
        /* ServerBuilderGenerator.kt:331 */
  744   1150   
        #[allow(missing_docs)] // documentation missing in model
        1151  +
                               /* ServerBuilderGenerator.kt:343 */
  745   1152   
        pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  746         -
            self.prefix = input;
        1153  +
            /* ServerBuilderGenerator.kt:344 */
        1154  +
            self.prefix =
        1155  +
                /* ServerBuilderGenerator.kt:376 */input
        1156  +
            /* ServerBuilderGenerator.kt:344 */;
  747   1157   
            self
        1158  +
            /* ServerBuilderGenerator.kt:343 */
  748   1159   
        }
        1160  +
        /* ServerBuilderGenerator.kt:426 */
  749   1161   
        #[allow(missing_docs)] // documentation missing in model
        1162  +
                               /* ServerBuilderGenerator.kt:428 */
  750   1163   
        pub(crate) fn set_prefix(
  751   1164   
            mut self,
  752   1165   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  753   1166   
        ) -> Self {
        1167  +
            /* ServerBuilderGenerator.kt:429 */
  754   1168   
            self.prefix = input.map(|v| v.into());
  755   1169   
            self
        1170  +
            /* ServerBuilderGenerator.kt:428 */
  756   1171   
        }
        1172  +
        /* ServerBuilderGenerator.kt:331 */
  757   1173   
        #[allow(missing_docs)] // documentation missing in model
        1174  +
                               /* ServerBuilderGenerator.kt:343 */
  758   1175   
        pub fn continuation_token(
  759   1176   
            mut self,
  760   1177   
            input: ::std::option::Option<::std::string::String>,
  761   1178   
        ) -> Self {
  762         -
            self.continuation_token = input;
        1179  +
            /* ServerBuilderGenerator.kt:344 */
        1180  +
            self.continuation_token =
        1181  +
                /* ServerBuilderGenerator.kt:376 */input
        1182  +
            /* ServerBuilderGenerator.kt:344 */;
  763   1183   
            self
        1184  +
            /* ServerBuilderGenerator.kt:343 */
  764   1185   
        }
        1186  +
        /* ServerBuilderGenerator.kt:426 */
  765   1187   
        #[allow(missing_docs)] // documentation missing in model
        1188  +
                               /* ServerBuilderGenerator.kt:428 */
  766   1189   
        pub(crate) fn set_continuation_token(
  767   1190   
            mut self,
  768   1191   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  769   1192   
        ) -> Self {
        1193  +
            /* ServerBuilderGenerator.kt:429 */
  770   1194   
            self.continuation_token = input.map(|v| v.into());
  771   1195   
            self
        1196  +
            /* ServerBuilderGenerator.kt:428 */
  772   1197   
        }
        1198  +
        /* ServerBuilderGenerator.kt:331 */
  773   1199   
        #[allow(missing_docs)] // documentation missing in model
        1200  +
                               /* ServerBuilderGenerator.kt:343 */
  774   1201   
        pub fn fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
  775         -
            self.fetch_owner = input;
        1202  +
            /* ServerBuilderGenerator.kt:344 */
        1203  +
            self.fetch_owner =
        1204  +
                /* ServerBuilderGenerator.kt:376 */input
        1205  +
            /* ServerBuilderGenerator.kt:344 */;
  776   1206   
            self
        1207  +
            /* ServerBuilderGenerator.kt:343 */
  777   1208   
        }
        1209  +
        /* ServerBuilderGenerator.kt:426 */
  778   1210   
        #[allow(missing_docs)] // documentation missing in model
        1211  +
                               /* ServerBuilderGenerator.kt:428 */
  779   1212   
        pub(crate) fn set_fetch_owner(
  780   1213   
            mut self,
  781   1214   
            input: Option<impl ::std::convert::Into<bool>>,
  782   1215   
        ) -> Self {
        1216  +
            /* ServerBuilderGenerator.kt:429 */
  783   1217   
            self.fetch_owner = input.map(|v| v.into());
  784   1218   
            self
        1219  +
            /* ServerBuilderGenerator.kt:428 */
  785   1220   
        }
        1221  +
        /* ServerBuilderGenerator.kt:331 */
  786   1222   
        #[allow(missing_docs)] // documentation missing in model
        1223  +
                               /* ServerBuilderGenerator.kt:343 */
  787   1224   
        pub fn start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  788         -
            self.start_after = input;
        1225  +
            /* ServerBuilderGenerator.kt:344 */
        1226  +
            self.start_after =
        1227  +
                /* ServerBuilderGenerator.kt:376 */input
        1228  +
            /* ServerBuilderGenerator.kt:344 */;
  789   1229   
            self
        1230  +
            /* ServerBuilderGenerator.kt:343 */
  790   1231   
        }
        1232  +
        /* ServerBuilderGenerator.kt:426 */
  791   1233   
        #[allow(missing_docs)] // documentation missing in model
        1234  +
                               /* ServerBuilderGenerator.kt:428 */
  792   1235   
        pub(crate) fn set_start_after(
  793   1236   
            mut self,
  794   1237   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  795   1238   
        ) -> Self {
        1239  +
            /* ServerBuilderGenerator.kt:429 */
  796   1240   
            self.start_after = input.map(|v| v.into());
  797   1241   
            self
        1242  +
            /* ServerBuilderGenerator.kt:428 */
  798   1243   
        }
        1244  +
        /* ServerBuilderGenerator.kt:331 */
  799   1245   
        #[allow(missing_docs)] // documentation missing in model
        1246  +
                               /* ServerBuilderGenerator.kt:343 */
  800   1247   
        pub fn request_payer(
  801   1248   
            mut self,
  802   1249   
            input: ::std::option::Option<crate::model::RequestPayer>,
  803   1250   
        ) -> Self {
  804         -
            self.request_payer = input.map(
  805         -
                #[allow(clippy::redundant_closure)]
  806         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  807         -
            );
        1251  +
            /* ServerBuilderGenerator.kt:344 */
        1252  +
            self.request_payer =
        1253  +
                /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
        1254  +
            /* ServerBuilderGenerator.kt:344 */;
  808   1255   
            self
        1256  +
            /* ServerBuilderGenerator.kt:343 */
  809   1257   
        }
        1258  +
        /* ServerBuilderGenerator.kt:426 */
  810   1259   
        #[allow(missing_docs)] // documentation missing in model
        1260  +
                               /* ServerBuilderGenerator.kt:428 */
  811   1261   
        pub(crate) fn set_request_payer(
  812   1262   
            mut self,
  813   1263   
            input: Option<
  814   1264   
                impl ::std::convert::Into<
  815   1265   
                    crate::constrained::MaybeConstrained<crate::model::RequestPayer>,
  816   1266   
                >,
  817   1267   
            >,
  818   1268   
        ) -> Self {
        1269  +
            /* ServerBuilderGenerator.kt:429 */
  819   1270   
            self.request_payer = input.map(|v| v.into());
  820   1271   
            self
        1272  +
            /* ServerBuilderGenerator.kt:428 */
  821   1273   
        }
        1274  +
        /* ServerBuilderGenerator.kt:331 */
  822   1275   
        #[allow(missing_docs)] // documentation missing in model
        1276  +
                               /* ServerBuilderGenerator.kt:343 */
  823   1277   
        pub fn expected_bucket_owner(
  824   1278   
            mut self,
  825   1279   
            input: ::std::option::Option<::std::string::String>,
  826   1280   
        ) -> Self {
  827         -
            self.expected_bucket_owner = input;
        1281  +
            /* ServerBuilderGenerator.kt:344 */
        1282  +
            self.expected_bucket_owner =
        1283  +
                /* ServerBuilderGenerator.kt:376 */input
        1284  +
            /* ServerBuilderGenerator.kt:344 */;
  828   1285   
            self
        1286  +
            /* ServerBuilderGenerator.kt:343 */
  829   1287   
        }
        1288  +
        /* ServerBuilderGenerator.kt:426 */
  830   1289   
        #[allow(missing_docs)] // documentation missing in model
        1290  +
                               /* ServerBuilderGenerator.kt:428 */
  831   1291   
        pub(crate) fn set_expected_bucket_owner(
  832   1292   
            mut self,
  833   1293   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  834   1294   
        ) -> Self {
        1295  +
            /* ServerBuilderGenerator.kt:429 */
  835   1296   
            self.expected_bucket_owner = input.map(|v| v.into());
  836   1297   
            self
        1298  +
            /* ServerBuilderGenerator.kt:428 */
  837   1299   
        }
  838         -
        /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  839         -
        ///
        1300  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
        1301  +
        /// /* ServerBuilderGenerator.kt:260 */
  840   1302   
        /// The builder fails to construct a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input) if a [`ConstraintViolation`] occurs.
  841   1303   
        ///
  842         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1304  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1305  +
        /* ServerBuilderGenerator.kt:271 */
  843   1306   
        pub fn build(self) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
  844   1307   
            self.build_enforcing_all_constraints()
  845   1308   
        }
        1309  +
        /* ServerBuilderGenerator.kt:283 */
  846   1310   
        fn build_enforcing_all_constraints(
  847   1311   
            self,
  848   1312   
        ) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
  849         -
            Ok(crate::input::ListObjectsV2Input {
  850         -
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
        1313  +
            /* ServerBuilderGenerator.kt:287 */
        1314  +
            Ok(
        1315  +
                /* ServerBuilderGenerator.kt:542 */
        1316  +
                crate::input::ListObjectsV2Input {
        1317  +
                    /* ServerBuilderGenerator.kt:546 */
        1318  +
                    bucket: self
        1319  +
                        .bucket
        1320  +
                        /* ServerBuilderGenerator.kt:569 */
        1321  +
                        .ok_or(ConstraintViolation::MissingBucket)?,
        1322  +
                    /* ServerBuilderGenerator.kt:546 */
  851   1323   
                    delimiter: self.delimiter,
        1324  +
                    /* ServerBuilderGenerator.kt:546 */
  852   1325   
                    encoding_type: self
  853   1326   
                        .encoding_type
        1327  +
                        /* ServerBuilderGenerator.kt:602 */
  854   1328   
                        .map(|v| match v {
  855   1329   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  856   1330   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  857   1331   
                        })
        1332  +
                        /* ServerBuilderGenerator.kt:614 */
  858   1333   
                        .map(|res| res.map_err(ConstraintViolation::EncodingType))
  859   1334   
                        .transpose()?,
        1335  +
                    /* ServerBuilderGenerator.kt:546 */
  860   1336   
                    max_keys: self.max_keys,
        1337  +
                    /* ServerBuilderGenerator.kt:546 */
  861   1338   
                    prefix: self.prefix,
        1339  +
                    /* ServerBuilderGenerator.kt:546 */
  862   1340   
                    continuation_token: self.continuation_token,
        1341  +
                    /* ServerBuilderGenerator.kt:546 */
  863   1342   
                    fetch_owner: self.fetch_owner,
        1343  +
                    /* ServerBuilderGenerator.kt:546 */
  864   1344   
                    start_after: self.start_after,
        1345  +
                    /* ServerBuilderGenerator.kt:546 */
  865   1346   
                    request_payer: self
  866   1347   
                        .request_payer
        1348  +
                        /* ServerBuilderGenerator.kt:602 */
  867   1349   
                        .map(|v| match v {
  868   1350   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  869   1351   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  870   1352   
                        })
        1353  +
                        /* ServerBuilderGenerator.kt:614 */
  871   1354   
                        .map(|res| res.map_err(ConstraintViolation::RequestPayer))
  872   1355   
                        .transpose()?,
        1356  +
                    /* ServerBuilderGenerator.kt:546 */
  873   1357   
                    expected_bucket_owner: self.expected_bucket_owner,
  874         -
            })
        1358  +
                    /* ServerBuilderGenerator.kt:542 */
        1359  +
                }, /* ServerBuilderGenerator.kt:287 */
        1360  +
            )
        1361  +
            /* ServerBuilderGenerator.kt:283 */
  875   1362   
        }
        1363  +
        /* ServerBuilderGenerator.kt:215 */
  876   1364   
    }
        1365  +
        1366  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  877   1367   
}