AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_dev_environment/_update_dev_environment_input.rs

@@ -49,49 +302,318 @@
   69     69   
    "com.amazonaws.codecatalyst.synthetic",
   70     70   
    "UpdateDevEnvironmentInput",
   71     71   
);
   72     72   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$spaceName",
   75     75   
        "com.amazonaws.codecatalyst.synthetic",
   76     76   
        "UpdateDevEnvironmentInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "space_name",
          79  +
    "spaceName",
   80     80   
    0,
   81     81   
)
   82     82   
.with_http_label();
   83     83   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_PROJECT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   84     84   
    ::aws_smithy_schema::ShapeId::from_static(
   85     85   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$projectName",
   86     86   
        "com.amazonaws.codecatalyst.synthetic",
   87     87   
        "UpdateDevEnvironmentInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::String,
   90         -
    "project_name",
          90  +
    "projectName",
   91     91   
    1,
   92     92   
)
   93     93   
.with_http_label();
   94     94   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$id",
   97     97   
        "com.amazonaws.codecatalyst.synthetic",
   98     98   
        "UpdateDevEnvironmentInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101    101   
    "id",
  102    102   
    2,
  103    103   
)
  104    104   
.with_http_label();
  105    105   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_ALIAS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  106    106   
    ::aws_smithy_schema::ShapeId::from_static(
  107    107   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$alias",
  108    108   
        "com.amazonaws.codecatalyst.synthetic",
  109    109   
        "UpdateDevEnvironmentInput",
  110    110   
    ),
  111    111   
    ::aws_smithy_schema::ShapeType::String,
  112    112   
    "alias",
  113    113   
    3,
  114    114   
);
  115    115   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_IDES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  116    116   
    ::aws_smithy_schema::ShapeId::from_static(
  117    117   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$ides",
  118    118   
        "com.amazonaws.codecatalyst.synthetic",
  119    119   
        "UpdateDevEnvironmentInput",
  120    120   
    ),
  121    121   
    ::aws_smithy_schema::ShapeType::List,
  122    122   
    "ides",
  123    123   
    4,
  124    124   
);
  125    125   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_INSTANCE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  126    126   
    ::aws_smithy_schema::ShapeId::from_static(
  127    127   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$instanceType",
  128    128   
        "com.amazonaws.codecatalyst.synthetic",
  129    129   
        "UpdateDevEnvironmentInput",
  130    130   
    ),
  131    131   
    ::aws_smithy_schema::ShapeType::String,
  132         -
    "instance_type",
         132  +
    "instanceType",
  133    133   
    5,
  134    134   
);
  135    135   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  136    136   
    ::aws_smithy_schema::ShapeId::from_static(
  137    137   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$inactivityTimeoutMinutes",
  138    138   
        "com.amazonaws.codecatalyst.synthetic",
  139    139   
        "UpdateDevEnvironmentInput",
  140    140   
    ),
  141    141   
    ::aws_smithy_schema::ShapeType::Integer,
  142         -
    "inactivity_timeout_minutes",
         142  +
    "inactivityTimeoutMinutes",
  143    143   
    6,
  144    144   
);
  145    145   
static UPDATEDEVENVIRONMENTINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  146    146   
    ::aws_smithy_schema::ShapeId::from_static(
  147    147   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentInput$clientToken",
  148    148   
        "com.amazonaws.codecatalyst.synthetic",
  149    149   
        "UpdateDevEnvironmentInput",
  150    150   
    ),
  151    151   
    ::aws_smithy_schema::ShapeType::String,
  152         -
    "client_token",
         152  +
    "clientToken",
  153    153   
    7,
  154    154   
);
  155    155   
static UPDATEDEVENVIRONMENTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  156    156   
    UPDATEDEVENVIRONMENTINPUT_SCHEMA_ID,
  157    157   
    ::aws_smithy_schema::ShapeType::Structure,
  158    158   
    &[
  159    159   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_SPACE_NAME,
  160    160   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_PROJECT_NAME,
  161    161   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_ID,
  162    162   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_ALIAS,
  163    163   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_IDES,
  164    164   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_INSTANCE_TYPE,
  165    165   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES,
  166    166   
        &UPDATEDEVENVIRONMENTINPUT_MEMBER_CLIENT_TOKEN,
  167    167   
    ],
  168         -
);
         168  +
)
         169  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         170  +
    "PATCH",
         171  +
    "/v1/spaces/{spaceName}/projects/{projectName}/devEnvironments/{id}",
         172  +
    None,
         173  +
));
  169    174   
impl UpdateDevEnvironmentInput {
  170    175   
    /// The schema for this shape.
  171    176   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEDEVENVIRONMENTINPUT_SCHEMA;
  172    177   
}
  173    178   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateDevEnvironmentInput {
  174    179   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  175    180   
    fn serialize_members(
  176    181   
        &self,
  177    182   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  178    183   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  179    184   
        if let Some(ref val) = self.space_name {
  180    185   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_SPACE_NAME, val)?;
  181    186   
        }
  182    187   
        if let Some(ref val) = self.project_name {
  183    188   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_PROJECT_NAME, val)?;
  184    189   
        }
  185    190   
        if let Some(ref val) = self.id {
  186    191   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_ID, val)?;
  187    192   
        }
  188    193   
        if let Some(ref val) = self.alias {
  189    194   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_ALIAS, val)?;
  190    195   
        }
  191    196   
        if let Some(ref val) = self.ides {
  192    197   
            ser.write_list(
  193    198   
                &UPDATEDEVENVIRONMENTINPUT_MEMBER_IDES,
  194    199   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  195    200   
                    for item in val {
  196    201   
                        ser.write_struct(crate::types::IdeConfiguration::SCHEMA, item)?;
  197    202   
                    }
  198    203   
                    Ok(())
  199    204   
                },
  200    205   
            )?;
  201    206   
        }
  202    207   
        if let Some(ref val) = self.instance_type {
  203    208   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_INSTANCE_TYPE, val.as_str())?;
  204    209   
        }
  205    210   
        if let Some(ref val) = self.inactivity_timeout_minutes {
  206    211   
            ser.write_integer(&UPDATEDEVENVIRONMENTINPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES, *val)?;
  207    212   
        }
  208    213   
        if let Some(ref val) = self.client_token {
  209    214   
            ser.write_string(&UPDATEDEVENVIRONMENTINPUT_MEMBER_CLIENT_TOKEN, val)?;
  210    215   
        }
  211    216   
        Ok(())
  212    217   
    }
  213    218   
}
  214    219   
impl UpdateDevEnvironmentInput {
  215    220   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  216         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  217         -
        deserializer: &mut D,
         221  +
    pub fn deserialize(
         222  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  218    223   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  219    224   
        #[allow(unused_variables, unused_mut)]
  220    225   
        let mut builder = Self::builder();
  221    226   
        #[allow(
  222    227   
            unused_variables,
  223    228   
            unreachable_code,
  224    229   
            clippy::single_match,
  225    230   
            clippy::match_single_binding,
  226    231   
            clippy::diverging_sub_expression
  227    232   
        )]
  228         -
        deserializer.read_struct(&UPDATEDEVENVIRONMENTINPUT_SCHEMA, (), |_, member, deser| {
         233  +
        deserializer.read_struct(&UPDATEDEVENVIRONMENTINPUT_SCHEMA, &mut |member, deser| {
  229    234   
            match member.member_index() {
  230    235   
                Some(0) => {
  231    236   
                    builder.space_name = Some(deser.read_string(member)?);
  232    237   
                }
  233    238   
                Some(1) => {
  234    239   
                    builder.project_name = Some(deser.read_string(member)?);
  235    240   
                }
  236    241   
                Some(2) => {
  237    242   
                    builder.id = Some(deser.read_string(member)?);
  238    243   
                }
  239    244   
                Some(3) => {
  240    245   
                    builder.alias = Some(deser.read_string(member)?);
  241    246   
                }
  242    247   
                Some(4) => {
  243    248   
                    builder.ides = Some({
  244         -
                        let container = if let Some(cap) = deser.container_size() {
  245         -
                            Vec::with_capacity(cap)
  246         -
                        } else {
  247         -
                            Vec::new()
  248         -
                        };
  249         -
                        deser.read_list(member, container, |mut list, deser| {
  250         -
                            list.push(crate::types::IdeConfiguration::deserialize(deser)?);
  251         -
                            Ok(list)
  252         -
                        })?
         249  +
                        let mut container = Vec::new();
         250  +
                        deser.read_list(member, &mut |deser| {
         251  +
                            container.push(crate::types::IdeConfiguration::deserialize(deser)?);
         252  +
                            Ok(())
         253  +
                        })?;
         254  +
                        container
  253    255   
                    });
  254    256   
                }
  255    257   
                Some(5) => {
  256    258   
                    builder.instance_type = Some(crate::types::InstanceType::from(deser.read_string(member)?.as_str()));
  257    259   
                }
  258    260   
                Some(6) => {
  259    261   
                    builder.inactivity_timeout_minutes = Some(deser.read_integer(member)?);
  260    262   
                }
  261    263   
                Some(7) => {
  262    264   
                    builder.client_token = Some(deser.read_string(member)?);
  263    265   
                }
  264    266   
                _ => {}
  265    267   
            }
  266    268   
            Ok(())
  267    269   
        })?;
         270  +
        builder.space_name = builder.space_name.or(Some(String::new()));
         271  +
        builder.project_name = builder.project_name.or(Some(String::new()));
         272  +
        builder.id = builder.id.or(Some(String::new()));
  268    273   
        builder
  269    274   
            .build()
  270    275   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  271    276   
    }
  272    277   
}
         278  +
