Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

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

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

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

@@ -1,1 +274,295 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Error type for the `GetObject` operation.
    3         -
/// Each variant represents an error that can occur for the `GetObject` operation.
           2  +
/// Error type for the `ListObjectsV2` operation.
           3  +
/// Each variant represents an error that can occur for the `ListObjectsV2` operation.
    4      4   
#[derive(::std::fmt::Debug)]
    5         -
pub enum GetObjectError {
           5  +
pub enum ListObjectsV2Error {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    NoSuchBucket(crate::error::NoSuchBucket),
    6      8   
    /// 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.
    7      9   
    ValidationException(crate::error::ValidationException),
    8     10   
}
    9         -
impl ::std::fmt::Display for GetObjectError {
          11  +
impl ::std::fmt::Display for ListObjectsV2Error {
   10     12   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   11     13   
        match &self {
   12         -
            GetObjectError::ValidationException(_inner) => _inner.fmt(f),
          14  +
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.fmt(f),
          15  +
            ListObjectsV2Error::ValidationException(_inner) => _inner.fmt(f),
   13     16   
        }
   14     17   
    }
   15     18   
}
   16         -
impl GetObjectError {
   17         -
    /// Returns `true` if the error kind is `GetObjectError::ValidationException`.
          19  +
impl ListObjectsV2Error {
          20  +
    /// Returns `true` if the error kind is `ListObjectsV2Error::NoSuchBucket`.
          21  +
    pub fn is_no_such_bucket(&self) -> bool {
          22  +
        matches!(&self, ListObjectsV2Error::NoSuchBucket(_))
          23  +
    }
          24  +
    /// Returns `true` if the error kind is `ListObjectsV2Error::ValidationException`.
   18     25   
    pub fn is_validation_exception(&self) -> bool {
   19         -
        matches!(&self, GetObjectError::ValidationException(_))
          26  +
        matches!(&self, ListObjectsV2Error::ValidationException(_))
   20     27   
    }
   21     28   
    /// Returns the error name string by matching the correct variant.
   22     29   
    pub fn name(&self) -> &'static str {
   23     30   
        match &self {
   24         -
            GetObjectError::ValidationException(_inner) => _inner.name(),
          31  +
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.name(),
          32  +
            ListObjectsV2Error::ValidationException(_inner) => _inner.name(),
   25     33   
        }
   26     34   
    }
   27     35   
}
   28         -
impl ::std::error::Error for GetObjectError {
          36  +
impl ::std::error::Error for ListObjectsV2Error {
   29     37   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   30     38   
        match &self {
   31         -
            GetObjectError::ValidationException(_inner) => Some(_inner),
          39  +
            ListObjectsV2Error::NoSuchBucket(_inner) => Some(_inner),
          40  +
            ListObjectsV2Error::ValidationException(_inner) => Some(_inner),
   32     41   
        }
   33     42   
    }
   34     43   
}
   35         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetObjectError {
   36         -
    fn from(variant: crate::error::ValidationException) -> crate::error::GetObjectError {
   37         -
        Self::ValidationException(variant)
   38         -
    }
   39         -
}
   40         -
   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.
   42         -
#[derive(
   43         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   44         -
)]
   45         -
pub struct ValidationException {
   46         -
    /// A summary of the validation failure.
   47         -
    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.
   49         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
   50         -
}
   51         -
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.
   53         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
   54         -
        self.field_list.as_deref()
   55         -
    }
   56         -
}
   57         -
impl ValidationException {
   58         -
    /// Returns the error message.
   59         -
    pub fn message(&self) -> &str {
   60         -
        &self.message
   61         -
    }
   62         -
    #[doc(hidden)]
   63         -
    /// Returns the error name.
   64         -
    pub fn name(&self) -> &'static str {
   65         -
        "ValidationException"
   66         -
    }
   67         -
}
   68         -
