AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36 (ignoring whitespace)

Files changed:

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

@@ -27,27 +228,247 @@
   47     47   
    "com.amazonaws.codecatalyst.synthetic",
   48     48   
    "ListEventLogsInput",
   49     49   
);
   50     50   
static LISTEVENTLOGSINPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   51     51   
    ::aws_smithy_schema::ShapeId::from_static(
   52     52   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsInput$spaceName",
   53     53   
        "com.amazonaws.codecatalyst.synthetic",
   54     54   
        "ListEventLogsInput",
   55     55   
    ),
   56     56   
    ::aws_smithy_schema::ShapeType::String,
   57         -
    "space_name",
          57  +
    "spaceName",
   58     58   
    0,
   59     59   
)
   60     60   
.with_http_label();
   61     61   
static LISTEVENTLOGSINPUT_MEMBER_START_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsInput$startTime",
   64     64   
        "com.amazonaws.codecatalyst.synthetic",
   65     65   
        "ListEventLogsInput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::Timestamp,
   68         -
    "start_time",
          68  +
    "startTime",
   69     69   
    1,
   70     70   
)
   71     71   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   72     72   
static LISTEVENTLOGSINPUT_MEMBER_END_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsInput$endTime",
   75     75   
        "com.amazonaws.codecatalyst.synthetic",
   76     76   
        "ListEventLogsInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::Timestamp,
   79         -
    "end_time",
          79  +
    "endTime",
   80     80   
    2,
   81     81   
)
   82     82   
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   83     83   
static LISTEVENTLOGSINPUT_MEMBER_EVENT_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#ListEventLogsInput$eventName",
   86     86   
        "com.amazonaws.codecatalyst.synthetic",
   87     87   
        "ListEventLogsInput",
   88     88   
    ),
   89     89   
    ::aws_smithy_schema::ShapeType::String,
   90         -
    "event_name",
          90  +
    "eventName",
   91     91   
    3,
   92     92   
);
   93     93   
static LISTEVENTLOGSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   94     94   
    ::aws_smithy_schema::ShapeId::from_static(
   95     95   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsInput$nextToken",
   96     96   
        "com.amazonaws.codecatalyst.synthetic",
   97     97   
        "ListEventLogsInput",
   98     98   
    ),
   99     99   
    ::aws_smithy_schema::ShapeType::String,
  100         -
    "next_token",
         100  +
    "nextToken",
  101    101   
    4,
  102    102   
);
  103    103   
static LISTEVENTLOGSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  104    104   
    ::aws_smithy_schema::ShapeId::from_static(
  105    105   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsInput$maxResults",
  106    106   
        "com.amazonaws.codecatalyst.synthetic",
  107    107   
        "ListEventLogsInput",
  108    108   
    ),
  109    109   
    ::aws_smithy_schema::ShapeType::Integer,
  110         -
    "max_results",
         110  +
    "maxResults",
  111    111   
    5,
  112    112   
);
  113    113   
static LISTEVENTLOGSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  114    114   
    LISTEVENTLOGSINPUT_SCHEMA_ID,
  115    115   
    ::aws_smithy_schema::ShapeType::Structure,
  116    116   
    &[
  117    117   
        &LISTEVENTLOGSINPUT_MEMBER_SPACE_NAME,
  118    118   
        &LISTEVENTLOGSINPUT_MEMBER_START_TIME,
  119    119   
        &LISTEVENTLOGSINPUT_MEMBER_END_TIME,
  120    120   
        &LISTEVENTLOGSINPUT_MEMBER_EVENT_NAME,
  121    121   
        &LISTEVENTLOGSINPUT_MEMBER_NEXT_TOKEN,
  122    122   
        &LISTEVENTLOGSINPUT_MEMBER_MAX_RESULTS,
  123    123   
    ],
  124         -
);
         124  +
)
         125  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         126  +
    "POST",
         127  +
    "/v1/spaces/{spaceName}/eventLogs",
         128  +
    None,
         129  +
));
  125    130   
impl ListEventLogsInput {
  126    131   
    /// The schema for this shape.
  127    132   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTEVENTLOGSINPUT_SCHEMA;
  128    133   
}
  129    134   
impl ::aws_smithy_schema::serde::SerializableStruct for ListEventLogsInput {
  130    135   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  131    136   
    fn serialize_members(
  132    137   
        &self,
  133    138   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  134    139   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  135    140   
        if let Some(ref val) = self.space_name {
  136    141   
            ser.write_string(&LISTEVENTLOGSINPUT_MEMBER_SPACE_NAME, val)?;
  137    142   
        }
  138    143   
        if let Some(ref val) = self.start_time {
  139    144   
            ser.write_timestamp(&LISTEVENTLOGSINPUT_MEMBER_START_TIME, val)?;
  140    145   
        }
  141    146   
        if let Some(ref val) = self.end_time {
  142    147   
            ser.write_timestamp(&LISTEVENTLOGSINPUT_MEMBER_END_TIME, val)?;
  143    148   
        }
  144    149   
        if let Some(ref val) = self.event_name {
  145    150   
            ser.write_string(&LISTEVENTLOGSINPUT_MEMBER_EVENT_NAME, val)?;
  146    151   
        }
  147    152   
        if let Some(ref val) = self.next_token {
  148    153   
            ser.write_string(&LISTEVENTLOGSINPUT_MEMBER_NEXT_TOKEN, val)?;
  149    154   
        }
  150    155   
        if let Some(ref val) = self.max_results {
  151    156   
            ser.write_integer(&LISTEVENTLOGSINPUT_MEMBER_MAX_RESULTS, *val)?;
  152    157   
        }
  153    158   
        Ok(())
  154    159   
    }
  155    160   
}
  156    161   
impl ListEventLogsInput {
  157    162   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  158         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  159         -
        deserializer: &mut D,
         163  +
    pub fn deserialize(
         164  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  160    165   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  161    166   
        #[allow(unused_variables, unused_mut)]
  162    167   
        let mut builder = Self::builder();
  163    168   
        #[allow(
  164    169   
            unused_variables,
  165    170   
            unreachable_code,
  166    171   
            clippy::single_match,
  167    172   
            clippy::match_single_binding,
  168    173   
            clippy::diverging_sub_expression
  169    174   
        )]
  170         -
        deserializer.read_struct(&LISTEVENTLOGSINPUT_SCHEMA, (), |_, member, deser| {
         175  +
        deserializer.read_struct(&LISTEVENTLOGSINPUT_SCHEMA, &mut |member, deser| {
  171    176   
            match member.member_index() {
  172    177   
                Some(0) => {
  173    178   
                    builder.space_name = Some(deser.read_string(member)?);
  174    179   
                }
  175    180   
                Some(1) => {
  176    181   
                    builder.start_time = Some(deser.read_timestamp(member)?);
  177    182   
                }
  178    183   
                Some(2) => {
  179    184   
                    builder.end_time = Some(deser.read_timestamp(member)?);
  180    185   
                }
  181    186   
                Some(3) => {
  182    187   
                    builder.event_name = Some(deser.read_string(member)?);
  183    188   
                }
  184    189   
                Some(4) => {
  185    190   
                    builder.next_token = Some(deser.read_string(member)?);
  186    191   
                }
  187    192   
                Some(5) => {
  188    193   
                    builder.max_results = Some(deser.read_integer(member)?);
  189    194   
                }
  190    195   
                _ => {}
  191    196   
            }
  192    197   
            Ok(())
  193    198   
        })?;
         199  +
        builder.space_name = builder.space_name.or(Some(String::new()));
         200  +
        builder.start_time = builder.start_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         201  +
        builder.end_time = builder.end_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
  194    202   
        builder
  195    203   
            .build()
  196    204   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  197    205   
    }
  198    206   
}
         207  +