impl UpdateDevEnvironmentInput {
         279  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         280  +
    pub fn deserialize_with_response(
         281  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         282  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         283  +
        _status: u16,
         284  +
        _body: &[u8],
         285  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         286  +
        Self::deserialize(deserializer)
         287  +
    }
         288  +
}
  273    289   
impl UpdateDevEnvironmentInput {
  274    290   
    /// Creates a new builder-style object to manufacture [`UpdateDevEnvironmentInput`](crate::operation::update_dev_environment::UpdateDevEnvironmentInput).
  275    291   
    pub fn builder() -> crate::operation::update_dev_environment::builders::UpdateDevEnvironmentInputBuilder {
  276    292   
        crate::operation::update_dev_environment::builders::UpdateDevEnvironmentInputBuilder::default()
  277    293   
    }
  278    294   
}
  279    295   
  280    296   
/// A builder for [`UpdateDevEnvironmentInput`](crate::operation::update_dev_environment::UpdateDevEnvironmentInput).
  281    297   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  282    298   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_dev_environment/_update_dev_environment_output.rs

@@ -55,55 +279,354 @@
   75     75   
    "id",
   76     76   
    0,
   77     77   
);
   78     78   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     79   
    ::aws_smithy_schema::ShapeId::from_static(
   80     80   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$spaceName",
   81     81   
        "com.amazonaws.codecatalyst.synthetic",
   82     82   
        "UpdateDevEnvironmentOutput",
   83     83   
    ),
   84     84   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "space_name",
          85  +
    "spaceName",
   86     86   
    1,
   87     87   
);
   88     88   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_PROJECT_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   89     89   
    ::aws_smithy_schema::ShapeId::from_static(
   90     90   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$projectName",
   91     91   
        "com.amazonaws.codecatalyst.synthetic",
   92     92   
        "UpdateDevEnvironmentOutput",
   93     93   
    ),
   94     94   
    ::aws_smithy_schema::ShapeType::String,
   95         -
    "project_name",
          95  +
    "projectName",
   96     96   
    2,
   97     97   
);
   98     98   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_ALIAS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   99     99   
    ::aws_smithy_schema::ShapeId::from_static(
  100    100   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$alias",
  101    101   
        "com.amazonaws.codecatalyst.synthetic",
  102    102   
        "UpdateDevEnvironmentOutput",
  103    103   
    ),
  104    104   
    ::aws_smithy_schema::ShapeType::String,
  105    105   
    "alias",
  106    106   
    3,
  107    107   
);
  108    108   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_IDES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  109    109   
    ::aws_smithy_schema::ShapeId::from_static(
  110    110   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$ides",
  111    111   
        "com.amazonaws.codecatalyst.synthetic",
  112    112   
        "UpdateDevEnvironmentOutput",
  113    113   
    ),
  114    114   
    ::aws_smithy_schema::ShapeType::List,
  115    115   
    "ides",
  116    116   
    4,
  117    117   
);
  118    118   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INSTANCE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  119    119   
    ::aws_smithy_schema::ShapeId::from_static(
  120    120   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$instanceType",
  121    121   
        "com.amazonaws.codecatalyst.synthetic",
  122    122   
        "UpdateDevEnvironmentOutput",
  123    123   
    ),
  124    124   
    ::aws_smithy_schema::ShapeType::String,
  125         -
    "instance_type",
         125  +
    "instanceType",
  126    126   
    5,
  127    127   
);
  128    128   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  129    129   
    ::aws_smithy_schema::ShapeId::from_static(
  130    130   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$inactivityTimeoutMinutes",
  131    131   
        "com.amazonaws.codecatalyst.synthetic",
  132    132   
        "UpdateDevEnvironmentOutput",
  133    133   
    ),
  134    134   
    ::aws_smithy_schema::ShapeType::Integer,
  135         -
    "inactivity_timeout_minutes",
         135  +
    "inactivityTimeoutMinutes",
  136    136   
    6,
  137    137   
);
  138    138   
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  139    139   
    ::aws_smithy_schema::ShapeId::from_static(
  140    140   
        "com.amazonaws.codecatalyst.synthetic#UpdateDevEnvironmentOutput$clientToken",
  141    141   
        "com.amazonaws.codecatalyst.synthetic",
  142    142   
        "UpdateDevEnvironmentOutput",
  143    143   
    ),
  144    144   
    ::aws_smithy_schema::ShapeType::String,
  145         -
    "client_token",
         145  +
    "clientToken",
  146    146   
    7,
  147    147   
);
         148  +
static UPDATEDEVENVIRONMENTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         149  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         150  +
    ::aws_smithy_schema::ShapeType::String,
         151  +
    "request_id",
         152  +
    8,
         153  +
)
         154  +
.with_http_header("x-amzn-requestid");
  148    155   
static UPDATEDEVENVIRONMENTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  149    156   
    UPDATEDEVENVIRONMENTOUTPUT_SCHEMA_ID,
  150    157   
    ::aws_smithy_schema::ShapeType::Structure,
  151    158   
    &[
  152    159   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_ID,
  153    160   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_SPACE_NAME,
  154    161   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_PROJECT_NAME,
  155    162   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_ALIAS,
  156    163   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_IDES,
  157    164   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INSTANCE_TYPE,
  158    165   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES,
  159    166   
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_CLIENT_TOKEN,
         167  +
        &UPDATEDEVENVIRONMENTOUTPUT_MEMBER__REQUEST_ID,
  160    168   
    ],
  161    169   
);
  162    170   
impl UpdateDevEnvironmentOutput {
  163    171   
    /// The schema for this shape.
  164    172   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEDEVENVIRONMENTOUTPUT_SCHEMA;
  165    173   
}
  166    174   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateDevEnvironmentOutput {
  167    175   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  168    176   
    fn serialize_members(
  169    177   
        &self,
  170    178   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  171    179   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  172    180   
        {
  173    181   
            let val = &self.id;
  174    182   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_ID, val)?;
  175    183   
        }
  176    184   
        {
  177    185   
            let val = &self.space_name;
  178    186   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_SPACE_NAME, val)?;
  179    187   
        }
  180    188   
        {
  181    189   
            let val = &self.project_name;
  182    190   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_PROJECT_NAME, val)?;
  183    191   
        }
  184    192   
        if let Some(ref val) = self.alias {
  185    193   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_ALIAS, val)?;
  186    194   
        }
  187    195   
        if let Some(ref val) = self.ides {
  188    196   
            ser.write_list(
  189    197   
                &UPDATEDEVENVIRONMENTOUTPUT_MEMBER_IDES,
  190    198   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  191    199   
                    for item in val {
  192    200   
                        ser.write_struct(crate::types::IdeConfiguration::SCHEMA, item)?;
  193    201   
                    }
  194    202   
                    Ok(())
  195    203   
                },
  196    204   
            )?;
  197    205   
        }
  198    206   
        if let Some(ref val) = self.instance_type {
  199    207   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INSTANCE_TYPE, val.as_str())?;
  200    208   
        }
  201    209   
        {
  202    210   
            let val = &self.inactivity_timeout_minutes;
  203    211   
            ser.write_integer(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_INACTIVITY_TIMEOUT_MINUTES, *val)?;
  204    212   
        }
  205    213   
        if let Some(ref val) = self.client_token {
  206    214   
            ser.write_string(&UPDATEDEVENVIRONMENTOUTPUT_MEMBER_CLIENT_TOKEN, val)?;
  207    215   
        }
  208    216   
        Ok(())
  209    217   
    }
  210    218   
}
  211    219   