impl ::std::fmt::Display for ValidationException {
   69         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   70         -
        ::std::write!(f, "ValidationException")?;
   71         -
        {
   72         -
            ::std::write!(f, ": {}", &self.message)?;
   73         -
        }
   74         -
        Ok(())
          44  +
impl ::std::convert::From<crate::error::NoSuchBucket> for crate::error::ListObjectsV2Error {
          45  +
    fn from(variant: crate::error::NoSuchBucket) -> crate::error::ListObjectsV2Error {
          46  +
        Self::NoSuchBucket(variant)
   75     47   
    }
   76     48   
}
   77         -
impl ::std::error::Error for ValidationException {}
   78         -
impl ValidationException {
   79         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
   80         -
    pub fn builder() -> crate::error::validation_exception::Builder {
   81         -
        crate::error::validation_exception::Builder::default()
          49  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::ListObjectsV2Error {
          50  +
    fn from(variant: crate::error::ValidationException) -> crate::error::ListObjectsV2Error {
          51  +
        Self::ValidationException(variant)
   82     52   
    }
   83     53   
}
   84     54   
   85         -
/// Error type for the `DeleteObjectTagging` operation.
   86         -
/// Each variant represents an error that can occur for the `DeleteObjectTagging` operation.
          55  +
/// Error type for the `GetBucketLocation` operation.
          56  +
/// Each variant represents an error that can occur for the `GetBucketLocation` operation.
   87     57   
#[derive(::std::fmt::Debug)]
   88         -
pub enum DeleteObjectTaggingError {
          58  +
pub enum GetBucketLocationError {
   89     59   
    /// 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     60   
    ValidationException(crate::error::ValidationException),
   91     61   
}
   92         -
impl ::std::fmt::Display for DeleteObjectTaggingError {
          62  +
impl ::std::fmt::Display for GetBucketLocationError {
   93     63   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   94     64   
        match &self {
   95         -
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.fmt(f),
          65  +
            GetBucketLocationError::ValidationException(_inner) => _inner.fmt(f),
   96     66   
        }
   97     67   
    }
   98     68   
}
   99         -
impl DeleteObjectTaggingError {
  100         -
    /// Returns `true` if the error kind is `DeleteObjectTaggingError::ValidationException`.
          69  +
impl GetBucketLocationError {
          70  +
    /// Returns `true` if the error kind is `GetBucketLocationError::ValidationException`.
  101     71   
    pub fn is_validation_exception(&self) -> bool {
  102         -
        matches!(&self, DeleteObjectTaggingError::ValidationException(_))
          72  +
        matches!(&self, GetBucketLocationError::ValidationException(_))
  103     73   
    }
  104     74   
    /// Returns the error name string by matching the correct variant.
  105     75   
    pub fn name(&self) -> &'static str {
  106     76   
        match &self {
  107         -
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.name(),
          77  +
            GetBucketLocationError::ValidationException(_inner) => _inner.name(),
  108     78   
        }
  109     79   
    }
  110     80   
}
  111         -
impl ::std::error::Error for DeleteObjectTaggingError {
          81  +
impl ::std::error::Error for GetBucketLocationError {
  112     82   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  113     83   
        match &self {
  114         -
            DeleteObjectTaggingError::ValidationException(_inner) => Some(_inner),
          84  +
            GetBucketLocationError::ValidationException(_inner) => Some(_inner),
  115     85   
        }
  116     86   
    }
  117     87   
}
  118     88   
impl ::std::convert::From<crate::error::ValidationException>
  119         -
    for crate::error::DeleteObjectTaggingError
          89  +
    for crate::error::GetBucketLocationError
  120     90   
{
  121         -
    fn from(variant: crate::error::ValidationException) -> crate::error::DeleteObjectTaggingError {
          91  +
    fn from(variant: crate::error::ValidationException) -> crate::error::GetBucketLocationError {
  122     92   
        Self::ValidationException(variant)
  123     93   
    }
  124     94   
}
  125     95   
  126         -
/// Error type for the `GetBucketLocation` operation.
  127         -
/// Each variant represents an error that can occur for the `GetBucketLocation` operation.
          96  +
/// Error type for the `DeleteObjectTagging` operation.
          97  +
/// Each variant represents an error that can occur for the `DeleteObjectTagging` operation.
  128     98   
#[derive(::std::fmt::Debug)]
  129         -
pub enum GetBucketLocationError {
          99  +
pub enum DeleteObjectTaggingError {
  130    100   
    /// 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.
  131    101   
    ValidationException(crate::error::ValidationException),
  132    102   
}
  133         -
impl ::std::fmt::Display for GetBucketLocationError {
         103  +
impl ::std::fmt::Display for DeleteObjectTaggingError {
  134    104   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  135    105   
        match &self {
  136         -
            GetBucketLocationError::ValidationException(_inner) => _inner.fmt(f),
         106  +
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.fmt(f),
  137    107   
        }
  138    108   
    }
  139    109   
}
  140         -
impl GetBucketLocationError {
  141         -
    /// Returns `true` if the error kind is `GetBucketLocationError::ValidationException`.
         110  +
impl DeleteObjectTaggingError {
         111  +
    /// Returns `true` if the error kind is `DeleteObjectTaggingError::ValidationException`.
  142    112   
    pub fn is_validation_exception(&self) -> bool {
  143         -
        matches!(&self, GetBucketLocationError::ValidationException(_))
         113  +
        matches!(&self, DeleteObjectTaggingError::ValidationException(_))
  144    114   
    }
  145    115   
    /// Returns the error name string by matching the correct variant.
  146    116   
    pub fn name(&self) -> &'static str {
  147    117   
        match &self {
  148         -
            GetBucketLocationError::ValidationException(_inner) => _inner.name(),
         118  +
            DeleteObjectTaggingError::ValidationException(_inner) => _inner.name(),
  149    119   
        }
  150    120   
    }
  151    121   
}
  152         -
impl ::std::error::Error for GetBucketLocationError {
         122  +
impl ::std::error::Error for DeleteObjectTaggingError {
  153    123   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  154    124   
        match &self {
  155         -
            GetBucketLocationError::ValidationException(_inner) => Some(_inner),
         125  +
            DeleteObjectTaggingError::ValidationException(_inner) => Some(_inner),
  156    126   
        }
  157    127   
    }
  158    128   
}
  159    129   
impl ::std::convert::From<crate::error::ValidationException>
  160         -
    for crate::error::GetBucketLocationError
         130  +
    for crate::error::DeleteObjectTaggingError
  161    131   
{
  162         -
    fn from(variant: crate::error::ValidationException) -> crate::error::GetBucketLocationError {
         132  +
    fn from(variant: crate::error::ValidationException) -> crate::error::DeleteObjectTaggingError {
  163    133   
        Self::ValidationException(variant)
  164    134   
    }
  165    135   
}
  166    136   
  167         -
/// Error type for the `ListObjectsV2` operation.
  168         -
/// Each variant represents an error that can occur for the `ListObjectsV2` operation.
         137  +
/// Error type for the `GetObject` operation.
         138  +
/// Each variant represents an error that can occur for the `GetObject` operation.
  169    139   
#[derive(::std::fmt::Debug)]
  170         -
pub enum ListObjectsV2Error {
  171         -
    #[allow(missing_docs)] // documentation missing in model
  172         -
    NoSuchBucket(crate::error::NoSuchBucket),
         140  +
pub enum GetObjectError {
  173    141   
    /// 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.
  174    142   
    ValidationException(crate::error::ValidationException),
  175    143   
}
  176         -
impl ::std::fmt::Display for ListObjectsV2Error {
         144  +
impl ::std::fmt::Display for GetObjectError {
  177    145   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  178    146   
        match &self {
  179         -
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.fmt(f),
  180         -
            ListObjectsV2Error::ValidationException(_inner) => _inner.fmt(f),
         147  +
            GetObjectError::ValidationException(_inner) => _inner.fmt(f),
  181    148   
        }
  182    149   
    }
  183    150   
}
  184         -
impl ListObjectsV2Error {
  185         -
    /// Returns `true` if the error kind is `ListObjectsV2Error::NoSuchBucket`.
  186         -
    pub fn is_no_such_bucket(&self) -> bool {
  187         -
        matches!(&self, ListObjectsV2Error::NoSuchBucket(_))
  188         -
    }
  189         -
    /// Returns `true` if the error kind is `ListObjectsV2Error::ValidationException`.
         151  +
impl GetObjectError {
         152  +
    /// Returns `true` if the error kind is `GetObjectError::ValidationException`.
  190    153   
    pub fn is_validation_exception(&self) -> bool {
  191         -
        matches!(&self, ListObjectsV2Error::ValidationException(_))
         154  +
        matches!(&self, GetObjectError::ValidationException(_))
  192    155   
    }
  193    156   
    /// Returns the error name string by matching the correct variant.
  194    157   
    pub fn name(&self) -> &'static str {
  195    158   
        match &self {
  196         -
            ListObjectsV2Error::NoSuchBucket(_inner) => _inner.name(),
  197         -
            ListObjectsV2Error::ValidationException(_inner) => _inner.name(),
         159  +
            GetObjectError::ValidationException(_inner) => _inner.name(),
  198    160   
        }
  199    161   
    }
  200    162   
}
  201         -
impl ::std::error::Error for ListObjectsV2Error {
         163  +
impl ::std::error::Error for GetObjectError {
  202    164   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  203    165   
        match &self {
  204         -
            ListObjectsV2Error::NoSuchBucket(_inner) => Some(_inner),
  205         -
            ListObjectsV2Error::ValidationException(_inner) => Some(_inner),
         166  +
            GetObjectError::ValidationException(_inner) => Some(_inner),
  206    167   
        }
  207    168   
    }
  208    169   
}
  209         -
impl ::std::convert::From<crate::error::NoSuchBucket> for crate::error::ListObjectsV2Error {
  210         -
    fn from(variant: crate::error::NoSuchBucket) -> crate::error::ListObjectsV2Error {
  211         -
        Self::NoSuchBucket(variant)
  212         -
    }
  213         -
}
  214         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::ListObjectsV2Error {
  215         -
    fn from(variant: crate::error::ValidationException) -> crate::error::ListObjectsV2Error {
         170  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::GetObjectError {
         171  +
    fn from(variant: crate::error::ValidationException) -> crate::error::GetObjectError {
  216    172   
        Self::ValidationException(variant)
  217    173   
    }
  218    174   
}
  219    175   
  220    176   
#[allow(missing_docs)] // documentation missing in model
  221    177   
#[derive(
  222    178   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  223    179   
)]
  224    180   
pub struct NoSuchBucket {}
  225    181   
impl NoSuchBucket {
  226    182   
    #[doc(hidden)]
  227    183   
    /// Returns the error name.
  228    184   
    pub fn name(&self) -> &'static str {
  229    185   
        "NoSuchBucket"
  230    186   
    }
  231    187   
}
  232    188   
impl ::std::fmt::Display for NoSuchBucket {
  233    189   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  234    190   
        ::std::write!(f, "NoSuchBucket")?;
  235    191   
        Ok(())
  236    192   
    }
  237    193   
}
  238    194   
impl ::std::error::Error for NoSuchBucket {}
  239    195   
impl NoSuchBucket {
  240    196   
    /// Creates a new builder-style object to manufacture [`NoSuchBucket`](crate::error::NoSuchBucket).
  241    197   
    pub fn builder() -> crate::error::no_such_bucket::Builder {
  242    198   
        crate::error::no_such_bucket::Builder::default()
  243    199   
    }
  244    200   
}
         201  +
         202  +
/// 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.
         203  +
#[derive(
         204  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         205  +
)]
         206  +
pub struct ValidationException {
         207  +
    /// A summary of the validation failure.
         208  +
    pub message: ::std::string::String,
         209  +
    /// 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.
         210  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         211  +
}
         212  +
impl ValidationException {
         213  +
    /// 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.
         214  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         215  +
        self.field_list.as_deref()
         216  +
    }
         217  +
}
         218  +
impl ValidationException {
         219  +
    /// Returns the error message.
         220  +
    pub fn message(&self) -> &str {
         221  +
        &self.message
         222  +
    }
         223  +
    #[doc(hidden)]
         224  +
    /// Returns the error name.
         225  +
    pub fn name(&self) -> &'static str {
         226  +
        "ValidationException"
         227  +
    }
         228  +
}
         229  +
impl ::std::fmt::Display for ValidationException {
         230  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         231  +
        ::std::write!(f, "ValidationException")?;
         232  +
        {
         233  +
            ::std::write!(f, ": {}", &self.message)?;
         234  +
        }
         235  +
        Ok(())
         236  +
    }
         237  +
}
         238  +
impl ::std::error::Error for ValidationException {}
         239  +
impl ValidationException {
         240  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         241  +
    pub fn builder() -> crate::error::validation_exception::Builder {
         242  +
        crate::error::validation_exception::Builder::default()
         243  +
    }
         244  +
}
         245  +
/// See [`NoSuchBucket`](crate::error::NoSuchBucket).
         246  +
pub mod no_such_bucket {
         247  +
         248  +
    impl ::std::convert::From<Builder> for crate::error::NoSuchBucket {
         249  +
        fn from(builder: Builder) -> Self {
         250  +
            builder.build()
         251  +
        }
         252  +
    }
         253  +
    /// A builder for [`NoSuchBucket`](crate::error::NoSuchBucket).
         254  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         255  +
    pub struct Builder {}
         256  +
    impl Builder {
         257  +
        /// Consumes the builder and constructs a [`NoSuchBucket`](crate::error::NoSuchBucket).
         258  +
        pub fn build(self) -> crate::error::NoSuchBucket {
         259  +
            self.build_enforcing_all_constraints()
         260  +
        }
         261  +
        fn build_enforcing_all_constraints(self) -> crate::error::NoSuchBucket {
         262  +
            crate::error::NoSuchBucket {}
         263  +
        }
         264  +
    }
         265  +
}
  245    266   
/// See [`ValidationException`](crate::error::ValidationException).
  246    267   
pub mod validation_exception {
  247    268   
  248    269   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  249    270   
    /// Holds one variant for each of the ways the builder can fail.
  250    271   
    #[non_exhaustive]
  251    272   
    #[allow(clippy::enum_variant_names)]
  252    273   
    pub enum ConstraintViolation {
  253    274   
        /// `message` was not provided but it is required when building `ValidationException`.
  254    275   
        MissingMessage,
@@ -279,300 +329,0 @@
  299    320   
        fn build_enforcing_all_constraints(
  300    321   
            self,
  301    322   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  302    323   
            Ok(crate::error::ValidationException {
  303    324   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  304    325   
                field_list: self.field_list,
  305    326   
            })
  306    327   
        }
  307    328   
    }
  308    329   
}
  309         -
/// See [`NoSuchBucket`](crate::error::NoSuchBucket).
  310         -
pub mod no_such_bucket {
  311         -
  312         -
    impl ::std::convert::From<Builder> for crate::error::NoSuchBucket {
  313         -
        fn from(builder: Builder) -> Self {
  314         -
            builder.build()
  315         -
        }
  316         -
    }
  317         -
    /// A builder for [`NoSuchBucket`](crate::error::NoSuchBucket).
  318         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  319         -
    pub struct Builder {}
  320         -
    impl Builder {
  321         -
        /// Consumes the builder and constructs a [`NoSuchBucket`](crate::error::NoSuchBucket).
  322         -
        pub fn build(self) -> crate::error::NoSuchBucket {
  323         -
            self.build_enforcing_all_constraints()
  324         -
        }
  325         -
        fn build_enforcing_all_constraints(self) -> crate::error::NoSuchBucket {
  326         -
            crate::error::NoSuchBucket {}
  327         -
        }
  328         -
    }
  329         -
}

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

@@ -1,1 +514,485 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[derive(
    4      4   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      5   
)]
    6         -
pub struct GetObjectInput {
           6  +
pub struct ListObjectsV2Input {
    7      7   
    #[allow(missing_docs)] // documentation missing in model
    8      8   
    pub bucket: ::std::string::String,
    9      9   
    #[allow(missing_docs)] // documentation missing in model
   10         -
    pub key: crate::model::ObjectKey,
          10  +
    pub delimiter: ::std::option::Option<::std::string::String>,
          11  +
    #[allow(missing_docs)] // documentation missing in model
          12  +
    pub encoding_type: ::std::option::Option<crate::model::EncodingType>,
          13  +
    #[allow(missing_docs)] // documentation missing in model
          14  +
    pub max_keys: ::std::option::Option<i32>,
          15  +
    #[allow(missing_docs)] // documentation missing in model
          16  +
    pub prefix: ::std::option::Option<::std::string::String>,
          17  +
    #[allow(missing_docs)] // documentation missing in model
          18  +
    pub continuation_token: ::std::option::Option<::std::string::String>,
          19  +
    #[allow(missing_docs)] // documentation missing in model
          20  +
    pub fetch_owner: ::std::option::Option<bool>,
          21  +
    #[allow(missing_docs)] // documentation missing in model
          22  +
    pub start_after: ::std::option::Option<::std::string::String>,
          23  +
    #[allow(missing_docs)] // documentation missing in model
          24  +
    pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
          25  +
    #[allow(missing_docs)] // documentation missing in model
          26  +
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
   11     27   
}
   12         -
impl GetObjectInput {
          28  +
impl ListObjectsV2Input {
   13     29   
    #[allow(missing_docs)] // documentation missing in model
   14     30   
    pub fn bucket(&self) -> &str {
   15     31   
        use std::ops::Deref;
   16     32   
        self.bucket.deref()
   17     33   
    }
   18     34   
    #[allow(missing_docs)] // documentation missing in model
   19         -
    pub fn key(&self) -> &crate::model::ObjectKey {
   20         -
        &self.key
   21         -
    }
   22         -
}
   23         -
impl GetObjectInput {
   24         -
    /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
   25         -
    pub fn builder() -> crate::input::get_object_input::Builder {
   26         -
        crate::input::get_object_input::Builder::default()
          35  +
    pub fn delimiter(&self) -> ::std::option::Option<&str> {
          36  +
        self.delimiter.as_deref()
   27     37   
    }
   28         -
}
   29         -
impl crate::constrained::Constrained for crate::input::GetObjectInput {
   30         -
    type Unconstrained = crate::input::get_object_input::Builder;
   31         -
}
   32         -
   33         -
#[allow(missing_docs)] // documentation missing in model
   34         -
#[derive(
   35         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   36         -
)]
   37         -
pub struct DeleteObjectTaggingInput {
   38     38   
    #[allow(missing_docs)] // documentation missing in model
   39         -
    pub bucket: ::std::string::String,
          39  +
    pub fn encoding_type(&self) -> ::std::option::Option<&crate::model::EncodingType> {
          40  +
        self.encoding_type.as_ref()
          41  +
    }
   40     42   
    #[allow(missing_docs)] // documentation missing in model
   41         -
    pub key: crate::model::ObjectKey,
          43  +
    pub fn max_keys(&self) -> ::std::option::Option<i32> {
          44  +
        self.max_keys
          45  +
    }
   42     46   
    #[allow(missing_docs)] // documentation missing in model
   43         -
    pub version_id: ::std::option::Option<::std::string::String>,
          47  +
    pub fn prefix(&self) -> ::std::option::Option<&str> {
          48  +
        self.prefix.as_deref()
          49  +
    }
   44     50   
    #[allow(missing_docs)] // documentation missing in model
   45         -
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
   46         -
}
   47         -
impl DeleteObjectTaggingInput {
          51  +
    pub fn continuation_token(&self) -> ::std::option::Option<&str> {
          52  +
        self.continuation_token.as_deref()
          53  +
    }
   48     54   
    #[allow(missing_docs)] // documentation missing in model
   49         -
    pub fn bucket(&self) -> &str {
   50         -
        use std::ops::Deref;
   51         -
        self.bucket.deref()
          55  +
    pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
          56  +
        self.fetch_owner
   52     57   
    }
   53     58   
    #[allow(missing_docs)] // documentation missing in model
   54         -
    pub fn key(&self) -> &crate::model::ObjectKey {
   55         -
        &self.key
          59  +
    pub fn start_after(&self) -> ::std::option::Option<&str> {
          60  +
        self.start_after.as_deref()
   56     61   
    }
   57     62   
    #[allow(missing_docs)] // documentation missing in model
   58         -
    pub fn version_id(&self) -> ::std::option::Option<&str> {
   59         -
        self.version_id.as_deref()
          63  +
    pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
          64  +
        self.request_payer.as_ref()
   60     65   
    }
   61     66   
    #[allow(missing_docs)] // documentation missing in model
   62     67   
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
   63     68   
        self.expected_bucket_owner.as_deref()
   64     69   
    }
   65     70   
}
   66         -
impl DeleteObjectTaggingInput {
   67         -
    /// Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
   68         -
    pub fn builder() -> crate::input::delete_object_tagging_input::Builder {
   69         -
        crate::input::delete_object_tagging_input::Builder::default()
          71  +
impl ListObjectsV2Input {
          72  +
    /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
          73  +
    pub fn builder() -> crate::input::list_objects_v2_input::Builder {
          74  +
        crate::input::list_objects_v2_input::Builder::default()
   70     75   
    }
   71     76   
}
   72         -
impl crate::constrained::Constrained for crate::input::DeleteObjectTaggingInput {
   73         -
    type Unconstrained = crate::input::delete_object_tagging_input::Builder;
          77  +
impl crate::constrained::Constrained for crate::input::ListObjectsV2Input {
          78  +
    type Unconstrained = crate::input::list_objects_v2_input::Builder;
   74     79   
}
   75     80   
   76     81   
#[allow(missing_docs)] // documentation missing in model
   77     82   
#[derive(
   78     83   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   79     84   
)]
   80     85   
pub struct GetBucketLocationInput {
   81     86   
    #[allow(missing_docs)] // documentation missing in model
   82     87   
    pub bucket: ::std::string::String,
   83     88   
}
   84     89   
impl GetBucketLocationInput {
   85     90   
    #[allow(missing_docs)] // documentation missing in model
   86     91   
    pub fn bucket(&self) -> &str {
   87     92   
        use std::ops::Deref;
   88     93   
        self.bucket.deref()
   89     94   
    }
   90     95   
}
   91     96   
impl GetBucketLocationInput {
   92     97   
    /// Creates a new builder-style object to manufacture [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
   93     98   
    pub fn builder() -> crate::input::get_bucket_location_input::Builder {
   94     99   
        crate::input::get_bucket_location_input::Builder::default()
   95    100   
    }
   96    101   
}
   97    102   
impl crate::constrained::Constrained for crate::input::GetBucketLocationInput {
   98    103   
    type Unconstrained = crate::input::get_bucket_location_input::Builder;
   99    104   
}
  100    105   
  101    106   
#[allow(missing_docs)] // documentation missing in model
  102    107   
#[derive(
  103    108   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  104    109   
)]
  105         -
pub struct ListObjectsV2Input {
         110  +
pub struct DeleteObjectTaggingInput {
  106    111   
    #[allow(missing_docs)] // documentation missing in model
  107    112   
    pub bucket: ::std::string::String,
  108    113   
    #[allow(missing_docs)] // documentation missing in model
  109         -
    pub delimiter: ::std::option::Option<::std::string::String>,
  110         -
    #[allow(missing_docs)] // documentation missing in model
  111         -
    pub encoding_type: ::std::option::Option<crate::model::EncodingType>,
  112         -
    #[allow(missing_docs)] // documentation missing in model
  113         -
    pub max_keys: ::std::option::Option<i32>,
  114         -
    #[allow(missing_docs)] // documentation missing in model
  115         -
    pub prefix: ::std::option::Option<::std::string::String>,
  116         -
    #[allow(missing_docs)] // documentation missing in model
  117         -
    pub continuation_token: ::std::option::Option<::std::string::String>,
  118         -
    #[allow(missing_docs)] // documentation missing in model
  119         -
    pub fetch_owner: ::std::option::Option<bool>,
  120         -
    #[allow(missing_docs)] // documentation missing in model
  121         -
    pub start_after: ::std::option::Option<::std::string::String>,
         114  +
    pub key: crate::model::ObjectKey,
  122    115   
    #[allow(missing_docs)] // documentation missing in model
  123         -
    pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
         116  +
    pub version_id: ::std::option::Option<::std::string::String>,
  124    117   
    #[allow(missing_docs)] // documentation missing in model
  125    118   
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
  126    119   
}
  127         -
impl ListObjectsV2Input {
         120  +
impl DeleteObjectTaggingInput {
  128    121   
    #[allow(missing_docs)] // documentation missing in model
  129    122   
    pub fn bucket(&self) -> &str {
  130    123   
        use std::ops::Deref;
  131    124   
        self.bucket.deref()
  132    125   
    }
  133    126   
    #[allow(missing_docs)] // documentation missing in model
  134         -
    pub fn delimiter(&self) -> ::std::option::Option<&str> {
  135         -
        self.delimiter.as_deref()
  136         -
    }
  137         -
    #[allow(missing_docs)] // documentation missing in model
  138         -
    pub fn encoding_type(&self) -> ::std::option::Option<&crate::model::EncodingType> {
  139         -
        self.encoding_type.as_ref()
         127  +
    pub fn key(&self) -> &crate::model::ObjectKey {
         128  +
        &self.key
  140    129   
    }
  141    130   
    #[allow(missing_docs)] // documentation missing in model
  142         -
    pub fn max_keys(&self) -> ::std::option::Option<i32> {
  143         -
        self.max_keys
         131  +
    pub fn version_id(&self) -> ::std::option::Option<&str> {
         132  +
        self.version_id.as_deref()
  144    133   
    }
  145    134   
    #[allow(missing_docs)] // documentation missing in model
  146         -
    pub fn prefix(&self) -> ::std::option::Option<&str> {
  147         -
        self.prefix.as_deref()
         135  +
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
         136  +
        self.expected_bucket_owner.as_deref()
  148    137   
    }
  149         -
    #[allow(missing_docs)] // documentation missing in model
  150         -
    pub fn continuation_token(&self) -> ::std::option::Option<&str> {
  151         -
        self.continuation_token.as_deref()
         138  +
}
         139  +
impl DeleteObjectTaggingInput {
         140  +
    /// Creates a new builder-style object to manufacture [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         141  +
    pub fn builder() -> crate::input::delete_object_tagging_input::Builder {
         142  +
        crate::input::delete_object_tagging_input::Builder::default()
  152    143   
    }
         144  +
}
         145  +
impl crate::constrained::Constrained for crate::input::DeleteObjectTaggingInput {
         146  +
    type Unconstrained = crate::input::delete_object_tagging_input::Builder;
         147  +
}
         148  +
         149  +
#[allow(missing_docs)] // documentation missing in model
         150  +
#[derive(
         151  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         152  +
)]
         153  +
pub struct GetObjectInput {
  153    154   
    #[allow(missing_docs)] // documentation missing in model
  154         -
    pub fn fetch_owner(&self) -> ::std::option::Option<bool> {
  155         -
        self.fetch_owner
  156         -
    }
         155  +
    pub bucket: ::std::string::String,
  157    156   
    #[allow(missing_docs)] // documentation missing in model
  158         -
    pub fn start_after(&self) -> ::std::option::Option<&str> {
  159         -
        self.start_after.as_deref()
  160         -
    }
         157  +
    pub key: crate::model::ObjectKey,
         158  +
}
         159  +
impl GetObjectInput {
  161    160   
    #[allow(missing_docs)] // documentation missing in model
  162         -
    pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
  163         -
        self.request_payer.as_ref()
         161  +
    pub fn bucket(&self) -> &str {
         162  +
        use std::ops::Deref;
         163  +
        self.bucket.deref()
  164    164   
    }
  165    165   
    #[allow(missing_docs)] // documentation missing in model
  166         -
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
  167         -
        self.expected_bucket_owner.as_deref()
         166  +
    pub fn key(&self) -> &crate::model::ObjectKey {
         167  +
        &self.key
  168    168   
    }
  169    169   
}
  170         -
impl ListObjectsV2Input {
  171         -
    /// Creates a new builder-style object to manufacture [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  172         -
    pub fn builder() -> crate::input::list_objects_v2_input::Builder {
  173         -
        crate::input::list_objects_v2_input::Builder::default()
         170  +
impl GetObjectInput {
         171  +
    /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::input::GetObjectInput).
         172  +
    pub fn builder() -> crate::input::get_object_input::Builder {
         173  +
        crate::input::get_object_input::Builder::default()
  174    174   
    }
  175    175   
}
  176         -
impl crate::constrained::Constrained for crate::input::ListObjectsV2Input {
  177         -
    type Unconstrained = crate::input::list_objects_v2_input::Builder;
         176  +
impl crate::constrained::Constrained for crate::input::GetObjectInput {
         177  +
    type Unconstrained = crate::input::get_object_input::Builder;
  178    178   
}
  179         -
/// See [`GetObjectInput`](crate::input::GetObjectInput).
  180         -
pub mod get_object_input {
         179  +
/// See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         180  +
pub mod list_objects_v2_input {
  181    181   
  182    182   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  183    183   
    /// Holds one variant for each of the ways the builder can fail.
  184    184   
    #[non_exhaustive]
  185    185   
    #[allow(clippy::enum_variant_names)]
  186    186   
    pub enum ConstraintViolation {
  187         -
        /// `bucket` was not provided but it is required when building `GetObjectInput`.
         187  +
        /// `bucket` was not provided but it is required when building `ListObjectsV2Input`.
  188    188   
        MissingBucket,
  189         -
        /// `key` was not provided but it is required when building `GetObjectInput`.
  190         -
        MissingKey,
  191         -
        /// Constraint violation occurred building member `key` when building `GetObjectInput`.
         189  +
        /// Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
  192    190   
        #[doc(hidden)]
  193         -
        Key(crate::model::object_key::ConstraintViolation),
         191  +
        EncodingType(crate::model::encoding_type::ConstraintViolation),
         192  +
        /// Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
         193  +
        #[doc(hidden)]
         194  +
        RequestPayer(crate::model::request_payer::ConstraintViolation),
  194    195   
    }
  195    196   
    impl ::std::fmt::Display for ConstraintViolation {
  196    197   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  197    198   
            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`"),
         199  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `ListObjectsV2Input`"),
         200  +
                ConstraintViolation::EncodingType(_) => write!(f, "constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`"),
         201  +
                ConstraintViolation::RequestPayer(_) => write!(f, "constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`"),
  201    202   
            }
  202    203   
        }
  203    204   
    }
  204    205   
    impl ::std::error::Error for ConstraintViolation {}
  205    206   
    impl ConstraintViolation {
  206    207   
        pub(crate) fn as_validation_exception_field(
  207    208   
            self,
  208    209   
            path: ::std::string::String,
  209    210   
        ) -> crate::model::ValidationExceptionField {
  210    211   
            match self {
  211    212   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  212    213   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  213    214   
                                                path: path + "/Bucket",
  214    215   
                                            },
  215         -
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  216         -
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  217         -
                                                path: path + "/Key",
  218         -
                                            },
  219         -
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         216  +
            ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
         217  +
            ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
  220    218   
        }
  221    219   
        }
  222    220   
    }
  223    221   
    impl ::std::convert::From<ConstraintViolation>
  224    222   
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
  225    223   
    {
  226    224   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  227    225   
            let first_validation_exception_field =
  228    226   
                constraint_violation.as_validation_exception_field("".to_owned());
  229    227   
            let validation_exception = crate::error::ValidationException {
  230    228   
                message: format!(
  231    229   
                    "1 validation error detected. {}",
  232    230   
                    &first_validation_exception_field.message
  233    231   
                ),
  234    232   
                field_list: Some(vec![first_validation_exception_field]),
  235    233   
            };
  236    234   
            Self::ConstraintViolation(
  237    235   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  238    236   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  239    237   
                            )
  240    238   
        }
  241    239   
    }
  242    240   
    impl ::std::convert::From<Builder>
  243         -
        for crate::constrained::MaybeConstrained<crate::input::GetObjectInput>
         241  +
        for crate::constrained::MaybeConstrained<crate::input::ListObjectsV2Input>
  244    242   
    {
  245    243   
        fn from(builder: Builder) -> Self {
  246    244   
            Self::Unconstrained(builder)
  247    245   
        }
  248    246   
    }
  249         -
    impl ::std::convert::TryFrom<Builder> for crate::input::GetObjectInput {
         247  +
    impl ::std::convert::TryFrom<Builder> for crate::input::ListObjectsV2Input {
  250    248   
        type Error = ConstraintViolation;
  251    249   
  252    250   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  253    251   
            builder.build()
  254    252   
        }
  255    253   
    }
  256         -
    /// A builder for [`GetObjectInput`](crate::input::GetObjectInput).
         254  +
    /// A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  257    255   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  258    256   
    pub struct Builder {
  259    257   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
  260         -
        pub(crate) key:
  261         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         258  +
        pub(crate) delimiter: ::std::option::Option<::std::string::String>,
         259  +
        pub(crate) encoding_type:
         260  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EncodingType>>,
         261  +
        pub(crate) max_keys: ::std::option::Option<i32>,
         262  +
        pub(crate) prefix: ::std::option::Option<::std::string::String>,
         263  +
        pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
         264  +
        pub(crate) fetch_owner: ::std::option::Option<bool>,
         265  +
        pub(crate) start_after: ::std::option::Option<::std::string::String>,
         266  +
        pub(crate) request_payer:
         267  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RequestPayer>>,
         268  +
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
  262    269   
    }
  263    270   
    impl Builder {
  264    271   
        #[allow(missing_docs)] // documentation missing in model
  265    272   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  266    273   
            self.bucket = Some(input);
  267    274   
            self
  268    275   
        }
  269    276   
        #[allow(missing_docs)] // documentation missing in model
  270    277   
        pub(crate) fn set_bucket(
  271    278   
            mut self,
  272    279   
            input: impl ::std::convert::Into<::std::string::String>,
  273    280   
        ) -> Self {
  274    281   
            self.bucket = Some(input.into());
  275    282   
            self
  276    283   
        }
  277    284   
        #[allow(missing_docs)] // documentation missing in model
  278         -
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
  279         -
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         285  +
        pub fn delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         286  +
            self.delimiter = input;
  280    287   
            self
  281    288   
        }
  282    289   
        #[allow(missing_docs)] // documentation missing in model
  283         -
        pub(crate) fn set_key(
         290  +
        pub(crate) fn set_delimiter(
  284    291   
            mut self,
  285         -
            input: impl ::std::convert::Into<
  286         -
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
  287         -
            >,
         292  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  288    293   
        ) -> Self {
  289         -
            self.key = Some(input.into());
         294  +
            self.delimiter = input.map(|v| v.into());
  290    295   
            self
  291    296   
        }
  292         -
        /// Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
  293         -
        ///
  294         -
        /// The builder fails to construct a [`GetObjectInput`](crate::input::GetObjectInput) if a [`ConstraintViolation`] occurs.
  295         -
        ///
  296         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  297         -
        pub fn build(self) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
  298         -
            self.build_enforcing_all_constraints()
         297  +
        #[allow(missing_docs)] // documentation missing in model
         298  +
        pub fn encoding_type(
         299  +
            mut self,
         300  +
            input: ::std::option::Option<crate::model::EncodingType>,
         301  +
        ) -> Self {
         302  +
            self.encoding_type = input.map(crate::constrained::MaybeConstrained::Constrained);
         303  +
            self
  299    304   
        }
  300         -
        fn build_enforcing_all_constraints(
  301         -
            self,
  302         -
        ) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
  303         -
            Ok(crate::input::GetObjectInput {
  304         -
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
  305         -
                key: self
  306         -
                    .key
  307         -
                    .map(|v| match v {
  308         -
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  309         -
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  310         -
                    })
  311         -
                    .map(|res| res.map_err(ConstraintViolation::Key))
  312         -
                    .transpose()?
  313         -
                    .ok_or(ConstraintViolation::MissingKey)?,
  314         -
            })
         305  +
        #[allow(missing_docs)] // documentation missing in model
         306  +
        pub(crate) fn set_encoding_type(
         307  +
            mut self,
         308  +
            input: Option<
         309  +
                impl ::std::convert::Into<
         310  +
                    crate::constrained::MaybeConstrained<crate::model::EncodingType>,
         311  +
                >,
         312  +
            >,
         313  +
        ) -> Self {
         314  +
            self.encoding_type = input.map(|v| v.into());
         315  +
            self
  315    316   
        }
  316         -
    }
  317         -
}
  318         -
/// See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
  319         -
pub mod delete_object_tagging_input {
  320         -
  321         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  322         -
    /// Holds one variant for each of the ways the builder can fail.
  323         -
    #[non_exhaustive]
  324         -
    #[allow(clippy::enum_variant_names)]
  325         -
    pub enum ConstraintViolation {
  326         -
        /// `bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
  327         -
        MissingBucket,
  328         -
        /// `key` was not provided but it is required when building `DeleteObjectTaggingInput`.
  329         -
        MissingKey,
  330         -
        /// Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
  331         -
        #[doc(hidden)]
  332         -
        Key(crate::model::object_key::ConstraintViolation),
  333         -
    }
  334         -
    impl ::std::fmt::Display for ConstraintViolation {
  335         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  336         -
            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         -
            }
         317  +
        #[allow(missing_docs)] // documentation missing in model
         318  +
        pub fn max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
         319  +
            self.max_keys = input;
         320  +
            self
  341    321   
        }
  342         -
    }
  343         -
    impl ::std::error::Error for ConstraintViolation {}
  344         -
    impl ConstraintViolation {
  345         -
        pub(crate) fn as_validation_exception_field(
  346         -
            self,
  347         -
            path: ::std::string::String,
  348         -
        ) -> crate::model::ValidationExceptionField {
  349         -
            match self {
  350         -
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  351         -
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  352         -
                                                path: path + "/Bucket",
  353         -
                                            },
  354         -
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
  355         -
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
  356         -
                                                path: path + "/Key",
  357         -
                                            },
  358         -
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         322  +
        #[allow(missing_docs)] // documentation missing in model
         323  +
        pub(crate) fn set_max_keys(
         324  +
            mut self,
         325  +
            input: Option<impl ::std::convert::Into<i32>>,
         326  +
        ) -> Self {
         327  +
            self.max_keys = input.map(|v| v.into());
         328  +
            self
  359    329   
        }
         330  +
        #[allow(missing_docs)] // documentation missing in model
         331  +
        pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         332  +
            self.prefix = input;
         333  +
            self
  360    334   
        }
  361         -
    }
  362         -
    impl ::std::convert::From<ConstraintViolation>
  363         -
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
  364         -
    {
  365         -
        fn from(constraint_violation: ConstraintViolation) -> Self {
  366         -
            let first_validation_exception_field =
  367         -
                constraint_violation.as_validation_exception_field("".to_owned());
  368         -
            let validation_exception = crate::error::ValidationException {
  369         -
                message: format!(
  370         -
                    "1 validation error detected. {}",
  371         -
                    &first_validation_exception_field.message
  372         -
                ),
  373         -
                field_list: Some(vec![first_validation_exception_field]),
  374         -
            };
  375         -
            Self::ConstraintViolation(
  376         -
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  377         -
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  378         -
                            )
         335  +
        #[allow(missing_docs)] // documentation missing in model
         336  +
        pub(crate) fn set_prefix(
         337  +
            mut self,
         338  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         339  +
        ) -> Self {
         340  +
            self.prefix = input.map(|v| v.into());
         341  +
            self
  379    342   
        }
  380         -
    }
  381         -
    impl ::std::convert::From<Builder>
  382         -
        for crate::constrained::MaybeConstrained<crate::input::DeleteObjectTaggingInput>
  383         -
    {
  384         -
        fn from(builder: Builder) -> Self {
  385         -
            Self::Unconstrained(builder)
         343  +
        #[allow(missing_docs)] // documentation missing in model
         344  +
        pub fn continuation_token(
         345  +
            mut self,
         346  +
            input: ::std::option::Option<::std::string::String>,
         347  +
        ) -> Self {
         348  +
            self.continuation_token = input;
         349  +
            self
  386    350   
        }
  387         -
    }
  388         -
    impl ::std::convert::TryFrom<Builder> for crate::input::DeleteObjectTaggingInput {
  389         -
        type Error = ConstraintViolation;
  390         -
  391         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  392         -
            builder.build()
         351  +
        #[allow(missing_docs)] // documentation missing in model
         352  +
        pub(crate) fn set_continuation_token(
         353  +
            mut self,
         354  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         355  +
        ) -> Self {
         356  +
            self.continuation_token = input.map(|v| v.into());
         357  +
            self
  393    358   
        }
  394         -
    }
  395         -
    /// A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
  396         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  397         -
    pub struct Builder {
  398         -
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
  399         -
        pub(crate) key:
  400         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
  401         -
        pub(crate) version_id: ::std::option::Option<::std::string::String>,
  402         -
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
  403         -
    }
  404         -
    impl Builder {
  405    359   
        #[allow(missing_docs)] // documentation missing in model
  406         -
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  407         -
            self.bucket = Some(input);
         360  +
        pub fn fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
         361  +
            self.fetch_owner = input;
  408    362   
            self
  409    363   
        }
  410    364   
        #[allow(missing_docs)] // documentation missing in model
  411         -
        pub(crate) fn set_bucket(
         365  +
        pub(crate) fn set_fetch_owner(
  412    366   
            mut self,
  413         -
            input: impl ::std::convert::Into<::std::string::String>,
         367  +
            input: Option<impl ::std::convert::Into<bool>>,
  414    368   
        ) -> Self {
  415         -
            self.bucket = Some(input.into());
         369  +
            self.fetch_owner = input.map(|v| v.into());
  416    370   
            self
  417    371   
        }
  418    372   
        #[allow(missing_docs)] // documentation missing in model
  419         -
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
  420         -
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
         373  +
        pub fn start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         374  +
            self.start_after = input;
  421    375   
            self
  422    376   
        }
  423    377   
        #[allow(missing_docs)] // documentation missing in model
  424         -
        pub(crate) fn set_key(
         378  +
        pub(crate) fn set_start_after(
  425    379   
            mut self,
  426         -
            input: impl ::std::convert::Into<
  427         -
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
  428         -
            >,
         380  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  429    381   
        ) -> Self {
  430         -
            self.key = Some(input.into());
         382  +
            self.start_after = input.map(|v| v.into());
  431    383   
            self
  432    384   
        }
  433    385   
        #[allow(missing_docs)] // documentation missing in model
  434         -
        pub fn version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  435         -
            self.version_id = input;
         386  +
        pub fn request_payer(
         387  +
            mut self,
         388  +
            input: ::std::option::Option<crate::model::RequestPayer>,
         389  +
        ) -> Self {
         390  +
            self.request_payer = input.map(crate::constrained::MaybeConstrained::Constrained);
  436    391   
            self
  437    392   
        }
  438    393   
        #[allow(missing_docs)] // documentation missing in model
  439         -
        pub(crate) fn set_version_id(
         394  +
        pub(crate) fn set_request_payer(
  440    395   
            mut self,
  441         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         396  +
            input: Option<
         397  +
                impl ::std::convert::Into<
         398  +
                    crate::constrained::MaybeConstrained<crate::model::RequestPayer>,
         399  +
                >,
         400  +
            >,
  442    401   
        ) -> Self {
  443         -
            self.version_id = input.map(|v| v.into());
         402  +
            self.request_payer = input.map(|v| v.into());
  444    403   
            self
  445    404   
        }
  446    405   
        #[allow(missing_docs)] // documentation missing in model
  447    406   
        pub fn expected_bucket_owner(
  448    407   
            mut self,
  449    408   
            input: ::std::option::Option<::std::string::String>,
  450    409   
        ) -> Self {
  451    410   
            self.expected_bucket_owner = input;
  452    411   
            self
  453    412   
        }
  454    413   
        #[allow(missing_docs)] // documentation missing in model
  455    414   
        pub(crate) fn set_expected_bucket_owner(
  456    415   
            mut self,
  457    416   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  458    417   
        ) -> Self {
  459    418   
            self.expected_bucket_owner = input.map(|v| v.into());
  460    419   
            self
  461    420   
        }
  462         -
        /// Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         421  +
        /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  463    422   
        ///
  464         -
        /// The builder fails to construct a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput) if a [`ConstraintViolation`] occurs.
         423  +
        /// The builder fails to construct a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input) if a [`ConstraintViolation`] occurs.
  465    424   
        ///
  466    425   
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  467         -
        pub fn build(self) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
         426  +
        pub fn build(self) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
  468    427   
            self.build_enforcing_all_constraints()
  469    428   
        }
  470    429   
        fn build_enforcing_all_constraints(
  471    430   
            self,
  472         -
        ) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
  473         -
            Ok(crate::input::DeleteObjectTaggingInput {
         431  +
        ) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
         432  +
            Ok(crate::input::ListObjectsV2Input {
  474    433   
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
  475         -
                key: self
  476         -
                    .key
         434  +
                delimiter: self.delimiter,
         435  +
                encoding_type: self
         436  +
                    .encoding_type
  477    437   
                    .map(|v| match v {
  478    438   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  479    439   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  480    440   
                    })
  481         -
                    .map(|res| res.map_err(ConstraintViolation::Key))
  482         -
                    .transpose()?
  483         -
                    .ok_or(ConstraintViolation::MissingKey)?,
  484         -
                version_id: self.version_id,
         441  +
                    .map(|res| res.map_err(ConstraintViolation::EncodingType))
         442  +
                    .transpose()?,
         443  +
                max_keys: self.max_keys,
         444  +
                prefix: self.prefix,
         445  +
                continuation_token: self.continuation_token,
         446  +
                fetch_owner: self.fetch_owner,
         447  +
                start_after: self.start_after,
         448  +
                request_payer: self
         449  +
                    .request_payer
         450  +
                    .map(|v| match v {
         451  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         452  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         453  +
                    })
         454  +
                    .map(|res| res.map_err(ConstraintViolation::RequestPayer))
         455  +
                    .transpose()?,
  485    456   
                expected_bucket_owner: self.expected_bucket_owner,
  486    457   
            })
  487    458   
        }
  488    459   
    }
  489    460   
}
  490    461   
/// See [`GetBucketLocationInput`](crate::input::GetBucketLocationInput).
  491    462   
pub mod get_bucket_location_input {
  492    463   
  493    464   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  494    465   
    /// Holds one variant for each of the ways the builder can fail.
@@ -560,531 +871,871 @@
  580    551   
        }
  581    552   
        fn build_enforcing_all_constraints(
  582    553   
            self,
  583    554   
        ) -> Result<crate::input::GetBucketLocationInput, ConstraintViolation> {
  584    555   
            Ok(crate::input::GetBucketLocationInput {
  585    556   
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
  586    557   
            })
  587    558   
        }
  588    559   
    }
  589    560   
}
  590         -