impl ListEventLogsInput {
         208  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         209  +
    pub fn deserialize_with_response(
         210  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         211  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         212  +
        _status: u16,
         213  +
        _body: &[u8],
         214  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         215  +
        Self::deserialize(deserializer)
         216  +
    }
         217  +
}
  199    218   
impl ListEventLogsInput {
  200    219   
    /// Creates a new builder-style object to manufacture [`ListEventLogsInput`](crate::operation::list_event_logs::ListEventLogsInput).
  201    220   
    pub fn builder() -> crate::operation::list_event_logs::builders::ListEventLogsInputBuilder {
  202    221   
        crate::operation::list_event_logs::builders::ListEventLogsInputBuilder::default()
  203    222   
    }
  204    223   
}
  205    224   
  206    225   
/// A builder for [`ListEventLogsInput`](crate::operation::list_event_logs::ListEventLogsInput).
  207    226   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  208    227   
#[non_exhaustive]

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

@@ -5,5 +141,199 @@
   25     25   
    "com.amazonaws.codecatalyst.synthetic",
   26     26   
    "ListEventLogsOutput",
   27     27   
);
   28     28   
static LISTEVENTLOGSOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   29     29   
    ::aws_smithy_schema::ShapeId::from_static(
   30     30   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsOutput$nextToken",
   31     31   
        "com.amazonaws.codecatalyst.synthetic",
   32     32   
        "ListEventLogsOutput",
   33     33   
    ),
   34     34   
    ::aws_smithy_schema::ShapeType::String,
   35         -
    "next_token",
          35  +
    "nextToken",
   36     36   
    0,
   37     37   
);
   38     38   
static LISTEVENTLOGSOUTPUT_MEMBER_ITEMS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.codecatalyst.synthetic#ListEventLogsOutput$items",
   41     41   
        "com.amazonaws.codecatalyst.synthetic",
   42     42   
        "ListEventLogsOutput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::List,
   45     45   
    "items",
   46     46   
    1,
   47     47   
);
          48  +
static LISTEVENTLOGSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          49  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          50  +
    ::aws_smithy_schema::ShapeType::String,
          51  +
    "request_id",
          52  +
    2,
          53  +
)
          54  +
.with_http_header("x-amzn-requestid");
   48     55   
static LISTEVENTLOGSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     56   
    LISTEVENTLOGSOUTPUT_SCHEMA_ID,
   50     57   
    ::aws_smithy_schema::ShapeType::Structure,
   51         -
    &[&LISTEVENTLOGSOUTPUT_MEMBER_NEXT_TOKEN, &LISTEVENTLOGSOUTPUT_MEMBER_ITEMS],
          58  +
    &[
          59  +
        &LISTEVENTLOGSOUTPUT_MEMBER_NEXT_TOKEN,
          60  +
        &LISTEVENTLOGSOUTPUT_MEMBER_ITEMS,
          61  +
        &LISTEVENTLOGSOUTPUT_MEMBER__REQUEST_ID,
          62  +
    ],
   52     63   
);
   53     64   
impl ListEventLogsOutput {
   54     65   
    /// The schema for this shape.
   55     66   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTEVENTLOGSOUTPUT_SCHEMA;
   56     67   
}
   57     68   
impl ::aws_smithy_schema::serde::SerializableStruct for ListEventLogsOutput {
   58     69   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     70   
    fn serialize_members(
   60     71   
        &self,
   61     72   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     73   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     74   
        if let Some(ref val) = self.next_token {
   64     75   
            ser.write_string(&LISTEVENTLOGSOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   65     76   
        }
   66     77   
        {
   67     78   
            let val = &self.items;
   68     79   
   69     80   
            ser.write_list(
   70     81   
                &LISTEVENTLOGSOUTPUT_MEMBER_ITEMS,
   71     82   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   72     83   
                    for item in val {
   73     84   
                        ser.write_struct(crate::types::EventLogEntry::SCHEMA, item)?;
   74     85   
                    }
   75     86   
                    Ok(())
   76     87   
                },
   77     88   
            )?;
   78     89   
        }
   79     90   
        Ok(())
   80     91   
    }
   81     92   
}
   82     93   
impl ListEventLogsOutput {
   83     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   84         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   85         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          97  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          98  +
        #[allow(unused_variables, unused_mut)]
          99  +
        let mut builder = Self::builder();
         100  +
        #[allow(
         101  +
            unused_variables,
         102  +
            unreachable_code,
         103  +
            clippy::single_match,
         104  +
            clippy::match_single_binding,
         105  +
            clippy::diverging_sub_expression
         106  +
        )]
         107  +
        deserializer.read_struct(&LISTEVENTLOGSOUTPUT_SCHEMA, &mut |member, deser| {
         108  +
            match member.member_index() {
         109  +
                Some(0) => {
         110  +
                    builder.next_token = Some(deser.read_string(member)?);
         111  +
                }
         112  +
                Some(1) => {
         113  +
                    builder.items = Some({
         114  +
                        let mut container = Vec::new();
         115  +
                        deser.read_list(member, &mut |deser| {
         116  +
                            container.push(crate::types::EventLogEntry::deserialize(deser)?);
         117  +
                            Ok(())
         118  +
                        })?;
         119  +
                        container
         120  +
                    });
         121  +
                }
         122  +
                Some(2) => {
         123  +
                    builder._request_id = Some(deser.read_string(member)?);
         124  +
                }
         125  +
                _ => {}
         126  +
            }
         127  +
            Ok(())
         128  +
        })?;
         129  +
        builder.items = builder.items.or(Some(Vec::new()));
         130  +
        builder
         131  +
            .build()
         132  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         133  +
    }
         134  +
}
         135  +
impl ListEventLogsOutput {
         136  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         137  +
    /// Header-bound members are read directly from headers, avoiding runtime
         138  +
    /// member iteration overhead. Body members are read via the deserializer.
         139  +
    pub fn deserialize_with_response(
         140  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         141  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         142  +
        _status: u16,
         143  +
        _body: &[u8],
   86    144   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   87    145   
        #[allow(unused_variables, unused_mut)]
   88    146   
        let mut builder = Self::builder();
         147  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         148  +
            builder._request_id = Some(val.to_string());
         149  +
        }
   89    150   
        #[allow(
   90    151   
            unused_variables,
   91    152   
            unreachable_code,
   92    153   
            clippy::single_match,
   93    154   
            clippy::match_single_binding,
   94    155   
            clippy::diverging_sub_expression
   95    156   
        )]
   96         -
        deserializer.read_struct(&LISTEVENTLOGSOUTPUT_SCHEMA, (), |_, member, deser| {
         157  +
        deserializer.read_struct(&LISTEVENTLOGSOUTPUT_SCHEMA, &mut |member, deser| {
   97    158   
            match member.member_index() {
   98    159   
                Some(0) => {
   99    160   
                    builder.next_token = Some(deser.read_string(member)?);
  100    161   
                }
  101    162   
                Some(1) => {
  102    163   
                    builder.items = Some({
  103         -
                        let container = if let Some(cap) = deser.container_size() {
  104         -
                            Vec::with_capacity(cap)
  105         -
                        } else {
  106         -
                            Vec::new()
  107         -
                        };
  108         -
                        deser.read_list(member, container, |mut list, deser| {
  109         -
                            list.push(crate::types::EventLogEntry::deserialize(deser)?);
  110         -
                            Ok(list)
  111         -
                        })?
         164  +
                        let mut container = Vec::new();
         165  +
                        deser.read_list(member, &mut |deser| {
         166  +
                            container.push(crate::types::EventLogEntry::deserialize(deser)?);
         167  +
                            Ok(())
         168  +
                        })?;
         169  +
                        container
  112    170   
                    });
  113    171   
                }
  114    172   
                _ => {}
  115    173   
            }
  116    174   
            Ok(())
  117    175   
        })?;
  118    176   
        builder
  119    177   
            .build()
  120    178   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  121    179   
    }

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/list_projects.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 `ListProjects`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListProjects;
    6      6   
impl ListProjects {
    7      7   
    /// Creates a new `ListProjects`
    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::list_projects::ListProjectsInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_projects::ListProjectsOutput::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::list_projects::ListProjectsInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_projects::ListProjectsOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_projects::ListProjectsError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -111,115 +241,404 @@
  131    135   
        ::std::borrow::Cow::Owned(rcb)
  132    136   
    }
  133    137   
}
  134    138   
  135    139   