impl UpdateDevEnvironmentOutput {
  212    220   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  213         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  214         -
        deserializer: &mut D,
         221  +
    pub fn deserialize(
         222  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  215    223   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  216    224   
        #[allow(unused_variables, unused_mut)]
  217    225   
        let mut builder = Self::builder();
  218    226   
        #[allow(
  219    227   
            unused_variables,
  220    228   
            unreachable_code,
  221    229   
            clippy::single_match,
  222    230   
            clippy::match_single_binding,
  223    231   
            clippy::diverging_sub_expression
  224    232   
        )]
  225         -
        deserializer.read_struct(&UPDATEDEVENVIRONMENTOUTPUT_SCHEMA, (), |_, member, deser| {
         233  +
        deserializer.read_struct(&UPDATEDEVENVIRONMENTOUTPUT_SCHEMA, &mut |member, deser| {
         234  +
            match member.member_index() {
         235  +
                Some(0) => {
         236  +
                    builder.id = Some(deser.read_string(member)?);
         237  +
                }
         238  +
                Some(1) => {
         239  +
                    builder.space_name = Some(deser.read_string(member)?);
         240  +
                }
         241  +
                Some(2) => {
         242  +
                    builder.project_name = Some(deser.read_string(member)?);
         243  +
                }
         244  +
                Some(3) => {
         245  +
                    builder.alias = Some(deser.read_string(member)?);
         246  +
                }
         247  +
                Some(4) => {
         248  +
                    builder.ides = Some({
         249  +
                        let mut container = Vec::new();
         250  +
                        deser.read_list(member, &mut |deser| {
         251  +
                            container.push(crate::types::IdeConfiguration::deserialize(deser)?);
         252  +
                            Ok(())
         253  +
                        })?;
         254  +
                        container
         255  +
                    });
         256  +
                }
         257  +
                Some(5) => {
         258  +
                    builder.instance_type = Some(crate::types::InstanceType::from(deser.read_string(member)?.as_str()));
         259  +
                }
         260  +
                Some(6) => {
         261  +
                    builder.inactivity_timeout_minutes = Some(deser.read_integer(member)?);
         262  +
                }
         263  +
                Some(7) => {
         264  +
                    builder.client_token = Some(deser.read_string(member)?);
         265  +
                }
         266  +
                Some(8) => {
         267  +
                    builder._request_id = Some(deser.read_string(member)?);
         268  +
                }
         269  +
                _ => {}
         270  +
            }
         271  +
            Ok(())
         272  +
        })?;
         273  +
        builder.id = builder.id.or(Some(String::new()));
         274  +
        builder.space_name = builder.space_name.or(Some(String::new()));
         275  +
        builder.project_name = builder.project_name.or(Some(String::new()));
         276  +
        builder
         277  +
            .build()
         278  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         279  +
    }
         280  +
}
         281  +
impl UpdateDevEnvironmentOutput {
         282  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         283  +
    /// Header-bound members are read directly from headers, avoiding runtime
         284  +
    /// member iteration overhead. Body members are read via the deserializer.
         285  +
    pub fn deserialize_with_response(
         286  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         287  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         288  +
        _status: u16,
         289  +
        _body: &[u8],
         290  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         291  +
        #[allow(unused_variables, unused_mut)]
         292  +
        let mut builder = Self::builder();
         293  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         294  +
            builder._request_id = Some(val.to_string());
         295  +
        }
         296  +
        #[allow(
         297  +
            unused_variables,
         298  +
            unreachable_code,
         299  +
            clippy::single_match,
         300  +
            clippy::match_single_binding,
         301  +
            clippy::diverging_sub_expression
         302  +
        )]
         303  +
        deserializer.read_struct(&UPDATEDEVENVIRONMENTOUTPUT_SCHEMA, &mut |member, deser| {
  226    304   
            match member.member_index() {
  227    305   
                Some(0) => {
  228    306   
                    builder.id = Some(deser.read_string(member)?);
  229    307   
                }
  230    308   
                Some(1) => {
  231    309   
                    builder.space_name = Some(deser.read_string(member)?);
  232    310   
                }
  233    311   
                Some(2) => {
  234    312   
                    builder.project_name = Some(deser.read_string(member)?);
  235    313   
                }
  236    314   
                Some(3) => {
  237    315   
                    builder.alias = Some(deser.read_string(member)?);
  238    316   
                }
  239    317   
                Some(4) => {
  240    318   
                    builder.ides = Some({
  241         -
                        let container = if let Some(cap) = deser.container_size() {
  242         -
                            Vec::with_capacity(cap)
  243         -
                        } else {
  244         -
                            Vec::new()
  245         -
                        };
  246         -
                        deser.read_list(member, container, |mut list, deser| {
  247         -
                            list.push(crate::types::IdeConfiguration::deserialize(deser)?);
  248         -
                            Ok(list)
  249         -
                        })?
         319  +
                        let mut container = Vec::new();
         320  +
                        deser.read_list(member, &mut |deser| {
         321  +
                            container.push(crate::types::IdeConfiguration::deserialize(deser)?);
         322  +
                            Ok(())
         323  +
                        })?;
         324  +
                        container
  250    325   
                    });
  251    326   
                }
  252    327   
                Some(5) => {
  253    328   
                    builder.instance_type = Some(crate::types::InstanceType::from(deser.read_string(member)?.as_str()));
  254    329   
                }
  255    330   
                Some(6) => {
  256    331   
                    builder.inactivity_timeout_minutes = Some(deser.read_integer(member)?);
  257    332   
                }
  258    333   
                Some(7) => {
  259    334   
                    builder.client_token = Some(deser.read_string(member)?);

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_project.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `UpdateProject`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateProject;
    6      6   
impl UpdateProject {
    7      7   
    /// Creates a new `UpdateProject`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_project::UpdateProjectInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_project::UpdateProjectOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_project::UpdateProjectInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_project::UpdateProjectOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_project::UpdateProjectError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -108,112 +253,374 @@
  128    132   
                crate::operation::update_project::UpdateProjectError,
  129    133   
            >::new());
  130    134   
  131    135   
        ::std::borrow::Cow::Owned(rcb)
  132    136   
    }
  133    137   
}
  134    138   
  135    139   
#[derive(Debug)]
  136    140   
struct UpdateProjectResponseDeserializer;
  137    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateProjectResponseDeserializer {
  138         -
    fn deserialize_nonstreaming(
         142  +
    fn deserialize_nonstreaming_with_config(
  139    143   
        &self,
  140    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         145  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  141    146   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  142    147   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  143         -
        let headers = response.headers();
  144         -
        let body = response.body().bytes().expect("body loaded");
  145    148   
        #[allow(unused_mut)]
  146    149   
        let mut force_error = false;
  147    150   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  148         -
        let parse_result = if !success && status != 200 || force_error {
  149         -
            crate::protocol_serde::shape_update_project::de_update_project_http_error(status, headers, body)
         151  +
        if !success && status != 200 || force_error {
         152  +
            let headers = response.headers();
         153  +
            let body = response.body().bytes().expect("body loaded");
         154  +
            #[allow(unused_mut)]
         155  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         156  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         157  +
            })?;
         158  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         159  +
            let generic = generic_builder.build();
         160  +
            let error_code = match generic.code() {
         161  +
                ::std::option::Option::Some(code) => code,
         162  +
                ::std::option::Option::None => {
         163  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         164  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_project::UpdateProjectError::unhandled(generic)),
         165  +
                    ))
         166  +
                }
         167  +
            };
         168  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         169  +
            let protocol = _cfg
         170  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         171  +
                .expect("a SharedClientProtocol is required");
         172  +
            let err = match error_code {
         173  +
                "AccessDeniedException" => crate::operation::update_project::UpdateProjectError::AccessDeniedException({
         174  +
                    let mut tmp = match protocol
         175  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         176  +
                        .and_then(|mut deser| {
         177  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         178  +
                                &mut *deser,
         179  +
                                response.headers(),
         180  +
                                response.status().into(),
         181  +
                                body,
         182  +
                            )
         183  +
                        }) {
         184  +
                        ::std::result::Result::Ok(val) => val,
         185  +
                        ::std::result::Result::Err(e) => {
         186  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         187  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         188  +
                            ))
         189  +
                        }
         190  +
                    };
         191  +
                    tmp.meta = generic;
         192  +
                    tmp
         193  +
                }),
         194  +
                "ConflictException" => crate::operation::update_project::UpdateProjectError::ConflictException({
         195  +
                    let mut tmp = match protocol
         196  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         197  +
                        .and_then(|mut deser| {
         198  +
                            crate::types::error::ConflictException::deserialize_with_response(
         199  +
                                &mut *deser,
         200  +
                                response.headers(),
         201  +
                                response.status().into(),
         202  +
                                body,
         203  +
                            )
         204  +
                        }) {
         205  +
                        ::std::result::Result::Ok(val) => val,
         206  +
                        ::std::result::Result::Err(e) => {
         207  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                            ))
         210  +
                        }
         211  +
                    };
         212  +
                    tmp.meta = generic;
         213  +
                    tmp
         214  +
                }),
         215  +
                "ResourceNotFoundException" => crate::operation::update_project::UpdateProjectError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    tmp
         235  +
                }),
         236  +
                "ServiceQuotaExceededException" => crate::operation::update_project::UpdateProjectError::ServiceQuotaExceededException({
         237  +
                    let mut tmp = match protocol
         238  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         239  +
                        .and_then(|mut deser| {
         240  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         241  +
                                &mut *deser,
         242  +
                                response.headers(),
         243  +
                                response.status().into(),
         244  +
                                body,
         245  +
                            )
         246  +
                        }) {
         247  +
                        ::std::result::Result::Ok(val) => val,
         248  +
                        ::std::result::Result::Err(e) => {
         249  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                            ))
         252  +
                        }
         253  +
                    };
         254  +
                    tmp.meta = generic;
         255  +
                    tmp
         256  +
                }),
         257  +
                "ThrottlingException" => crate::operation::update_project::UpdateProjectError::ThrottlingException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    tmp
         277  +
                }),
         278  +
                "ValidationException" => crate::operation::update_project::UpdateProjectError::ValidationException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::ValidationException::deserialize_with_response(
         283  +
                                &mut *deser,
         284  +
                                response.headers(),
         285  +
                                response.status().into(),
         286  +
                                body,
         287  +
                            )
         288  +
                        }) {
         289  +
                        ::std::result::Result::Ok(val) => val,
         290  +
                        ::std::result::Result::Err(e) => {
         291  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                            ))
         294  +
                        }
         295  +
                    };
         296  +
                    tmp.meta = generic;
         297  +
                    tmp
         298  +
                }),
         299  +
                _ => crate::operation::update_project::UpdateProjectError::generic(generic),
         300  +
            };
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
  150    304   
        } else {
  151         -
            crate::protocol_serde::shape_update_project::de_update_project_http_response(status, headers, body)
  152         -
        };
  153         -
        crate::protocol_serde::type_erase_result(parse_result)
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol.deserialize_response(response, UpdateProject::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            let body = response.body().bytes().expect("body loaded");
         312  +
            let output = crate::operation::update_project::UpdateProjectOutput::deserialize_with_response(
         313  +
                &mut *deser,
         314  +
                response.headers(),
         315  +
                response.status().into(),
         316  +
                body,
         317  +
            )
         318  +
            .map_err(|e| {
         319  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         320  +
            })?;
         321  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         322  +
        }
  154    323   
    }
  155    324   
}
  156    325   