/// See [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
  591         -
pub mod list_objects_v2_input {
         561  +
/// See [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         562  +
pub mod delete_object_tagging_input {
  592    563   
  593    564   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  594    565   
    /// Holds one variant for each of the ways the builder can fail.
  595    566   
    #[non_exhaustive]
  596    567   
    #[allow(clippy::enum_variant_names)]
  597    568   
    pub enum ConstraintViolation {
  598         -
        /// `bucket` was not provided but it is required when building `ListObjectsV2Input`.
         569  +
        /// `bucket` was not provided but it is required when building `DeleteObjectTaggingInput`.
  599    570   
        MissingBucket,
  600         -
        /// Constraint violation occurred building member `encoding_type` when building `ListObjectsV2Input`.
  601         -
        #[doc(hidden)]
  602         -
        EncodingType(crate::model::encoding_type::ConstraintViolation),
  603         -
        /// Constraint violation occurred building member `request_payer` when building `ListObjectsV2Input`.
         571  +
        /// `key` was not provided but it is required when building `DeleteObjectTaggingInput`.
         572  +
        MissingKey,
         573  +
        /// Constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`.
  604    574   
        #[doc(hidden)]
  605         -
        RequestPayer(crate::model::request_payer::ConstraintViolation),
         575  +
        Key(crate::model::object_key::ConstraintViolation),
  606    576   
    }
  607    577   
    impl ::std::fmt::Display for ConstraintViolation {
  608    578   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  609    579   
            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`"),
         580  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         581  +
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `DeleteObjectTaggingInput`"),
         582  +
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `DeleteObjectTaggingInput`"),
  613    583   
            }
  614    584   
        }
  615    585   
    }
  616    586   
    impl ::std::error::Error for ConstraintViolation {}
  617    587   
    impl ConstraintViolation {
  618    588   
        pub(crate) fn as_validation_exception_field(
  619    589   
            self,
  620    590   
            path: ::std::string::String,
  621    591   
        ) -> crate::model::ValidationExceptionField {
  622    592   
            match self {
  623    593   
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
  624    594   
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
  625    595   
                                                path: path + "/Bucket",
  626    596   
                                            },
  627         -
            ConstraintViolation::EncodingType(inner) => inner.as_validation_exception_field(path + "/EncodingType"),
  628         -
            ConstraintViolation::RequestPayer(inner) => inner.as_validation_exception_field(path + "/RequestPayer"),
         597  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         598  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         599  +
                                                path: path + "/Key",
         600  +
                                            },
         601  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
  629    602   
        }
  630    603   
        }
  631    604   
    }
  632    605   
    impl ::std::convert::From<ConstraintViolation>
  633    606   
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
  634    607   
    {
  635    608   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  636    609   
            let first_validation_exception_field =
  637    610   
                constraint_violation.as_validation_exception_field("".to_owned());
  638    611   
            let validation_exception = crate::error::ValidationException {
  639    612   
                message: format!(
  640    613   
                    "1 validation error detected. {}",
  641    614   
                    &first_validation_exception_field.message
  642    615   
                ),
  643    616   
                field_list: Some(vec![first_validation_exception_field]),
  644    617   
            };
  645    618   
            Self::ConstraintViolation(
  646    619   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  647    620   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  648    621   
                            )
  649    622   
        }
  650    623   
    }
  651    624   
    impl ::std::convert::From<Builder>
  652         -
        for crate::constrained::MaybeConstrained<crate::input::ListObjectsV2Input>
         625  +
        for crate::constrained::MaybeConstrained<crate::input::DeleteObjectTaggingInput>
  653    626   
    {
  654    627   
        fn from(builder: Builder) -> Self {
  655    628   
            Self::Unconstrained(builder)
  656    629   
        }
  657    630   
    }
  658         -
    impl ::std::convert::TryFrom<Builder> for crate::input::ListObjectsV2Input {
         631  +
    impl ::std::convert::TryFrom<Builder> for crate::input::DeleteObjectTaggingInput {
  659    632   
        type Error = ConstraintViolation;
  660    633   
  661    634   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  662    635   
            builder.build()
  663    636   
        }
  664    637   
    }
  665         -
    /// A builder for [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         638  +
    /// A builder for [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
  666    639   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  667    640   
    pub struct Builder {
  668    641   
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
  669         -
        pub(crate) delimiter: ::std::option::Option<::std::string::String>,
  670         -
        pub(crate) encoding_type:
  671         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EncodingType>>,
  672         -
        pub(crate) max_keys: ::std::option::Option<i32>,
  673         -
        pub(crate) prefix: ::std::option::Option<::std::string::String>,
  674         -
        pub(crate) continuation_token: ::std::option::Option<::std::string::String>,
  675         -
        pub(crate) fetch_owner: ::std::option::Option<bool>,
  676         -
        pub(crate) start_after: ::std::option::Option<::std::string::String>,
  677         -
        pub(crate) request_payer:
  678         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RequestPayer>>,
         642  +
        pub(crate) key:
         643  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         644  +
        pub(crate) version_id: ::std::option::Option<::std::string::String>,
  679    645   
        pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
  680    646   
    }
  681    647   
    impl Builder {
  682    648   
        #[allow(missing_docs)] // documentation missing in model
  683    649   
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
  684    650   
            self.bucket = Some(input);
  685    651   
            self
  686    652   
        }
  687    653   
        #[allow(missing_docs)] // documentation missing in model
  688    654   
        pub(crate) fn set_bucket(
  689    655   
            mut self,
  690    656   
            input: impl ::std::convert::Into<::std::string::String>,
  691    657   
        ) -> Self {
  692    658   
            self.bucket = Some(input.into());
  693    659   
            self
  694    660   
        }
  695    661   
        #[allow(missing_docs)] // documentation missing in model
  696         -
        pub fn delimiter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  697         -
            self.delimiter = input;
  698         -
            self
  699         -
        }
  700         -
        #[allow(missing_docs)] // documentation missing in model
  701         -
        pub(crate) fn set_delimiter(
  702         -
            mut self,
  703         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  704         -
        ) -> Self {
  705         -
            self.delimiter = input.map(|v| v.into());
  706         -
            self
  707         -
        }
  708         -
        #[allow(missing_docs)] // documentation missing in model
  709         -
        pub fn encoding_type(
  710         -
            mut self,
  711         -
            input: ::std::option::Option<crate::model::EncodingType>,
  712         -
        ) -> Self {
  713         -
            self.encoding_type = input.map(crate::constrained::MaybeConstrained::Constrained);
         662  +
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
         663  +
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
  714    664   
            self
  715    665   
        }
  716    666   
        #[allow(missing_docs)] // documentation missing in model
  717         -
        pub(crate) fn set_encoding_type(
         667  +
        pub(crate) fn set_key(
  718    668   
            mut self,
  719         -
            input: Option<
  720         -
                impl ::std::convert::Into<
  721         -
                    crate::constrained::MaybeConstrained<crate::model::EncodingType>,
  722         -
                >,
         669  +
            input: impl ::std::convert::Into<
         670  +
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
  723    671   
            >,
  724    672   
        ) -> Self {
  725         -
            self.encoding_type = input.map(|v| v.into());
  726         -
            self
  727         -
        }
  728         -
        #[allow(missing_docs)] // documentation missing in model
  729         -
        pub fn max_keys(mut self, input: ::std::option::Option<i32>) -> Self {
  730         -
            self.max_keys = input;
  731         -
            self
  732         -
        }
  733         -
        #[allow(missing_docs)] // documentation missing in model
  734         -
        pub(crate) fn set_max_keys(
  735         -
            mut self,
  736         -
            input: Option<impl ::std::convert::Into<i32>>,
  737         -
        ) -> Self {
  738         -
            self.max_keys = input.map(|v| v.into());
         673  +
            self.key = Some(input.into());
  739    674   
            self
  740    675   
        }
  741    676   
        #[allow(missing_docs)] // documentation missing in model
  742         -
        pub fn prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  743         -
            self.prefix = input;
         677  +
        pub fn version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         678  +
            self.version_id = input;
  744    679   
            self
  745    680   
        }
  746    681   
        #[allow(missing_docs)] // documentation missing in model
  747         -
        pub(crate) fn set_prefix(
         682  +
        pub(crate) fn set_version_id(
  748    683   
            mut self,
  749    684   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  750    685   
        ) -> Self {
  751         -
            self.prefix = input.map(|v| v.into());
         686  +
            self.version_id = input.map(|v| v.into());
  752    687   
            self
  753    688   
        }
  754    689   
        #[allow(missing_docs)] // documentation missing in model
  755         -
        pub fn continuation_token(
         690  +
        pub fn expected_bucket_owner(
  756    691   
            mut self,
  757    692   
            input: ::std::option::Option<::std::string::String>,
  758    693   
        ) -> Self {
  759         -
            self.continuation_token = input;
         694  +
            self.expected_bucket_owner = input;
  760    695   
            self
  761    696   
        }
  762    697   
        #[allow(missing_docs)] // documentation missing in model
  763         -
        pub(crate) fn set_continuation_token(
         698  +
        pub(crate) fn set_expected_bucket_owner(
  764    699   
            mut self,
  765    700   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  766    701   
        ) -> Self {
  767         -
            self.continuation_token = input.map(|v| v.into());
         702  +
            self.expected_bucket_owner = input.map(|v| v.into());
  768    703   
            self
  769    704   
        }
  770         -
        #[allow(missing_docs)] // documentation missing in model
  771         -
        pub fn fetch_owner(mut self, input: ::std::option::Option<bool>) -> Self {
  772         -
            self.fetch_owner = input;
  773         -
            self
         705  +
        /// Consumes the builder and constructs a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput).
         706  +
        ///
         707  +
        /// The builder fails to construct a [`DeleteObjectTaggingInput`](crate::input::DeleteObjectTaggingInput) if a [`ConstraintViolation`] occurs.
         708  +
        ///
         709  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         710  +
        pub fn build(self) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
         711  +
            self.build_enforcing_all_constraints()
  774    712   
        }
  775         -
        #[allow(missing_docs)] // documentation missing in model
  776         -
        pub(crate) fn set_fetch_owner(
  777         -
            mut self,
  778         -
            input: Option<impl ::std::convert::Into<bool>>,
  779         -
        ) -> Self {
  780         -
            self.fetch_owner = input.map(|v| v.into());
  781         -
            self
         713  +
        fn build_enforcing_all_constraints(
         714  +
            self,
         715  +
        ) -> Result<crate::input::DeleteObjectTaggingInput, ConstraintViolation> {
         716  +
            Ok(crate::input::DeleteObjectTaggingInput {
         717  +
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
         718  +
                key: self
         719  +
                    .key
         720  +
                    .map(|v| match v {
         721  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         722  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         723  +
                    })
         724  +
                    .map(|res| res.map_err(ConstraintViolation::Key))
         725  +
                    .transpose()?
         726  +
                    .ok_or(ConstraintViolation::MissingKey)?,
         727  +
                version_id: self.version_id,
         728  +
                expected_bucket_owner: self.expected_bucket_owner,
         729  +
            })
  782    730   
        }
  783         -
        #[allow(missing_docs)] // documentation missing in model
  784         -
        pub fn start_after(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  785         -
            self.start_after = input;
  786         -
            self
         731  +
    }
         732  +
}
         733  +
/// See [`GetObjectInput`](crate::input::GetObjectInput).
         734  +
pub mod get_object_input {
         735  +
         736  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         737  +
    /// Holds one variant for each of the ways the builder can fail.
         738  +
    #[non_exhaustive]
         739  +
    #[allow(clippy::enum_variant_names)]
         740  +
    pub enum ConstraintViolation {
         741  +
        /// `bucket` was not provided but it is required when building `GetObjectInput`.
         742  +
        MissingBucket,
         743  +
        /// `key` was not provided but it is required when building `GetObjectInput`.
         744  +
        MissingKey,
         745  +
        /// Constraint violation occurred building member `key` when building `GetObjectInput`.
         746  +
        #[doc(hidden)]
         747  +
        Key(crate::model::object_key::ConstraintViolation),
         748  +
    }
         749  +
    impl ::std::fmt::Display for ConstraintViolation {
         750  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         751  +
            match self {
         752  +
                ConstraintViolation::MissingBucket => write!(f, "`bucket` was not provided but it is required when building `GetObjectInput`"),
         753  +
                ConstraintViolation::MissingKey => write!(f, "`key` was not provided but it is required when building `GetObjectInput`"),
         754  +
                ConstraintViolation::Key(_) => write!(f, "constraint violation occurred building member `key` when building `GetObjectInput`"),
         755  +
            }
  787    756   
        }
  788         -
        #[allow(missing_docs)] // documentation missing in model
  789         -
        pub(crate) fn set_start_after(
  790         -
            mut self,
  791         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  792         -
        ) -> Self {
  793         -
            self.start_after = input.map(|v| v.into());
  794         -
            self
         757  +
    }
         758  +
    impl ::std::error::Error for ConstraintViolation {}
         759  +
    impl ConstraintViolation {
         760  +
        pub(crate) fn as_validation_exception_field(
         761  +
            self,
         762  +
            path: ::std::string::String,
         763  +
        ) -> crate::model::ValidationExceptionField {
         764  +
            match self {
         765  +
            ConstraintViolation::MissingBucket => crate::model::ValidationExceptionField {
         766  +
                                                message: format!("Value at '{}/Bucket' failed to satisfy constraint: Member must not be null", path),
         767  +
                                                path: path + "/Bucket",
         768  +
                                            },
         769  +
            ConstraintViolation::MissingKey => crate::model::ValidationExceptionField {
         770  +
                                                message: format!("Value at '{}/Key' failed to satisfy constraint: Member must not be null", path),
         771  +
                                                path: path + "/Key",
         772  +
                                            },
         773  +
            ConstraintViolation::Key(inner) => inner.as_validation_exception_field(path + "/Key"),
         774  +
        }
         775  +
        }
         776  +
    }
         777  +
    impl ::std::convert::From<ConstraintViolation>
         778  +
        for ::aws_smithy_legacy_http_server::protocol::rest_xml::rejection::RequestRejection
         779  +
    {
         780  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
         781  +
            let first_validation_exception_field =
         782  +
                constraint_violation.as_validation_exception_field("".to_owned());
         783  +
            let validation_exception = crate::error::ValidationException {
         784  +
                message: format!(
         785  +
                    "1 validation error detected. {}",
         786  +
                    &first_validation_exception_field.message
         787  +
                ),
         788  +
                field_list: Some(vec![first_validation_exception_field]),
         789  +
            };
         790  +
            Self::ConstraintViolation(
         791  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
         792  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
         793  +
                            )
         794  +
        }
         795  +
    }
         796  +
    impl ::std::convert::From<Builder>
         797  +
        for crate::constrained::MaybeConstrained<crate::input::GetObjectInput>
         798  +
    {
         799  +
        fn from(builder: Builder) -> Self {
         800  +
            Self::Unconstrained(builder)
         801  +
        }
         802  +
    }
         803  +
    impl ::std::convert::TryFrom<Builder> for crate::input::GetObjectInput {
         804  +
        type Error = ConstraintViolation;
         805  +
         806  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         807  +
            builder.build()
  795    808   
        }
         809  +
    }
         810  +
    /// A builder for [`GetObjectInput`](crate::input::GetObjectInput).
         811  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         812  +
    pub struct Builder {
         813  +
        pub(crate) bucket: ::std::option::Option<::std::string::String>,
         814  +
        pub(crate) key:
         815  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ObjectKey>>,
         816  +
    }
         817  +
    impl Builder {
  796    818   
        #[allow(missing_docs)] // documentation missing in model
  797         -
        pub fn request_payer(
  798         -
            mut self,
  799         -
            input: ::std::option::Option<crate::model::RequestPayer>,
  800         -
        ) -> Self {
  801         -
            self.request_payer = input.map(crate::constrained::MaybeConstrained::Constrained);
         819  +
        pub fn bucket(mut self, input: ::std::string::String) -> Self {
         820  +
            self.bucket = Some(input);
  802    821   
            self
  803    822   
        }
  804    823   
        #[allow(missing_docs)] // documentation missing in model
  805         -
        pub(crate) fn set_request_payer(
         824  +
        pub(crate) fn set_bucket(
  806    825   
            mut self,
  807         -
            input: Option<
  808         -
                impl ::std::convert::Into<
  809         -
                    crate::constrained::MaybeConstrained<crate::model::RequestPayer>,
  810         -
                >,
  811         -
            >,
         826  +
            input: impl ::std::convert::Into<::std::string::String>,
  812    827   
        ) -> Self {
  813         -
            self.request_payer = input.map(|v| v.into());
         828  +
            self.bucket = Some(input.into());
  814    829   
            self
  815    830   
        }
  816    831   
        #[allow(missing_docs)] // documentation missing in model
  817         -
        pub fn expected_bucket_owner(
  818         -
            mut self,
  819         -
            input: ::std::option::Option<::std::string::String>,
  820         -
        ) -> Self {
  821         -
            self.expected_bucket_owner = input;
         832  +
        pub fn key(mut self, input: crate::model::ObjectKey) -> Self {
         833  +
            self.key = Some(crate::constrained::MaybeConstrained::Constrained(input));
  822    834   
            self
  823    835   
        }
  824    836   
        #[allow(missing_docs)] // documentation missing in model
  825         -
        pub(crate) fn set_expected_bucket_owner(
         837  +
        pub(crate) fn set_key(
  826    838   
            mut self,
  827         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         839  +
            input: impl ::std::convert::Into<
         840  +
                crate::constrained::MaybeConstrained<crate::model::ObjectKey>,
         841  +
            >,
  828    842   
        ) -> Self {
  829         -
            self.expected_bucket_owner = input.map(|v| v.into());
         843  +
            self.key = Some(input.into());
  830    844   
            self
  831    845   
        }
  832         -
        /// Consumes the builder and constructs a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input).
         846  +
        /// Consumes the builder and constructs a [`GetObjectInput`](crate::input::GetObjectInput).
  833    847   
        ///
  834         -
        /// The builder fails to construct a [`ListObjectsV2Input`](crate::input::ListObjectsV2Input) if a [`ConstraintViolation`] occurs.
         848  +
        /// The builder fails to construct a [`GetObjectInput`](crate::input::GetObjectInput) if a [`ConstraintViolation`] occurs.
  835    849   
        ///
  836    850   
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  837         -
        pub fn build(self) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
         851  +
        pub fn build(self) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
  838    852   
            self.build_enforcing_all_constraints()
  839    853   
        }
  840    854   
        fn build_enforcing_all_constraints(
  841    855   
            self,
  842         -
        ) -> Result<crate::input::ListObjectsV2Input, ConstraintViolation> {
  843         -
            Ok(crate::input::ListObjectsV2Input {
         856  +
        ) -> Result<crate::input::GetObjectInput, ConstraintViolation> {
         857  +
            Ok(crate::input::GetObjectInput {
  844    858   
                bucket: self.bucket.ok_or(ConstraintViolation::MissingBucket)?,
  845         -
                delimiter: self.delimiter,
  846         -
                encoding_type: self
  847         -
                    .encoding_type
  848         -
                    .map(|v| match v {
  849         -
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  850         -
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  851         -
                    })
  852         -
                    .map(|res| res.map_err(ConstraintViolation::EncodingType))
  853         -
                    .transpose()?,
  854         -
                max_keys: self.max_keys,
  855         -
                prefix: self.prefix,
  856         -
                continuation_token: self.continuation_token,
  857         -
                fetch_owner: self.fetch_owner,
  858         -
                start_after: self.start_after,
  859         -
                request_payer: self
  860         -
                    .request_payer
         859  +
                key: self
         860  +
                    .key
  861    861   
                    .map(|v| match v {
  862    862   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  863    863   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  864    864   
                    })
  865         -
                    .map(|res| res.map_err(ConstraintViolation::RequestPayer))
  866         -
                    .transpose()?,
  867         -
                expected_bucket_owner: self.expected_bucket_owner,
         865  +
                    .map(|res| res.map_err(ConstraintViolation::Key))
         866  +
                    .transpose()?
         867  +
                    .ok_or(ConstraintViolation::MissingKey)?,
  868    868   
            })
  869    869   
        }
  870    870   
    }
  871    871   
}