#[derive(Debug)]
  136    140   
struct ListProjectsResponseDeserializer;
  137    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListProjectsResponseDeserializer {
  138    142   
    fn deserialize_nonstreaming(
  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_list_projects::de_list_projects_http_error(status, headers, body)
  150         -
        } else {
  151         -
            crate::protocol_serde::shape_list_projects::de_list_projects_http_response(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::list_projects::ListProjectsError::unhandled(generic)),
         165  +
                    ))
         166  +
                }
  152    167   
            };
  153         -
        crate::protocol_serde::type_erase_result(parse_result)
         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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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::list_projects::ListProjectsError::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  +
            ))
         304  +
        } else {
         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, ListProjects::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::list_projects::ListProjectsOutput::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 ListProjectsRequestSerializer;
  158    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListProjectsRequestSerializer {
  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::list_projects::ListProjectsInput>()
  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::list_projects::ListProjectsInput,
  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         -
                    ));
         337  +
        let protocol = _cfg
         338  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         339  +
            .expect("a SharedClientProtocol is required");
         340  +
        if protocol.supports_http_bindings() {
         341  +
            let mut request = protocol
         342  +
                .serialize_body(&input, ListProjects::INPUT_SCHEMA, "", _cfg)
         343  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         344  +
            {
         345  +
                let mut uri = "/v1/spaces/{spaceName}/projects".to_string();
         346  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         347  +
                if let Some(ref val) = input.space_name {
         348  +
                    uri = uri.replace("{spaceName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         349  +
                }
         350  +
                if !query_params.is_empty() {
         351  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         352  +
                    let pairs: Vec<String> = query_params
         353  +
                        .iter()
         354  +
                        .map(|(k, v)| {
         355  +
                            format!(
         356  +
                                "{}={}",
         357  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         358  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         359  +
                            )
         360  +
                        })
         361  +
                        .collect();
         362  +
                    uri.push_str(&pairs.join("&"));
  189    363   
                }
  190         -
                ::std::write!(output, "/v1/spaces/{spaceName}/projects", spaceName = space_name).expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
         364  +
                request.set_uri(uri.as_str()).expect("valid URI");
  192    365   
            }
  193         -
            #[allow(clippy::unnecessary_wraps)]
  194         -
            fn update_http_builder(
  195         -
                input: &crate::operation::list_projects::ListProjectsInput,
  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("POST").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_list_projects::ser_list_projects_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);
         366  +
         367  +
            return ::std::result::Result::Ok(request);
         368  +
        } else {
         369  +
            let mut request = protocol
         370  +
                .serialize_request(&input, ListProjects::INPUT_SCHEMA, "", _cfg)
         371  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         372  +
         373  +
            return ::std::result::Result::Ok(request);
  210    374   
        }
  211         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  212    375   
    }
  213    376   
}
  214    377   
#[derive(Debug)]
  215    378   
struct ListProjectsEndpointParamsInterceptor;
  216    379   
  217    380   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListProjectsEndpointParamsInterceptor {
  218    381   
    fn name(&self) -> &'static str {
  219    382   
        "ListProjectsEndpointParamsInterceptor"
  220    383   
    }
  221    384   

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

@@ -17,17 +200,210 @@
   37     37   
    "com.amazonaws.codecatalyst.synthetic",
   38     38   
    "ListProjectsInput",
   39     39   
);
   40     40   
static LISTPROJECTSINPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "com.amazonaws.codecatalyst.synthetic#ListProjectsInput$spaceName",
   43     43   
        "com.amazonaws.codecatalyst.synthetic",
   44     44   
        "ListProjectsInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::String,
   47         -
    "space_name",
          47  +
    "spaceName",
   48     48   
    0,
   49     49   
)
   50     50   
.with_http_label();
   51     51   
static LISTPROJECTSINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   52     52   
    ::aws_smithy_schema::ShapeId::from_static(
   53     53   
        "com.amazonaws.codecatalyst.synthetic#ListProjectsInput$nextToken",
   54     54   
        "com.amazonaws.codecatalyst.synthetic",
   55     55   
        "ListProjectsInput",
   56     56   
    ),
   57     57   
    ::aws_smithy_schema::ShapeType::String,
   58         -
    "next_token",
          58  +
    "nextToken",
   59     59   
    1,
   60     60   
);
   61     61   
static LISTPROJECTSINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   62     62   
    ::aws_smithy_schema::ShapeId::from_static(
   63     63   
        "com.amazonaws.codecatalyst.synthetic#ListProjectsInput$maxResults",
   64     64   
        "com.amazonaws.codecatalyst.synthetic",
   65     65   
        "ListProjectsInput",
   66     66   
    ),
   67     67   
    ::aws_smithy_schema::ShapeType::Integer,
   68         -
    "max_results",
          68  +
    "maxResults",
   69     69   
    2,
   70     70   
);
   71     71   
static LISTPROJECTSINPUT_MEMBER_FILTERS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   72     72   
    ::aws_smithy_schema::ShapeId::from_static(
   73     73   
        "com.amazonaws.codecatalyst.synthetic#ListProjectsInput$filters",
   74     74   
        "com.amazonaws.codecatalyst.synthetic",
   75     75   
        "ListProjectsInput",
   76     76   
    ),
   77     77   
    ::aws_smithy_schema::ShapeType::List,
   78     78   
    "filters",
   79     79   
    3,
   80     80   
);
   81     81   
static LISTPROJECTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   82     82   
    LISTPROJECTSINPUT_SCHEMA_ID,
   83     83   
    ::aws_smithy_schema::ShapeType::Structure,
   84     84   
    &[
   85     85   
        &LISTPROJECTSINPUT_MEMBER_SPACE_NAME,
   86     86   
        &LISTPROJECTSINPUT_MEMBER_NEXT_TOKEN,
   87     87   
        &LISTPROJECTSINPUT_MEMBER_MAX_RESULTS,
   88     88   
        &LISTPROJECTSINPUT_MEMBER_FILTERS,
   89     89   
    ],
   90         -
);
          90  +
)
          91  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/v1/spaces/{spaceName}/projects", None));
   91     92   
impl ListProjectsInput {
   92     93   
    /// The schema for this shape.
   93     94   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTPROJECTSINPUT_SCHEMA;
   94     95   
}
   95     96   