#[derive(Debug)]
  157    326   
struct UpdateProjectRequestSerializer;
  158    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateProjectRequestSerializer {
  159    328   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  160    329   
    fn serialize_input(
  161    330   
        &self,
  162    331   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  163    332   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  164    333   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  165    334   
        let input = input
  166    335   
            .downcast::<crate::operation::update_project::UpdateProjectInput>()
  167    336   
            .expect("correct type");
  168         -
        let _header_serialization_settings = _cfg
  169         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  170         -
            .cloned()
  171         -
            .unwrap_or_default();
  172         -
        let mut request_builder = {
  173         -
            #[allow(clippy::uninlined_format_args)]
  174         -
            fn uri_base(
  175         -
                _input: &crate::operation::update_project::UpdateProjectInput,
  176         -
                output: &mut ::std::string::String,
  177         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178         -
                use ::std::fmt::Write as _;
  179         -
                let input_1 = &_input.space_name;
  180         -
                let input_1 = input_1
  181         -
                    .as_ref()
  182         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("space_name", "cannot be empty or unset"))?;
  183         -
                let space_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  184         -
                if space_name.is_empty() {
  185         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  186         -
                        "space_name",
  187         -
                        "cannot be empty or unset",
  188         -
                    ));
  189         -
                }
  190         -
                let input_2 = &_input.name;
  191         -
                let input_2 = input_2
  192         -
                    .as_ref()
  193         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  194         -
                let name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  195         -
                if name.is_empty() {
  196         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  197         -
                        "name",
  198         -
                        "cannot be empty or unset",
  199         -
                    ));
  200         -
                }
  201         -
                ::std::write!(output, "/v1/spaces/{spaceName}/projects/{name}", spaceName = space_name, name = name)
  202         -
                    .expect("formatting should succeed");
  203         -
                ::std::result::Result::Ok(())
  204         -
            }
  205         -
            #[allow(clippy::unnecessary_wraps)]
  206         -
            fn update_http_builder(
  207         -
                input: &crate::operation::update_project::UpdateProjectInput,
  208         -
                builder: ::http_1x::request::Builder,
  209         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  210         -
                let mut uri = ::std::string::String::new();
  211         -
                uri_base(input, &mut uri)?;
  212         -
                ::std::result::Result::Ok(builder.method("PATCH").uri(uri))
  213         -
            }
  214         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  215         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_project::ser_update_project_input(&input)?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        let mut request = protocol
         341  +
            .serialize_request(&input, UpdateProject::INPUT_SCHEMA, "", _cfg)
         342  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         343  +
         344  +
        return ::std::result::Result::Ok(request);
  224    345   
    }
  225    346   
}
  226    347   
#[derive(Debug)]
  227    348   
struct UpdateProjectEndpointParamsInterceptor;
  228    349   
  229    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateProjectEndpointParamsInterceptor {
  230    351   
    fn name(&self) -> &'static str {
  231    352   
        "UpdateProjectEndpointParamsInterceptor"
  232    353   
    }
  233    354   

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_project/_update_project_input.rs

@@ -9,9 +158,176 @@
   29     29   
    "com.amazonaws.codecatalyst.synthetic",
   30     30   
    "UpdateProjectInput",
   31     31   
);
   32     32   
static UPDATEPROJECTINPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectInput$spaceName",
   35     35   
        "com.amazonaws.codecatalyst.synthetic",
   36     36   
        "UpdateProjectInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "space_name",
          39  +
    "spaceName",
   40     40   
    0,
   41     41   
)
   42     42   
.with_http_label();
   43     43   
static UPDATEPROJECTINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectInput$name",
   46     46   
        "com.amazonaws.codecatalyst.synthetic",
   47     47   
        "UpdateProjectInput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::String,
   50     50   
    "name",
   51     51   
    1,
   52     52   
)
   53     53   
.with_http_label();
   54     54   
static UPDATEPROJECTINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectInput$description",
   57     57   
        "com.amazonaws.codecatalyst.synthetic",
   58     58   
        "UpdateProjectInput",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::String,
   61     61   
    "description",
   62     62   
    2,
   63     63   
);
   64     64   
static UPDATEPROJECTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   65     65   
    UPDATEPROJECTINPUT_SCHEMA_ID,
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67     67   
    &[
   68     68   
        &UPDATEPROJECTINPUT_MEMBER_SPACE_NAME,
   69     69   
        &UPDATEPROJECTINPUT_MEMBER_NAME,
   70     70   
        &UPDATEPROJECTINPUT_MEMBER_DESCRIPTION,
   71     71   
    ],
   72         -
);
          72  +
)
          73  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          74  +
    "PATCH",
          75  +
    "/v1/spaces/{spaceName}/projects/{name}",
          76  +
    None,
          77  +
));
   73     78   
impl UpdateProjectInput {
   74     79   
    /// The schema for this shape.
   75     80   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEPROJECTINPUT_SCHEMA;
   76     81   
}
   77     82   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateProjectInput {
   78     83   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   79     84   
    fn serialize_members(
   80     85   
        &self,
   81     86   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   82     87   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   83     88   
        if let Some(ref val) = self.space_name {
   84     89   
            ser.write_string(&UPDATEPROJECTINPUT_MEMBER_SPACE_NAME, val)?;
   85     90   
        }
   86     91   
        if let Some(ref val) = self.name {
   87     92   
            ser.write_string(&UPDATEPROJECTINPUT_MEMBER_NAME, val)?;
   88     93   
        }
   89     94   
        if let Some(ref val) = self.description {
   90     95   
            ser.write_string(&UPDATEPROJECTINPUT_MEMBER_DESCRIPTION, val)?;
   91     96   
        }
   92     97   
        Ok(())
   93     98   
    }
   94     99   
}
   95    100   