impl ::aws_smithy_schema::serde::SerializableStruct for ListProjectsInput {
   96     97   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   97     98   
    fn serialize_members(
   98     99   
        &self,
   99    100   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  100    101   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  101    102   
        if let Some(ref val) = self.space_name {
  102    103   
            ser.write_string(&LISTPROJECTSINPUT_MEMBER_SPACE_NAME, val)?;
  103    104   
        }
  104    105   
        if let Some(ref val) = self.next_token {
  105    106   
            ser.write_string(&LISTPROJECTSINPUT_MEMBER_NEXT_TOKEN, val)?;
  106    107   
        }
  107    108   
        if let Some(ref val) = self.max_results {
  108    109   
            ser.write_integer(&LISTPROJECTSINPUT_MEMBER_MAX_RESULTS, *val)?;
  109    110   
        }
  110    111   
        if let Some(ref val) = self.filters {
  111    112   
            ser.write_list(
  112    113   
                &LISTPROJECTSINPUT_MEMBER_FILTERS,
  113    114   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  114    115   
                    for item in val {
  115    116   
                        ser.write_struct(crate::types::ProjectListFilter::SCHEMA, item)?;
  116    117   
                    }
  117    118   
                    Ok(())
  118    119   
                },
  119    120   
            )?;
  120    121   
        }
  121    122   
        Ok(())
  122    123   
    }
  123    124   
}
  124    125   
impl ListProjectsInput {
  125    126   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  126         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  127         -
        deserializer: &mut D,
         127  +
    pub fn deserialize(
         128  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  128    129   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  129    130   
        #[allow(unused_variables, unused_mut)]
  130    131   
        let mut builder = Self::builder();
  131    132   
        #[allow(
  132    133   
            unused_variables,
  133    134   
            unreachable_code,
  134    135   
            clippy::single_match,
  135    136   
            clippy::match_single_binding,
  136    137   
            clippy::diverging_sub_expression
  137    138   
        )]
  138         -
        deserializer.read_struct(&LISTPROJECTSINPUT_SCHEMA, (), |_, member, deser| {
         139  +
        deserializer.read_struct(&LISTPROJECTSINPUT_SCHEMA, &mut |member, deser| {
  139    140   
            match member.member_index() {
  140    141   
                Some(0) => {
  141    142   
                    builder.space_name = Some(deser.read_string(member)?);
  142    143   
                }
  143    144   
                Some(1) => {
  144    145   
                    builder.next_token = Some(deser.read_string(member)?);
  145    146   
                }
  146    147   
                Some(2) => {
  147    148   
                    builder.max_results = Some(deser.read_integer(member)?);
  148    149   
                }
  149    150   
                Some(3) => {
  150    151   
                    builder.filters = Some({
  151         -
                        let container = if let Some(cap) = deser.container_size() {
  152         -
                            Vec::with_capacity(cap)
  153         -
                        } else {
  154         -
                            Vec::new()
  155         -
                        };
  156         -
                        deser.read_list(member, container, |mut list, deser| {
  157         -
                            list.push(crate::types::ProjectListFilter::deserialize(deser)?);
  158         -
                            Ok(list)
  159         -
                        })?
         152  +
                        let mut container = Vec::new();
         153  +
                        deser.read_list(member, &mut |deser| {
         154  +
                            container.push(crate::types::ProjectListFilter::deserialize(deser)?);
         155  +
                            Ok(())
         156  +
                        })?;
         157  +
                        container
  160    158   
                    });
  161    159   
                }
  162    160   
                _ => {}
  163    161   
            }
  164    162   
            Ok(())
  165    163   
        })?;
         164  +
        builder.space_name = builder.space_name.or(Some(String::new()));
  166    165   
        builder
  167    166   
            .build()
  168    167   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  169    168   
    }
  170    169   
}
         170  +
impl ListProjectsInput {
         171  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         172  +
    pub fn deserialize_with_response(
         173  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         174  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         175  +
        _status: u16,
         176  +
        _body: &[u8],
         177  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         178  +
        Self::deserialize(deserializer)
         179  +
    }
         180  +
}
  171    181   
impl ListProjectsInput {
  172    182   
    /// Creates a new builder-style object to manufacture [`ListProjectsInput`](crate::operation::list_projects::ListProjectsInput).
  173    183   
    pub fn builder() -> crate::operation::list_projects::builders::ListProjectsInputBuilder {
  174    184   
        crate::operation::list_projects::builders::ListProjectsInputBuilder::default()
  175    185   
    }
  176    186   
}
  177    187   
  178    188   
/// A builder for [`ListProjectsInput`](crate::operation::list_projects::ListProjectsInput).
  179    189   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  180    190   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/list_source_repositories.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 `ListSourceRepositories`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListSourceRepositories;
    6      6   
impl ListSourceRepositories {
    7      7   
    /// Creates a new `ListSourceRepositories`
    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::list_source_repositories::ListSourceRepositoriesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_source_repositories::ListSourceRepositoriesOutput::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::list_source_repositories::ListSourceRepositoriesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_source_repositories::ListSourceRepositoriesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_source_repositories::ListSourceRepositoriesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -117,121 +266,419 @@
  137    141   
        ::std::borrow::Cow::Owned(rcb)
  138    142   
    }
  139    143   
}
  140    144   
  141    145   
#[derive(Debug)]
  142    146   