impl UpdateProjectInput {
   96    101   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   97         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   98         -
        deserializer: &mut D,
         102  +
    pub fn deserialize(
         103  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   99    104   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  100    105   
        #[allow(unused_variables, unused_mut)]
  101    106   
        let mut builder = Self::builder();
  102    107   
        #[allow(
  103    108   
            unused_variables,
  104    109   
            unreachable_code,
  105    110   
            clippy::single_match,
  106    111   
            clippy::match_single_binding,
  107    112   
            clippy::diverging_sub_expression
  108    113   
        )]
  109         -
        deserializer.read_struct(&UPDATEPROJECTINPUT_SCHEMA, (), |_, member, deser| {
         114  +
        deserializer.read_struct(&UPDATEPROJECTINPUT_SCHEMA, &mut |member, deser| {
  110    115   
            match member.member_index() {
  111    116   
                Some(0) => {
  112    117   
                    builder.space_name = Some(deser.read_string(member)?);
  113    118   
                }
  114    119   
                Some(1) => {
  115    120   
                    builder.name = Some(deser.read_string(member)?);
  116    121   
                }
  117    122   
                Some(2) => {
  118    123   
                    builder.description = Some(deser.read_string(member)?);
  119    124   
                }
  120    125   
                _ => {}
  121    126   
            }
  122    127   
            Ok(())
  123    128   
        })?;
         129  +
        builder.space_name = builder.space_name.or(Some(String::new()));
         130  +
        builder.name = builder.name.or(Some(String::new()));
  124    131   
        builder
  125    132   
            .build()
  126    133   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  127    134   
    }
  128    135   
}
         136  +
impl UpdateProjectInput {
         137  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         138  +
    pub fn deserialize_with_response(
         139  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         140  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         141  +
        _status: u16,
         142  +
        _body: &[u8],
         143  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         144  +
        Self::deserialize(deserializer)
         145  +
    }
         146  +
}
  129    147   
impl UpdateProjectInput {
  130    148   
    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
  131    149   
    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
  132    150   
        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
  133    151   
    }
  134    152   
}
  135    153   
  136    154   
/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
  137    155   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  138    156   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_project/_update_project_output.rs

@@ -16,16 +158,212 @@
   36     36   
    "com.amazonaws.codecatalyst.synthetic",
   37     37   
    "UpdateProjectOutput",
   38     38   
);
   39     39   
static UPDATEPROJECTOUTPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectOutput$spaceName",
   42     42   
        "com.amazonaws.codecatalyst.synthetic",
   43     43   
        "UpdateProjectOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "space_name",
          46  +
    "spaceName",
   47     47   
    0,
   48     48   
);
   49     49   
static UPDATEPROJECTOUTPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectOutput$name",
   52     52   
        "com.amazonaws.codecatalyst.synthetic",
   53     53   
        "UpdateProjectOutput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56     56   
    "name",
   57     57   
    1,
   58     58   
);
   59     59   
static UPDATEPROJECTOUTPUT_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectOutput$displayName",
   62     62   
        "com.amazonaws.codecatalyst.synthetic",
   63     63   
        "UpdateProjectOutput",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::String,
   66         -
    "display_name",
          66  +
    "displayName",
   67     67   
    2,
   68     68   
);
   69     69   
static UPDATEPROJECTOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   70     70   
    ::aws_smithy_schema::ShapeId::from_static(
   71     71   
        "com.amazonaws.codecatalyst.synthetic#UpdateProjectOutput$description",
   72     72   
        "com.amazonaws.codecatalyst.synthetic",
   73     73   
        "UpdateProjectOutput",
   74     74   
    ),
   75     75   
    ::aws_smithy_schema::ShapeType::String,
   76     76   
    "description",
   77     77   
    3,
   78     78   
);
          79  +
static UPDATEPROJECTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          80  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          81  +
    ::aws_smithy_schema::ShapeType::String,
          82  +
    "request_id",
          83  +
    4,
          84  +
)
          85  +
.with_http_header("x-amzn-requestid");
   79     86   
static UPDATEPROJECTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   80     87   
    UPDATEPROJECTOUTPUT_SCHEMA_ID,
   81     88   
    ::aws_smithy_schema::ShapeType::Structure,
   82     89   
    &[
   83     90   
        &UPDATEPROJECTOUTPUT_MEMBER_SPACE_NAME,
   84     91   
        &UPDATEPROJECTOUTPUT_MEMBER_NAME,
   85     92   
        &UPDATEPROJECTOUTPUT_MEMBER_DISPLAY_NAME,
   86     93   
        &UPDATEPROJECTOUTPUT_MEMBER_DESCRIPTION,
          94  +
        &UPDATEPROJECTOUTPUT_MEMBER__REQUEST_ID,
   87     95   
    ],
   88     96   
);
   89     97   
impl UpdateProjectOutput {
   90     98   
    /// The schema for this shape.
   91     99   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATEPROJECTOUTPUT_SCHEMA;
   92    100   
}
   93    101   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateProjectOutput {
   94    102   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   95    103   
    fn serialize_members(
   96    104   
        &self,
   97    105   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   98    106   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        if let Some(ref val) = self.space_name {
  100    108   
            ser.write_string(&UPDATEPROJECTOUTPUT_MEMBER_SPACE_NAME, val)?;
  101    109   
        }
  102    110   
        if let Some(ref val) = self.name {
  103    111   
            ser.write_string(&UPDATEPROJECTOUTPUT_MEMBER_NAME, val)?;
  104    112   
        }
  105    113   
        if let Some(ref val) = self.display_name {
  106    114   
            ser.write_string(&UPDATEPROJECTOUTPUT_MEMBER_DISPLAY_NAME, val)?;
  107    115   
        }
  108    116   
        if let Some(ref val) = self.description {
  109    117   
            ser.write_string(&UPDATEPROJECTOUTPUT_MEMBER_DESCRIPTION, val)?;
  110    118   
        }
  111    119   
        Ok(())
  112    120   
    }
  113    121   
}
  114    122   
impl UpdateProjectOutput {
  115    123   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  116         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  117         -
        deserializer: &mut D,
         124  +
    pub fn deserialize(
         125  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         126  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         127  +
        #[allow(unused_variables, unused_mut)]
         128  +
        let mut builder = Self::builder();
         129  +
        #[allow(
         130  +
            unused_variables,
         131  +
            unreachable_code,
         132  +
            clippy::single_match,
         133  +
            clippy::match_single_binding,
         134  +
            clippy::diverging_sub_expression
         135  +
        )]
         136  +
        deserializer.read_struct(&UPDATEPROJECTOUTPUT_SCHEMA, &mut |member, deser| {
         137  +
            match member.member_index() {
         138  +
                Some(0) => {
         139  +
                    builder.space_name = Some(deser.read_string(member)?);
         140  +
                }
         141  +
                Some(1) => {
         142  +
                    builder.name = Some(deser.read_string(member)?);
         143  +
                }
         144  +
                Some(2) => {
         145  +
                    builder.display_name = Some(deser.read_string(member)?);
         146  +
                }
         147  +
                Some(3) => {
         148  +
                    builder.description = Some(deser.read_string(member)?);
         149  +
                }
         150  +
                Some(4) => {
         151  +
                    builder._request_id = Some(deser.read_string(member)?);
         152  +
                }
         153  +
                _ => {}
         154  +
            }
         155  +
            Ok(())
         156  +
        })?;
         157  +
        Ok(builder.build())
         158  +
    }
         159  +
}
         160  +