struct ListSourceRepositoriesResponseDeserializer;
  143    147   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListSourceRepositoriesResponseDeserializer {
  144    148   
    fn deserialize_nonstreaming(
  145    149   
        &self,
  146    150   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         151  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  147    152   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  148    153   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  149         -
        let headers = response.headers();
  150         -
        let body = response.body().bytes().expect("body loaded");
  151    154   
        #[allow(unused_mut)]
  152    155   
        let mut force_error = false;
  153    156   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  154         -
        let parse_result = if !success && status != 200 || force_error {
  155         -
            crate::protocol_serde::shape_list_source_repositories::de_list_source_repositories_http_error(status, headers, body)
  156         -
        } else {
  157         -
            crate::protocol_serde::shape_list_source_repositories::de_list_source_repositories_http_response(status, headers, body)
         157  +
        if !success && status != 200 || force_error {
         158  +
            let headers = response.headers();
         159  +
            let body = response.body().bytes().expect("body loaded");
         160  +
            #[allow(unused_mut)]
         161  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         162  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         163  +
            })?;
         164  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         165  +
            let generic = generic_builder.build();
         166  +
            let error_code = match generic.code() {
         167  +
                ::std::option::Option::Some(code) => code,
         168  +
                ::std::option::Option::None => {
         169  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         170  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         171  +
                            crate::operation::list_source_repositories::ListSourceRepositoriesError::unhandled(generic),
         172  +
                        ),
         173  +
                    ))
         174  +
                }
  158    175   
            };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         176  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         177  +
            let protocol = _cfg
         178  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         179  +
                .expect("a SharedClientProtocol is required");
         180  +
            let err = match error_code {
         181  +
                "AccessDeniedException" => crate::operation::list_source_repositories::ListSourceRepositoriesError::AccessDeniedException({
         182  +
                    let mut tmp = match protocol
         183  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         184  +
                        .and_then(|mut deser| {
         185  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         186  +
                                &mut *deser,
         187  +
                                response.headers(),
         188  +
                                response.status().into(),
         189  +
                                body,
         190  +
                            )
         191  +
                        }) {
         192  +
                        ::std::result::Result::Ok(val) => val,
         193  +
                        ::std::result::Result::Err(e) => {
         194  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         195  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         196  +
                            ))
         197  +
                        }
         198  +
                    };
         199  +
                    tmp.meta = generic;
         200  +
                    tmp
         201  +
                }),
         202  +
                "ConflictException" => crate::operation::list_source_repositories::ListSourceRepositoriesError::ConflictException({
         203  +
                    let mut tmp = match protocol
         204  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         205  +
                        .and_then(|mut deser| {
         206  +
                            crate::types::error::ConflictException::deserialize_with_response(
         207  +
                                &mut *deser,
         208  +
                                response.headers(),
         209  +
                                response.status().into(),
         210  +
                                body,
         211  +
                            )
         212  +
                        }) {
         213  +
                        ::std::result::Result::Ok(val) => val,
         214  +
                        ::std::result::Result::Err(e) => {
         215  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         216  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         217  +
                            ))
         218  +
                        }
         219  +
                    };
         220  +
                    tmp.meta = generic;
         221  +
                    tmp
         222  +
                }),
         223  +
                "ResourceNotFoundException" => crate::operation::list_source_repositories::ListSourceRepositoriesError::ResourceNotFoundException({
         224  +
                    let mut tmp = match protocol
         225  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         226  +
                        .and_then(|mut deser| {
         227  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         228  +
                                &mut *deser,
         229  +
                                response.headers(),
         230  +
                                response.status().into(),
         231  +
                                body,
         232  +
                            )
         233  +
                        }) {
         234  +
                        ::std::result::Result::Ok(val) => val,
         235  +
                        ::std::result::Result::Err(e) => {
         236  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         237  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         238  +
                            ))
         239  +
                        }
         240  +
                    };
         241  +
                    tmp.meta = generic;
         242  +
                    tmp
         243  +
                }),
         244  +
                "ServiceQuotaExceededException" => {
         245  +
                    crate::operation::list_source_repositories::ListSourceRepositoriesError::ServiceQuotaExceededException({
         246  +
                        let mut tmp = match protocol
         247  +
                            .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         248  +
                            .and_then(|mut deser| {
         249  +
                                crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         250  +
                                    &mut *deser,
         251  +
                                    response.headers(),
         252  +
                                    response.status().into(),
         253  +
                                    body,
         254  +
                                )
         255  +
                            }) {
         256  +
                            ::std::result::Result::Ok(val) => val,
         257  +
                            ::std::result::Result::Err(e) => {
         258  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         259  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         260  +
                                ))
         261  +
                            }
         262  +
                        };
         263  +
                        tmp.meta = generic;
         264  +
                        tmp
         265  +
                    })
         266  +
                }
         267  +
                "ThrottlingException" => crate::operation::list_source_repositories::ListSourceRepositoriesError::ThrottlingException({
         268  +
                    let mut tmp = match protocol
         269  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         270  +
                        .and_then(|mut deser| {
         271  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         272  +
                                &mut *deser,
         273  +
                                response.headers(),
         274  +
                                response.status().into(),
         275  +
                                body,
         276  +
                            )
         277  +
                        }) {
         278  +
                        ::std::result::Result::Ok(val) => val,
         279  +
                        ::std::result::Result::Err(e) => {
         280  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         281  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         282  +
                            ))
         283  +
                        }
         284  +
                    };
         285  +
                    tmp.meta = generic;
         286  +
                    tmp
         287  +
                }),
         288  +
                "ValidationException" => crate::operation::list_source_repositories::ListSourceRepositoriesError::ValidationException({
         289  +
                    let mut tmp = match protocol
         290  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         291  +
                        .and_then(|mut deser| {
         292  +
                            crate::types::error::ValidationException::deserialize_with_response(
         293  +
                                &mut *deser,
         294  +
                                response.headers(),
         295  +
                                response.status().into(),
         296  +
                                body,
         297  +
                            )
         298  +
                        }) {
         299  +
                        ::std::result::Result::Ok(val) => val,
         300  +
                        ::std::result::Result::Err(e) => {
         301  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         302  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         303  +
                            ))
         304  +
                        }
         305  +
                    };
         306  +
                    tmp.meta = generic;
         307  +
                    tmp
         308  +
                }),
         309  +
                _ => crate::operation::list_source_repositories::ListSourceRepositoriesError::generic(generic),
         310  +
            };
         311  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         312  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         313  +
            ))
         314  +
        } else {
         315  +
            let protocol = _cfg
         316  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         317  +
                .expect("a SharedClientProtocol is required");
         318  +
            let mut deser = protocol
         319  +
                .deserialize_response(response, ListSourceRepositories::OUTPUT_SCHEMA, _cfg)
         320  +
                .map_err(|e| {
         321  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         322  +
                })?;
         323  +
            let body = response.body().bytes().expect("body loaded");
         324  +
            let output = crate::operation::list_source_repositories::ListSourceRepositoriesOutput::deserialize_with_response(
         325  +
                &mut *deser,
         326  +
                response.headers(),
         327  +
                response.status().into(),
         328  +
                body,
         329  +
            )
         330  +
            .map_err(|e| {
         331  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         332  +
            })?;
         333  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         334  +
        }
  160    335   
    }
  161    336   
}
  162    337   
#[derive(Debug)]
  163    338   
struct ListSourceRepositoriesRequestSerializer;
  164    339   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListSourceRepositoriesRequestSerializer {
  165    340   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  166    341   
    fn serialize_input(
  167    342   
        &self,
  168    343   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  169    344   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  170    345   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  171    346   
        let input = input
  172    347   
            .downcast::<crate::operation::list_source_repositories::ListSourceRepositoriesInput>()
  173    348   
            .expect("correct type");
  174         -
        let _header_serialization_settings = _cfg
  175         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  176         -
            .cloned()
  177         -
            .unwrap_or_default();
  178         -
        let mut request_builder = {
  179         -
            #[allow(clippy::uninlined_format_args)]
  180         -
            fn uri_base(
  181         -
                _input: &crate::operation::list_source_repositories::ListSourceRepositoriesInput,
  182         -
                output: &mut ::std::string::String,
  183         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184         -
                use ::std::fmt::Write as _;
  185         -
                let input_1 = &_input.space_name;
  186         -
                let input_1 = input_1
  187         -
                    .as_ref()
  188         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("space_name", "cannot be empty or unset"))?;
  189         -
                let space_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  190         -
                if space_name.is_empty() {
  191         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  192         -
                        "space_name",
  193         -
                        "cannot be empty or unset",
  194         -
                    ));
         349  +
        let protocol = _cfg
         350  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         351  +
            .expect("a SharedClientProtocol is required");
         352  +
        if protocol.supports_http_bindings() {
         353  +
            let mut request = protocol
         354  +
                .serialize_body(&input, ListSourceRepositories::INPUT_SCHEMA, "", _cfg)
         355  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         356  +
            {
         357  +
                let mut uri = "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories".to_string();
         358  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         359  +
                if let Some(ref val) = input.space_name {
         360  +
                    uri = uri.replace("{spaceName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         361  +
                }
         362  +
                if let Some(ref val) = input.project_name {
         363  +
                    uri = uri.replace("{projectName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         364  +
                }
         365  +
                if !query_params.is_empty() {
         366  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         367  +
                    let pairs: Vec<String> = query_params
         368  +
                        .iter()
         369  +
                        .map(|(k, v)| {
         370  +
                            format!(
         371  +
                                "{}={}",
         372  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         373  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         374  +
                            )
         375  +
                        })
         376  +
                        .collect();
         377  +
                    uri.push_str(&pairs.join("&"));
  195    378   
                }
  196         -
                let input_2 = &_input.project_name;
  197         -
                let input_2 = input_2
  198         -
                    .as_ref()
  199         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("project_name", "cannot be empty or unset"))?;
  200         -
                let project_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  201         -
                if project_name.is_empty() {
  202         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  203         -
                        "project_name",
  204         -
                        "cannot be empty or unset",
  205         -
                    ));
         379  +
                request.set_uri(uri.as_str()).expect("valid URI");
  206    380   
            }
  207         -
                ::std::write!(
  208         -
                    output,
  209         -
                    "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories",
  210         -
                    spaceName = space_name,
  211         -
                    projectName = project_name
  212         -
                )
  213         -
                .expect("formatting should succeed");
  214         -
                ::std::result::Result::Ok(())
         381  +
         382  +
            return ::std::result::Result::Ok(request);
         383  +
        } else {
         384  +
            let mut request = protocol
         385  +
                .serialize_request(&input, ListSourceRepositories::INPUT_SCHEMA, "", _cfg)
         386  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         387  +
         388  +
            return ::std::result::Result::Ok(request);
  215    389   
        }
  216         -
            #[allow(clippy::unnecessary_wraps)]
  217         -
            fn update_http_builder(
  218         -
                input: &crate::operation::list_source_repositories::ListSourceRepositoriesInput,
  219         -
                builder: ::http_1x::request::Builder,
  220         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  221         -
                let mut uri = ::std::string::String::new();
  222         -
                uri_base(input, &mut uri)?;
  223         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  224         -
            }
  225         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  226         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  227         -
            builder
  228         -
        };
  229         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  230         -
            crate::protocol_serde::shape_list_source_repositories::ser_list_source_repositories_input(&input)?,
  231         -
        );
  232         -
        if let Some(content_length) = body.content_length() {
  233         -
            let content_length = content_length.to_string();
  234         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  235         -
        }
  236         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  237    390   
    }
  238    391   
}
  239    392   