impl UpdateProjectOutput {
         161  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         162  +
    /// Header-bound members are read directly from headers, avoiding runtime
         163  +
    /// member iteration overhead. Body members are read via the deserializer.
         164  +
    pub fn deserialize_with_response(
         165  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         166  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         167  +
        _status: u16,
         168  +
        _body: &[u8],
  118    169   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  119    170   
        #[allow(unused_variables, unused_mut)]
  120    171   
        let mut builder = Self::builder();
         172  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         173  +
            builder._request_id = Some(val.to_string());
         174  +
        }
  121    175   
        #[allow(
  122    176   
            unused_variables,
  123    177   
            unreachable_code,
  124    178   
            clippy::single_match,
  125    179   
            clippy::match_single_binding,
  126    180   
            clippy::diverging_sub_expression
  127    181   
        )]
  128         -
        deserializer.read_struct(&UPDATEPROJECTOUTPUT_SCHEMA, (), |_, member, deser| {
         182  +
        deserializer.read_struct(&UPDATEPROJECTOUTPUT_SCHEMA, &mut |member, deser| {
  129    183   
            match member.member_index() {
  130    184   
                Some(0) => {
  131    185   
                    builder.space_name = Some(deser.read_string(member)?);
  132    186   
                }
  133    187   
                Some(1) => {
  134    188   
                    builder.name = Some(deser.read_string(member)?);
  135    189   
                }
  136    190   
                Some(2) => {
  137    191   
                    builder.display_name = Some(deser.read_string(member)?);
  138    192   
                }

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_space.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `UpdateSpace`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct UpdateSpace;
    6      6   
impl UpdateSpace {
    7      7   
    /// Creates a new `UpdateSpace`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_space::UpdateSpaceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::update_space::UpdateSpaceOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::update_space::UpdateSpaceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::update_space::UpdateSpaceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::update_space::UpdateSpaceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -108,112 +241,374 @@
  128    132   
                crate::operation::update_space::UpdateSpaceError,
  129    133   
            >::new());
  130    134   
  131    135   
        ::std::borrow::Cow::Owned(rcb)
  132    136   
    }
  133    137   
}
  134    138   
  135    139   
#[derive(Debug)]
  136    140   
struct UpdateSpaceResponseDeserializer;
  137    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateSpaceResponseDeserializer {
  138         -
    fn deserialize_nonstreaming(
         142  +
    fn deserialize_nonstreaming_with_config(
  139    143   
        &self,
  140    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         145  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  141    146   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  142    147   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  143         -
        let headers = response.headers();
  144         -
        let body = response.body().bytes().expect("body loaded");
  145    148   
        #[allow(unused_mut)]
  146    149   
        let mut force_error = false;
  147    150   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  148         -
        let parse_result = if !success && status != 200 || force_error {
  149         -
            crate::protocol_serde::shape_update_space::de_update_space_http_error(status, headers, body)
         151  +
        if !success && status != 200 || force_error {
         152  +
            let headers = response.headers();
         153  +
            let body = response.body().bytes().expect("body loaded");
         154  +
            #[allow(unused_mut)]
         155  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         156  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         157  +
            })?;
         158  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         159  +
            let generic = generic_builder.build();
         160  +
            let error_code = match generic.code() {
         161  +
                ::std::option::Option::Some(code) => code,
         162  +
                ::std::option::Option::None => {
         163  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         164  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_space::UpdateSpaceError::unhandled(generic)),
         165  +
                    ))
         166  +
                }
         167  +
            };
         168  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         169  +
            let protocol = _cfg
         170  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         171  +
                .expect("a SharedClientProtocol is required");
         172  +
            let err = match error_code {
         173  +
                "AccessDeniedException" => crate::operation::update_space::UpdateSpaceError::AccessDeniedException({
         174  +
                    let mut tmp = match protocol
         175  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         176  +
                        .and_then(|mut deser| {
         177  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         178  +
                                &mut *deser,
         179  +
                                response.headers(),
         180  +
                                response.status().into(),
         181  +
                                body,
         182  +
                            )
         183  +
                        }) {
         184  +
                        ::std::result::Result::Ok(val) => val,
         185  +
                        ::std::result::Result::Err(e) => {
         186  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         187  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         188  +
                            ))
         189  +
                        }
         190  +
                    };
         191  +
                    tmp.meta = generic;
         192  +
                    tmp
         193  +
                }),
         194  +
                "ConflictException" => crate::operation::update_space::UpdateSpaceError::ConflictException({
         195  +
                    let mut tmp = match protocol
         196  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         197  +
                        .and_then(|mut deser| {
         198  +
                            crate::types::error::ConflictException::deserialize_with_response(
         199  +
                                &mut *deser,
         200  +
                                response.headers(),
         201  +
                                response.status().into(),
         202  +
                                body,
         203  +
                            )
         204  +
                        }) {
         205  +
                        ::std::result::Result::Ok(val) => val,
         206  +
                        ::std::result::Result::Err(e) => {
         207  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                            ))
         210  +
                        }
         211  +
                    };
         212  +
                    tmp.meta = generic;
         213  +
                    tmp
         214  +
                }),
         215  +
                "ResourceNotFoundException" => crate::operation::update_space::UpdateSpaceError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    tmp
         235  +
                }),
         236  +
                "ServiceQuotaExceededException" => crate::operation::update_space::UpdateSpaceError::ServiceQuotaExceededException({
         237  +
                    let mut tmp = match protocol
         238  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         239  +
                        .and_then(|mut deser| {
         240  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         241  +
                                &mut *deser,
         242  +
                                response.headers(),
         243  +
                                response.status().into(),
         244  +
                                body,
         245  +
                            )
         246  +
                        }) {
         247  +
                        ::std::result::Result::Ok(val) => val,
         248  +
                        ::std::result::Result::Err(e) => {
         249  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                            ))
         252  +
                        }
         253  +
                    };
         254  +
                    tmp.meta = generic;
         255  +
                    tmp
         256  +
                }),
         257  +
                "ThrottlingException" => crate::operation::update_space::UpdateSpaceError::ThrottlingException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    tmp
         277  +
                }),
         278  +
                "ValidationException" => crate::operation::update_space::UpdateSpaceError::ValidationException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::ValidationException::deserialize_with_response(
         283  +
                                &mut *deser,
         284  +
                                response.headers(),
         285  +
                                response.status().into(),
         286  +
                                body,
         287  +
                            )
         288  +
                        }) {
         289  +
                        ::std::result::Result::Ok(val) => val,
         290  +
                        ::std::result::Result::Err(e) => {
         291  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                            ))
         294  +
                        }
         295  +
                    };
         296  +
                    tmp.meta = generic;
         297  +
                    tmp
         298  +
                }),
         299  +
                _ => crate::operation::update_space::UpdateSpaceError::generic(generic),
         300  +
            };
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
  150    304   
        } else {
  151         -
            crate::protocol_serde::shape_update_space::de_update_space_http_response(status, headers, body)
  152         -
        };
  153         -
        crate::protocol_serde::type_erase_result(parse_result)
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol.deserialize_response(response, UpdateSpace::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            let body = response.body().bytes().expect("body loaded");
         312  +
            let output = crate::operation::update_space::UpdateSpaceOutput::deserialize_with_response(
         313  +
                &mut *deser,
         314  +
                response.headers(),
         315  +
                response.status().into(),
         316  +
                body,
         317  +
            )
         318  +
            .map_err(|e| {
         319  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         320  +
            })?;
         321  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         322  +
        }
  154    323   
    }
  155    324   
}
  156    325   
#[derive(Debug)]
  157    326   
struct UpdateSpaceRequestSerializer;
  158    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateSpaceRequestSerializer {
  159    328   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  160    329   
    fn serialize_input(
  161    330   
        &self,
  162    331   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  163    332   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  164    333   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  165    334   
        let input = input
  166    335   
            .downcast::<crate::operation::update_space::UpdateSpaceInput>()
  167    336   
            .expect("correct type");
  168         -
        let _header_serialization_settings = _cfg
  169         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  170         -
            .cloned()
  171         -
            .unwrap_or_default();
  172         -
        let mut request_builder = {
  173         -
            #[allow(clippy::uninlined_format_args)]
  174         -
            fn uri_base(
  175         -
                _input: &crate::operation::update_space::UpdateSpaceInput,
  176         -
                output: &mut ::std::string::String,
  177         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178         -
                use ::std::fmt::Write as _;
  179         -
                let input_1 = &_input.name;
  180         -
                let input_1 = input_1
  181         -
                    .as_ref()
  182         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  183         -
                let name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  184         -
                if name.is_empty() {
  185         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  186         -
                        "name",
  187         -
                        "cannot be empty or unset",
  188         -
                    ));
  189         -
                }
  190         -
                ::std::write!(output, "/v1/spaces/{name}", name = name).expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
  192         -
            }
  193         -
            #[allow(clippy::unnecessary_wraps)]
  194         -
            fn update_http_builder(
  195         -
                input: &crate::operation::update_space::UpdateSpaceInput,
  196         -
                builder: ::http_1x::request::Builder,
  197         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  198         -
                let mut uri = ::std::string::String::new();
  199         -
                uri_base(input, &mut uri)?;
  200         -
                ::std::result::Result::Ok(builder.method("PATCH").uri(uri))
  201         -
            }
  202         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  203         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  204         -
            builder
  205         -
        };
  206         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_space::ser_update_space_input(&input)?);
  207         -
        if let Some(content_length) = body.content_length() {
  208         -
            let content_length = content_length.to_string();
  209         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  210         -
        }
  211         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        let mut request = protocol
         341  +
            .serialize_request(&input, UpdateSpace::INPUT_SCHEMA, "", _cfg)
         342  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         343  +
         344  +
        return ::std::result::Result::Ok(request);
  212    345   
    }
  213    346   
}
  214    347   
#[derive(Debug)]
  215    348   
struct UpdateSpaceEndpointParamsInterceptor;
  216    349   
  217    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSpaceEndpointParamsInterceptor {
  218    351   
    fn name(&self) -> &'static str {
  219    352   
        "UpdateSpaceEndpointParamsInterceptor"
  220    353   
    }
  221    354   

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_space/_update_space_input.rs

@@ -21,21 +131,144 @@
   41     41   
        "UpdateSpaceInput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::String,
   44     44   
    "description",
   45     45   
    1,
   46     46   
);
   47     47   
static UPDATESPACEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     48   
    UPDATESPACEINPUT_SCHEMA_ID,
   49     49   
    ::aws_smithy_schema::ShapeType::Structure,
   50     50   
    &[&UPDATESPACEINPUT_MEMBER_NAME, &UPDATESPACEINPUT_MEMBER_DESCRIPTION],
   51         -
);
          51  +
)
          52  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("PATCH", "/v1/spaces/{name}", None));
   52     53   
impl UpdateSpaceInput {
   53     54   
    /// The schema for this shape.
   54     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATESPACEINPUT_SCHEMA;
   55     56   
}
   56     57   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateSpaceInput {
   57     58   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   58     59   
    fn serialize_members(
   59     60   
        &self,
   60     61   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   61     62   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   62     63   
        if let Some(ref val) = self.name {
   63     64   
            ser.write_string(&UPDATESPACEINPUT_MEMBER_NAME, val)?;
   64     65   
        }
   65     66   
        if let Some(ref val) = self.description {
   66     67   
            ser.write_string(&UPDATESPACEINPUT_MEMBER_DESCRIPTION, val)?;
   67     68   
        }
   68     69   
        Ok(())
   69     70   
    }
   70     71   
}
   71     72   
impl UpdateSpaceInput {
   72     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   73         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   74         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   75     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   76     77   
        #[allow(unused_variables, unused_mut)]
   77     78   
        let mut builder = Self::builder();
   78     79   
        #[allow(
   79     80   
            unused_variables,
   80     81   
            unreachable_code,
   81     82   
            clippy::single_match,
   82     83   
            clippy::match_single_binding,
   83     84   
            clippy::diverging_sub_expression
   84     85   
        )]
   85         -
        deserializer.read_struct(&UPDATESPACEINPUT_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&UPDATESPACEINPUT_SCHEMA, &mut |member, deser| {
   86     87   
            match member.member_index() {
   87     88   
                Some(0) => {
   88     89   
                    builder.name = Some(deser.read_string(member)?);
   89     90   
                }
   90     91   
                Some(1) => {
   91     92   
                    builder.description = Some(deser.read_string(member)?);
   92     93   
                }
   93     94   
                _ => {}
   94     95   
            }
   95     96   
            Ok(())
   96     97   
        })?;
          98  +
        builder.name = builder.name.or(Some(String::new()));
   97     99   
        builder
   98    100   
            .build()
   99    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  100    102   
    }
  101    103   
}
         104  +
impl UpdateSpaceInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  102    115   
impl UpdateSpaceInput {
  103    116   
    /// Creates a new builder-style object to manufacture [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
  104    117   
    pub fn builder() -> crate::operation::update_space::builders::UpdateSpaceInputBuilder {
  105    118   
        crate::operation::update_space::builders::UpdateSpaceInputBuilder::default()
  106    119   
    }
  107    120   
}
  108    121   
  109    122   
/// A builder for [`UpdateSpaceInput`](crate::operation::update_space::UpdateSpaceInput).
  110    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    124   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/update_space/_update_space_output.rs

@@ -20,20 +138,189 @@
   40     40   
    "name",
   41     41   
    0,
   42     42   
);
   43     43   
static UPDATESPACEOUTPUT_MEMBER_DISPLAY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   44     44   
    ::aws_smithy_schema::ShapeId::from_static(
   45     45   
        "com.amazonaws.codecatalyst.synthetic#UpdateSpaceOutput$displayName",
   46     46   
        "com.amazonaws.codecatalyst.synthetic",
   47     47   
        "UpdateSpaceOutput",
   48     48   
    ),
   49     49   
    ::aws_smithy_schema::ShapeType::String,
   50         -
    "display_name",
          50  +
    "displayName",
   51     51   
    1,
   52     52   
);
   53     53   
static UPDATESPACEOUTPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   54     54   
    ::aws_smithy_schema::ShapeId::from_static(
   55     55   
        "com.amazonaws.codecatalyst.synthetic#UpdateSpaceOutput$description",
   56     56   
        "com.amazonaws.codecatalyst.synthetic",
   57     57   
        "UpdateSpaceOutput",
   58     58   
    ),
   59     59   
    ::aws_smithy_schema::ShapeType::String,
   60     60   
    "description",
   61     61   
    2,
   62     62   
);
          63  +
static UPDATESPACEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          65  +
    ::aws_smithy_schema::ShapeType::String,
          66  +
    "request_id",
          67  +
    3,
          68  +
)
          69  +
.with_http_header("x-amzn-requestid");
   63     70   
static UPDATESPACEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   64     71   
    UPDATESPACEOUTPUT_SCHEMA_ID,
   65     72   
    ::aws_smithy_schema::ShapeType::Structure,
   66     73   
    &[
   67     74   
        &UPDATESPACEOUTPUT_MEMBER_NAME,
   68     75   
        &UPDATESPACEOUTPUT_MEMBER_DISPLAY_NAME,
   69     76   
        &UPDATESPACEOUTPUT_MEMBER_DESCRIPTION,
          77  +
        &UPDATESPACEOUTPUT_MEMBER__REQUEST_ID,
   70     78   
    ],
   71     79   
);
   72     80   
impl UpdateSpaceOutput {
   73     81   
    /// The schema for this shape.
   74     82   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &UPDATESPACEOUTPUT_SCHEMA;
   75     83   
}
   76     84   
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateSpaceOutput {
   77     85   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   78     86   
    fn serialize_members(
   79     87   
        &self,
   80     88   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   81     89   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   82     90   
        if let Some(ref val) = self.name {
   83     91   
            ser.write_string(&UPDATESPACEOUTPUT_MEMBER_NAME, val)?;
   84     92   
        }
   85     93   
        if let Some(ref val) = self.display_name {
   86     94   
            ser.write_string(&UPDATESPACEOUTPUT_MEMBER_DISPLAY_NAME, val)?;
   87     95   
        }
   88     96   
        if let Some(ref val) = self.description {
   89     97   
            ser.write_string(&UPDATESPACEOUTPUT_MEMBER_DESCRIPTION, val)?;
   90     98   
        }
   91     99   
        Ok(())
   92    100   
    }
   93    101   
}
   94    102   