#[derive(Debug)]
  240    393   
struct ListSourceRepositoriesEndpointParamsInterceptor;
  241    394   
  242    395   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListSourceRepositoriesEndpointParamsInterceptor {
  243    396   
    fn name(&self) -> &'static str {
  244    397   
        "ListSourceRepositoriesEndpointParamsInterceptor"
  245    398   
    }
  246    399   

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

@@ -15,15 +181,199 @@
   35     35   
    "com.amazonaws.codecatalyst.synthetic",
   36     36   
    "ListSourceRepositoriesInput",
   37     37   
);
   38     38   
static LISTSOURCEREPOSITORIESINPUT_MEMBER_SPACE_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.codecatalyst.synthetic#ListSourceRepositoriesInput$spaceName",
   41     41   
        "com.amazonaws.codecatalyst.synthetic",
   42     42   
        "ListSourceRepositoriesInput",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::String,
   45         -
    "space_name",
          45  +
    "spaceName",
   46     46   
    0,
   47     47   
)
   48     48   
.with_http_label();
   49     49   
static LISTSOURCEREPOSITORIESINPUT_MEMBER_PROJECT_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#ListSourceRepositoriesInput$projectName",
   52     52   
        "com.amazonaws.codecatalyst.synthetic",
   53     53   
        "ListSourceRepositoriesInput",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::String,
   56         -
    "project_name",
          56  +
    "projectName",
   57     57   
    1,
   58     58   
)
   59     59   
.with_http_label();
   60     60   
static LISTSOURCEREPOSITORIESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.codecatalyst.synthetic#ListSourceRepositoriesInput$nextToken",
   63     63   
        "com.amazonaws.codecatalyst.synthetic",
   64     64   
        "ListSourceRepositoriesInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "next_token",
          67  +
    "nextToken",
   68     68   
    2,
   69     69   
);
   70     70   
static LISTSOURCEREPOSITORIESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.codecatalyst.synthetic#ListSourceRepositoriesInput$maxResults",
   73     73   
        "com.amazonaws.codecatalyst.synthetic",
   74     74   
        "ListSourceRepositoriesInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::Integer,
   77         -
    "max_results",
          77  +
    "maxResults",
   78     78   
    3,
   79     79   
);
   80     80   
static LISTSOURCEREPOSITORIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   81     81   
    LISTSOURCEREPOSITORIESINPUT_SCHEMA_ID,
   82     82   
    ::aws_smithy_schema::ShapeType::Structure,
   83     83   
    &[
   84     84   
        &LISTSOURCEREPOSITORIESINPUT_MEMBER_SPACE_NAME,
   85     85   
        &LISTSOURCEREPOSITORIESINPUT_MEMBER_PROJECT_NAME,
   86     86   
        &LISTSOURCEREPOSITORIESINPUT_MEMBER_NEXT_TOKEN,
   87     87   
        &LISTSOURCEREPOSITORIESINPUT_MEMBER_MAX_RESULTS,
   88     88   
    ],
   89         -
);
          89  +
)
          90  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          91  +
    "POST",
          92  +
    "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories",
          93  +
    None,
          94  +
));
   90     95   
impl ListSourceRepositoriesInput {
   91     96   
    /// The schema for this shape.
   92     97   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTSOURCEREPOSITORIESINPUT_SCHEMA;
   93     98   
}
   94     99   
impl ::aws_smithy_schema::serde::SerializableStruct for ListSourceRepositoriesInput {
   95    100   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   96    101   
    fn serialize_members(
   97    102   
        &self,
   98    103   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   99    104   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  100    105   
        if let Some(ref val) = self.space_name {
  101    106   
            ser.write_string(&LISTSOURCEREPOSITORIESINPUT_MEMBER_SPACE_NAME, val)?;
  102    107   
        }
  103    108   
        if let Some(ref val) = self.project_name {
  104    109   
            ser.write_string(&LISTSOURCEREPOSITORIESINPUT_MEMBER_PROJECT_NAME, val)?;
  105    110   
        }
  106    111   
        if let Some(ref val) = self.next_token {
  107    112   
            ser.write_string(&LISTSOURCEREPOSITORIESINPUT_MEMBER_NEXT_TOKEN, val)?;
  108    113   
        }
  109    114   
        if let Some(ref val) = self.max_results {
  110    115   
            ser.write_integer(&LISTSOURCEREPOSITORIESINPUT_MEMBER_MAX_RESULTS, *val)?;
  111    116   
        }
  112    117   
        Ok(())
  113    118   
    }
  114    119   
}
  115    120   
impl ListSourceRepositoriesInput {
  116    121   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  117         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  118         -
        deserializer: &mut D,
         122  +
    pub fn deserialize(
         123  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  119    124   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  120    125   
        #[allow(unused_variables, unused_mut)]
  121    126   
        let mut builder = Self::builder();
  122    127   
        #[allow(
  123    128   
            unused_variables,
  124    129   
            unreachable_code,
  125    130   
            clippy::single_match,
  126    131   
            clippy::match_single_binding,
  127    132   
            clippy::diverging_sub_expression
  128    133   
        )]
  129         -
        deserializer.read_struct(&LISTSOURCEREPOSITORIESINPUT_SCHEMA, (), |_, member, deser| {
         134  +
        deserializer.read_struct(&LISTSOURCEREPOSITORIESINPUT_SCHEMA, &mut |member, deser| {
  130    135   
            match member.member_index() {
  131    136   
                Some(0) => {
  132    137   
                    builder.space_name = Some(deser.read_string(member)?);
  133    138   
                }
  134    139   
                Some(1) => {
  135    140   
                    builder.project_name = Some(deser.read_string(member)?);
  136    141   
                }
  137    142   
                Some(2) => {
  138    143   
                    builder.next_token = Some(deser.read_string(member)?);
  139    144   
                }
  140    145   
                Some(3) => {
  141    146   
                    builder.max_results = Some(deser.read_integer(member)?);
  142    147   
                }
  143    148   
                _ => {}
  144    149   
            }
  145    150   
            Ok(())
  146    151   
        })?;
         152  +
        builder.space_name = builder.space_name.or(Some(String::new()));
         153  +
        builder.project_name = builder.project_name.or(Some(String::new()));
  147    154   
        builder
  148    155   
            .build()
  149    156   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  150    157   
    }
  151    158   
}
         159  +