impl UpdateSpaceOutput {
   95    103   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   96         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   97         -
        deserializer: &mut D,
         104  +
    pub fn deserialize(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   98    106   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   99    107   
        #[allow(unused_variables, unused_mut)]
  100    108   
        let mut builder = Self::builder();
  101    109   
        #[allow(
  102    110   
            unused_variables,
  103    111   
            unreachable_code,
  104    112   
            clippy::single_match,
  105    113   
            clippy::match_single_binding,
  106    114   
            clippy::diverging_sub_expression
  107    115   
        )]
  108         -
        deserializer.read_struct(&UPDATESPACEOUTPUT_SCHEMA, (), |_, member, deser| {
         116  +
        deserializer.read_struct(&UPDATESPACEOUTPUT_SCHEMA, &mut |member, deser| {
         117  +
            match member.member_index() {
         118  +
                Some(0) => {
         119  +
                    builder.name = Some(deser.read_string(member)?);
         120  +
                }
         121  +
                Some(1) => {
         122  +
                    builder.display_name = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                Some(2) => {
         125  +
                    builder.description = Some(deser.read_string(member)?);
         126  +
                }
         127  +
                Some(3) => {
         128  +
                    builder._request_id = Some(deser.read_string(member)?);
         129  +
                }
         130  +
                _ => {}
         131  +
            }
         132  +
            Ok(())
         133  +
        })?;
         134  +
        Ok(builder.build())
         135  +
    }
         136  +
}
         137  +
impl UpdateSpaceOutput {
         138  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         139  +
    /// Header-bound members are read directly from headers, avoiding runtime
         140  +
    /// member iteration overhead. Body members are read via the deserializer.
         141  +
    pub fn deserialize_with_response(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         144  +
        _status: u16,
         145  +
        _body: &[u8],
         146  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         147  +
        #[allow(unused_variables, unused_mut)]
         148  +
        let mut builder = Self::builder();
         149  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         150  +
            builder._request_id = Some(val.to_string());
         151  +
        }
         152  +
        #[allow(
         153  +
            unused_variables,
         154  +
            unreachable_code,
         155  +
            clippy::single_match,
         156  +
            clippy::match_single_binding,
         157  +
            clippy::diverging_sub_expression
         158  +
        )]
         159  +
        deserializer.read_struct(&UPDATESPACEOUTPUT_SCHEMA, &mut |member, deser| {
  109    160   
            match member.member_index() {
  110    161   
                Some(0) => {
  111    162   
                    builder.name = Some(deser.read_string(member)?);
  112    163   
                }
  113    164   
                Some(1) => {
  114    165   
                    builder.display_name = Some(deser.read_string(member)?);
  115    166   
                }
  116    167   
                Some(2) => {
  117    168   
                    builder.description = Some(deser.read_string(member)?);
  118    169   
                }

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/verify_session.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `VerifySession`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct VerifySession;
    6      6   
impl VerifySession {
    7      7   
    /// Creates a new `VerifySession`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::verify_session::VerifySessionInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::verify_session::VerifySessionOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::verify_session::VerifySessionInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::verify_session::VerifySessionOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::verify_session::VerifySessionError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -108,112 +226,374 @@
  128    132   
                crate::operation::verify_session::VerifySessionError,
  129    133   
            >::new());
  130    134   
  131    135   
        ::std::borrow::Cow::Owned(rcb)
  132    136   
    }
  133    137   
}
  134    138   
  135    139   
#[derive(Debug)]
  136    140   
struct VerifySessionResponseDeserializer;
  137    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for VerifySessionResponseDeserializer {
  138         -
    fn deserialize_nonstreaming(
         142  +
    fn deserialize_nonstreaming_with_config(
  139    143   
        &self,
  140    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         145  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  141    146   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  142    147   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  143         -
        let headers = response.headers();
  144         -
        let body = response.body().bytes().expect("body loaded");
  145    148   
        #[allow(unused_mut)]
  146    149   
        let mut force_error = false;
  147    150   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  148         -
        let parse_result = if !success && status != 200 || force_error {
  149         -
            crate::protocol_serde::shape_verify_session::de_verify_session_http_error(status, headers, body)
         151  +
        if !success && status != 200 || force_error {
         152  +
            let headers = response.headers();
         153  +
            let body = response.body().bytes().expect("body loaded");
         154  +
            #[allow(unused_mut)]
         155  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         156  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         157  +
            })?;
         158  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         159  +
            let generic = generic_builder.build();
         160  +
            let error_code = match generic.code() {
         161  +
                ::std::option::Option::Some(code) => code,
         162  +
                ::std::option::Option::None => {
         163  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         164  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::verify_session::VerifySessionError::unhandled(generic)),
         165  +
                    ))
         166  +
                }
         167  +
            };
         168  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         169  +
            let protocol = _cfg
         170  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         171  +
                .expect("a SharedClientProtocol is required");
         172  +
            let err = match error_code {
         173  +
                "AccessDeniedException" => crate::operation::verify_session::VerifySessionError::AccessDeniedException({
         174  +
                    let mut tmp = match protocol
         175  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         176  +
                        .and_then(|mut deser| {
         177  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         178  +
                                &mut *deser,
         179  +
                                response.headers(),
         180  +
                                response.status().into(),
         181  +
                                body,
         182  +
                            )
         183  +
                        }) {
         184  +
                        ::std::result::Result::Ok(val) => val,
         185  +
                        ::std::result::Result::Err(e) => {
         186  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         187  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         188  +
                            ))
         189  +
                        }
         190  +
                    };
         191  +
                    tmp.meta = generic;
         192  +
                    tmp
         193  +
                }),
         194  +
                "ConflictException" => crate::operation::verify_session::VerifySessionError::ConflictException({
         195  +
                    let mut tmp = match protocol
         196  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         197  +
                        .and_then(|mut deser| {
         198  +
                            crate::types::error::ConflictException::deserialize_with_response(
         199  +
                                &mut *deser,
         200  +
                                response.headers(),
         201  +
                                response.status().into(),
         202  +
                                body,
         203  +
                            )
         204  +
                        }) {
         205  +
                        ::std::result::Result::Ok(val) => val,
         206  +
                        ::std::result::Result::Err(e) => {
         207  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         208  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         209  +
                            ))
         210  +
                        }
         211  +
                    };
         212  +
                    tmp.meta = generic;
         213  +
                    tmp
         214  +
                }),
         215  +
                "ResourceNotFoundException" => crate::operation::verify_session::VerifySessionError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    tmp
         235  +
                }),
         236  +
                "ServiceQuotaExceededException" => crate::operation::verify_session::VerifySessionError::ServiceQuotaExceededException({
         237  +
                    let mut tmp = match protocol
         238  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         239  +
                        .and_then(|mut deser| {
         240  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         241  +
                                &mut *deser,
         242  +
                                response.headers(),
         243  +
                                response.status().into(),
         244  +
                                body,
         245  +
                            )
         246  +
                        }) {
         247  +
                        ::std::result::Result::Ok(val) => val,
         248  +
                        ::std::result::Result::Err(e) => {
         249  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         250  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         251  +
                            ))
         252  +
                        }
         253  +
                    };
         254  +
                    tmp.meta = generic;
         255  +
                    tmp
         256  +
                }),
         257  +
                "ThrottlingException" => crate::operation::verify_session::VerifySessionError::ThrottlingException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    tmp
         277  +
                }),
         278  +
                "ValidationException" => crate::operation::verify_session::VerifySessionError::ValidationException({
         279  +
                    let mut tmp = match protocol
         280  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         281  +
                        .and_then(|mut deser| {
         282  +
                            crate::types::error::ValidationException::deserialize_with_response(
         283  +
                                &mut *deser,
         284  +
                                response.headers(),
         285  +
                                response.status().into(),
         286  +
                                body,
         287  +
                            )
         288  +
                        }) {
         289  +
                        ::std::result::Result::Ok(val) => val,
         290  +
                        ::std::result::Result::Err(e) => {
         291  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         292  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         293  +
                            ))
         294  +
                        }
         295  +
                    };
         296  +
                    tmp.meta = generic;
         297  +
                    tmp
         298  +
                }),
         299  +
                _ => crate::operation::verify_session::VerifySessionError::generic(generic),
         300  +
            };
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
  150    304   
        } else {
  151         -
            crate::protocol_serde::shape_verify_session::de_verify_session_http_response(status, headers, body)
  152         -
        };
  153         -
        crate::protocol_serde::type_erase_result(parse_result)
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol.deserialize_response(response, VerifySession::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         309  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         310  +
            })?;
         311  +
            let body = response.body().bytes().expect("body loaded");
         312  +
            let output = crate::operation::verify_session::VerifySessionOutput::deserialize_with_response(
         313  +
                &mut *deser,
         314  +
                response.headers(),
         315  +
                response.status().into(),
         316  +
                body,
         317  +
            )
         318  +
            .map_err(|e| {
         319  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         320  +
            })?;
         321  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         322  +
        }
  154    323   
    }
  155    324   
}
  156    325   
#[derive(Debug)]
  157    326   
struct VerifySessionRequestSerializer;
  158    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for VerifySessionRequestSerializer {
  159    328   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  160    329   
    fn serialize_input(
  161    330   
        &self,
  162    331   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  163    332   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  164    333   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  165    334   
        let input = input
  166    335   
            .downcast::<crate::operation::verify_session::VerifySessionInput>()
  167    336   
            .expect("correct type");
  168         -
        let _header_serialization_settings = _cfg
  169         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  170         -
            .cloned()
  171         -
            .unwrap_or_default();
  172         -
        let mut request_builder = {
  173         -
            #[allow(clippy::uninlined_format_args)]
  174         -
            fn uri_base(
  175         -
                _input: &crate::operation::verify_session::VerifySessionInput,
  176         -
                output: &mut ::std::string::String,
  177         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178         -
                use ::std::fmt::Write as _;
  179         -
                ::std::write!(output, "/session").expect("formatting should succeed");
  180         -
                ::std::result::Result::Ok(())
  181         -
            }
  182         -
            #[allow(clippy::unnecessary_wraps)]
  183         -
            fn update_http_builder(
  184         -
                input: &crate::operation::verify_session::VerifySessionInput,
  185         -
                builder: ::http_1x::request::Builder,
  186         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187         -
                let mut uri = ::std::string::String::new();
  188         -
                uri_base(input, &mut uri)?;
  189         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  190         -
            }
  191         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  192         -
            builder
  193         -
        };
  194         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        let mut request = protocol
         341  +
            .serialize_request(&input, VerifySession::INPUT_SCHEMA, "", _cfg)
         342  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  195    343   
  196         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         344  +
        return ::std::result::Result::Ok(request);
  197    345   
    }
  198    346   
}
  199    347   
#[derive(Debug)]
  200    348   
struct VerifySessionEndpointParamsInterceptor;
  201    349   
  202    350   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for VerifySessionEndpointParamsInterceptor {
  203    351   
    fn name(&self) -> &'static str {
  204    352   
        "VerifySessionEndpointParamsInterceptor"
  205    353   
    }
  206    354