impl ListSourceRepositoriesInput {
         160  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         161  +
    pub fn deserialize_with_response(
         162  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         163  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         164  +
        _status: u16,
         165  +
        _body: &[u8],
         166  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         167  +
        Self::deserialize(deserializer)
         168  +
    }
         169  +
}
  152    170   
impl ListSourceRepositoriesInput {
  153    171   
    /// Creates a new builder-style object to manufacture [`ListSourceRepositoriesInput`](crate::operation::list_source_repositories::ListSourceRepositoriesInput).
  154    172   
    pub fn builder() -> crate::operation::list_source_repositories::builders::ListSourceRepositoriesInputBuilder {
  155    173   
        crate::operation::list_source_repositories::builders::ListSourceRepositoriesInputBuilder::default()
  156    174   
    }
  157    175   
}
  158    176   
  159    177   
/// A builder for [`ListSourceRepositoriesInput`](crate::operation::list_source_repositories::ListSourceRepositoriesInput).
  160    178   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  161    179   
#[non_exhaustive]

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

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

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

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListSourceRepositoryBranches`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListSourceRepositoryBranches;
    6      6   
impl ListSourceRepositoryBranches {
    7      7   
    /// Creates a new `ListSourceRepositoryBranches`
    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 =
          13  +
        crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -117,123 +278,431 @@
  137    143   
        ::std::borrow::Cow::Owned(rcb)
  138    144   
    }
  139    145   
}
  140    146   
  141    147   
#[derive(Debug)]
  142    148   
struct ListSourceRepositoryBranchesResponseDeserializer;
  143    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListSourceRepositoryBranchesResponseDeserializer {
  144    150   
    fn deserialize_nonstreaming(
  145    151   
        &self,
  146    152   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         153  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  147    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  148    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  149         -
        let headers = response.headers();
  150         -
        let body = response.body().bytes().expect("body loaded");
  151    156   
        #[allow(unused_mut)]
  152    157   
        let mut force_error = false;
  153    158   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  154         -
        let parse_result = if !success && status != 200 || force_error {
  155         -
            crate::protocol_serde::shape_list_source_repository_branches::de_list_source_repository_branches_http_error(status, headers, body)
  156         -
        } else {
  157         -
            crate::protocol_serde::shape_list_source_repository_branches::de_list_source_repository_branches_http_response(status, headers, body)
         159  +
        if !success && status != 200 || force_error {
         160  +
            let headers = response.headers();
         161  +
            let body = response.body().bytes().expect("body loaded");
         162  +
            #[allow(unused_mut)]
         163  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         164  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         165  +
            })?;
         166  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         167  +
            let generic = generic_builder.build();
         168  +
            let error_code = match generic.code() {
         169  +
                ::std::option::Option::Some(code) => code,
         170  +
                ::std::option::Option::None => {
         171  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         172  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         173  +
                            crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::unhandled(generic),
         174  +
                        ),
         175  +
                    ))
         176  +
                }
         177  +
            };
         178  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         179  +
            let protocol = _cfg
         180  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         181  +
                .expect("a SharedClientProtocol is required");
         182  +
            let err = match error_code {
         183  +
                "AccessDeniedException" => {
         184  +
                    crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::AccessDeniedException({
         185  +
                        let mut tmp = match protocol
         186  +
                            .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         187  +
                            .and_then(|mut deser| {
         188  +
                                crate::types::error::AccessDeniedException::deserialize_with_response(
         189  +
                                    &mut *deser,
         190  +
                                    response.headers(),
         191  +
                                    response.status().into(),
         192  +
                                    body,
         193  +
                                )
         194  +
                            }) {
         195  +
                            ::std::result::Result::Ok(val) => val,
         196  +
                            ::std::result::Result::Err(e) => {
         197  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         198  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         199  +
                                ))
         200  +
                            }
         201  +
                        };
         202  +
                        tmp.meta = generic;
         203  +
                        tmp
         204  +
                    })
         205  +
                }
         206  +
                "ConflictException" => crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::ConflictException({
         207  +
                    let mut tmp = match protocol
         208  +
                        .deserialize_response(response, crate::types::error::ConflictException::SCHEMA, _cfg)
         209  +
                        .and_then(|mut deser| {
         210  +
                            crate::types::error::ConflictException::deserialize_with_response(
         211  +
                                &mut *deser,
         212  +
                                response.headers(),
         213  +
                                response.status().into(),
         214  +
                                body,
         215  +
                            )
         216  +
                        }) {
         217  +
                        ::std::result::Result::Ok(val) => val,
         218  +
                        ::std::result::Result::Err(e) => {
         219  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         220  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         221  +
                            ))
         222  +
                        }
         223  +
                    };
         224  +
                    tmp.meta = generic;
         225  +
                    tmp
         226  +
                }),
         227  +
                "ResourceNotFoundException" => {
         228  +
                    crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::ResourceNotFoundException({
         229  +
                        let mut tmp = match protocol
         230  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         231  +
                            .and_then(|mut deser| {
         232  +
                                crate::types::error::ResourceNotFoundException::deserialize_with_response(
         233  +
                                    &mut *deser,
         234  +
                                    response.headers(),
         235  +
                                    response.status().into(),
         236  +
                                    body,
         237  +
                                )
         238  +
                            }) {
         239  +
                            ::std::result::Result::Ok(val) => val,
         240  +
                            ::std::result::Result::Err(e) => {
         241  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         242  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         243  +
                                ))
         244  +
                            }
         245  +
                        };
         246  +
                        tmp.meta = generic;
         247  +
                        tmp
         248  +
                    })
         249  +
                }
         250  +
                "ServiceQuotaExceededException" => {
         251  +
                    crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::ServiceQuotaExceededException({
         252  +
                        let mut tmp = match protocol
         253  +
                            .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         254  +
                            .and_then(|mut deser| {
         255  +
                                crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         256  +
                                    &mut *deser,
         257  +
                                    response.headers(),
         258  +
                                    response.status().into(),
         259  +
                                    body,
         260  +
                                )
         261  +
                            }) {
         262  +
                            ::std::result::Result::Ok(val) => val,
         263  +
                            ::std::result::Result::Err(e) => {
         264  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         265  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         266  +
                                ))
         267  +
                            }
         268  +
                        };
         269  +
                        tmp.meta = generic;
         270  +
                        tmp
         271  +
                    })
         272  +
                }
         273  +
                "ThrottlingException" => crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::ThrottlingException({
         274  +
                    let mut tmp = match protocol
         275  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         276  +
                        .and_then(|mut deser| {
         277  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         278  +
                                &mut *deser,
         279  +
                                response.headers(),
         280  +
                                response.status().into(),
         281  +
                                body,
         282  +
                            )
         283  +
                        }) {
         284  +
                        ::std::result::Result::Ok(val) => val,
         285  +
                        ::std::result::Result::Err(e) => {
         286  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         287  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         288  +
                            ))
         289  +
                        }
         290  +
                    };
         291  +
                    tmp.meta = generic;
         292  +
                    tmp
         293  +
                }),
         294  +
                "ValidationException" => crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::ValidationException({
         295  +
                    let mut tmp = match protocol
         296  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         297  +
                        .and_then(|mut deser| {
         298  +
                            crate::types::error::ValidationException::deserialize_with_response(
         299  +
                                &mut *deser,
         300  +
                                response.headers(),
         301  +
                                response.status().into(),
         302  +
                                body,
         303  +
                            )
         304  +
                        }) {
         305  +
                        ::std::result::Result::Ok(val) => val,
         306  +
                        ::std::result::Result::Err(e) => {
         307  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         308  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         309  +
                            ))
         310  +
                        }
  158    311   
                    };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         312  +
                    tmp.meta = generic;
         313  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesError::generic(generic),
         316  +
            };
         317  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         318  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         319  +
            ))
         320  +
        } else {
         321  +
            let protocol = _cfg
         322  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
                .expect("a SharedClientProtocol is required");
         324  +
            let mut deser = protocol
         325  +
                .deserialize_response(response, ListSourceRepositoryBranches::OUTPUT_SCHEMA, _cfg)
         326  +
                .map_err(|e| {
         327  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         328  +
                })?;
         329  +
            let body = response.body().bytes().expect("body loaded");
         330  +
            let output = crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesOutput::deserialize_with_response(
         331  +
                &mut *deser,
         332  +
                response.headers(),
         333  +
                response.status().into(),
         334  +
                body,
         335  +
            )
         336  +
            .map_err(|e| {
         337  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         338  +
            })?;
         339  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         340  +
        }
  160    341   
    }
  161    342   
}
  162    343   
#[derive(Debug)]
  163    344   
struct ListSourceRepositoryBranchesRequestSerializer;
  164    345   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListSourceRepositoryBranchesRequestSerializer {
  165    346   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  166    347   
    fn serialize_input(
  167    348   
        &self,
  168    349   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  169    350   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  170    351   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  171    352   
        let input = input
  172    353   
            .downcast::<crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesInput>()
  173    354   
            .expect("correct type");
  174         -
        let _header_serialization_settings = _cfg
  175         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  176         -
            .cloned()
  177         -
            .unwrap_or_default();
  178         -
        let mut request_builder = {
  179         -
            #[allow(clippy::uninlined_format_args)]
  180         -
            fn uri_base(
  181         -
                _input: &crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesInput,
  182         -
                output: &mut ::std::string::String,
  183         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184         -
                use ::std::fmt::Write as _;
  185         -
                let input_1 = &_input.space_name;
  186         -
                let input_1 = input_1
  187         -
                    .as_ref()
  188         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("space_name", "cannot be empty or unset"))?;
  189         -
                let space_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  190         -
                if space_name.is_empty() {
  191         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  192         -
                        "space_name",
  193         -
                        "cannot be empty or unset",
  194         -
                    ));
  195         -
                }
  196         -
                let input_2 = &_input.project_name;
  197         -
                let input_2 = input_2
  198         -
                    .as_ref()
  199         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("project_name", "cannot be empty or unset"))?;
  200         -
                let project_name = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
  201         -
                if project_name.is_empty() {
  202         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  203         -
                        "project_name",
  204         -
                        "cannot be empty or unset",
  205         -
                    ));
  206         -
                }
  207         -
                let input_3 = &_input.source_repository_name;
  208         -
                let input_3 = input_3.as_ref().ok_or_else(|| {
  209         -
                    ::aws_smithy_types::error::operation::BuildError::missing_field("source_repository_name", "cannot be empty or unset")
  210         -
                })?;
  211         -
                let source_repository_name = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
  212         -
                if source_repository_name.is_empty() {
  213         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  214         -
                        "source_repository_name",
  215         -
                        "cannot be empty or unset",
  216         -
                    ));
         355  +
        let protocol = _cfg
         356  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         357  +
            .expect("a SharedClientProtocol is required");
         358  +
        if protocol.supports_http_bindings() {
         359  +
            let mut request = protocol
         360  +
                .serialize_body(&input, ListSourceRepositoryBranches::INPUT_SCHEMA, "", _cfg)
         361  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         362  +
            {
         363  +
                let mut uri = "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/branches".to_string();
         364  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         365  +
                if let Some(ref val) = input.space_name {
         366  +
                    uri = uri.replace("{spaceName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         367  +
                }
         368  +
                if let Some(ref val) = input.project_name {
         369  +
                    uri = uri.replace("{projectName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         370  +
                }
         371  +
                if let Some(ref val) = input.source_repository_name {
         372  +
                    uri = uri.replace(
         373  +
                        "{sourceRepositoryName}",
         374  +
                        &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()),
         375  +
                    );
  217    376   
                }
  218         -
                ::std::write!(
  219         -
                    output,
  220         -
                    "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/branches",
  221         -
                    spaceName = space_name,
  222         -
                    projectName = project_name,
  223         -
                    sourceRepositoryName = source_repository_name
         377  +
                if !query_params.is_empty() {
         378  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         379  +
                    let pairs: Vec<String> = query_params
         380  +
                        .iter()
         381  +
                        .map(|(k, v)| {
         382  +
                            format!(
         383  +
                                "{}={}",
         384  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         385  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
  224    386   
                            )
  225         -
                .expect("formatting should succeed");
  226         -
                ::std::result::Result::Ok(())
         387  +
                        })
         388  +
                        .collect();
         389  +
                    uri.push_str(&pairs.join("&"));
  227    390   
                }
  228         -
            #[allow(clippy::unnecessary_wraps)]
  229         -
            fn update_http_builder(
  230         -
                input: &crate::operation::list_source_repository_branches::ListSourceRepositoryBranchesInput,
  231         -
                builder: ::http_1x::request::Builder,
  232         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  233         -
                let mut uri = ::std::string::String::new();
  234         -
                uri_base(input, &mut uri)?;
  235         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  236         -
            }
  237         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  238         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  239         -
            builder
  240         -
        };
  241         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  242         -
            crate::protocol_serde::shape_list_source_repository_branches::ser_list_source_repository_branches_input(&input)?,
  243         -
        );
  244         -
        if let Some(content_length) = body.content_length() {
  245         -
            let content_length = content_length.to_string();
  246         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         391  +
                request.set_uri(uri.as_str()).expect("valid URI");
         392  +
            }
         393  +
         394  +
            return ::std::result::Result::Ok(request);
         395  +
        } else {
         396  +
            let mut request = protocol
         397  +
                .serialize_request(&input, ListSourceRepositoryBranches::INPUT_SCHEMA, "", _cfg)
         398  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         399  +
         400  +
            return ::std::result::Result::Ok(request);
  247    401   
        }
  248         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  249    402   
    }
  250    403   
}
  251    404   
#[derive(Debug)]
  252    405   
struct ListSourceRepositoryBranchesEndpointParamsInterceptor;
  253    406   
  254    407   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListSourceRepositoryBranchesEndpointParamsInterceptor {
  255    408   
    fn name(&self) -> &'static str {
  256    409   
        "ListSourceRepositoryBranchesEndpointParamsInterceptor"
  257    410   
    }
  258    411