AWS SDK

AWS SDK

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `CreateProject`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateProject;
    6      6   
impl CreateProject {
    7      7   
    /// Creates a new `CreateProject`
    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::create_project::CreateProjectInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_project::CreateProjectOutput::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::create_project::CreateProjectInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_project::CreateProjectOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_project::CreateProjectError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -108,112 +241,404 @@
  128    132   
                crate::operation::create_project::CreateProjectError,
  129    133   
            >::new());
  130    134   
  131    135   
        ::std::borrow::Cow::Owned(rcb)
  132    136   
    }
  133    137   
}
  134    138   
  135    139   
#[derive(Debug)]
  136    140   
struct CreateProjectResponseDeserializer;
  137    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateProjectResponseDeserializer {
  138         -
    fn deserialize_nonstreaming(
         142  +
    fn deserialize_nonstreaming_with_config(
  139    143   
        &self,
  140    144   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         145  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  141    146   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  142    147   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  143         -
        let headers = response.headers();
  144         -
        let body = response.body().bytes().expect("body loaded");
  145    148   
        #[allow(unused_mut)]
  146    149   
        let mut force_error = false;
  147    150   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  148         -
        let parse_result = if !success && status != 201 || force_error {
  149         -
            crate::protocol_serde::shape_create_project::de_create_project_http_error(status, headers, body)
         151  +
        if !success && status != 201 || 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::create_project::CreateProjectError::unhandled(generic)),
         165  +
                    ))
         166  +
                }
         167  +
            };
         168  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         169  +
            let protocol = _cfg
         170  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         171  +
                .expect("a SharedClientProtocol is required");
         172  +
            let err = match error_code {
         173  +
                "AccessDeniedException" => crate::operation::create_project::CreateProjectError::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::create_project::CreateProjectError::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::create_project::CreateProjectError::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::create_project::CreateProjectError::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::create_project::CreateProjectError::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::create_project::CreateProjectError::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::create_project::CreateProjectError::generic(generic),
         300  +
            };
         301  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         302  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         303  +
            ))
  150    304   
        } else {
  151         -
            crate::protocol_serde::shape_create_project::de_create_project_http_response(status, headers, body)
  152         -
        };
  153         -
        crate::protocol_serde::type_erase_result(parse_result)
         305  +
            let protocol = _cfg
         306  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         307  +
                .expect("a SharedClientProtocol is required");
         308  +
            let mut deser = protocol.deserialize_response(response, CreateProject::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::create_project::CreateProjectOutput::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 CreateProjectRequestSerializer;
  158    327   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateProjectRequestSerializer {
  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::create_project::CreateProjectInput>()
  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::create_project::CreateProjectInput,
  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, CreateProject::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()));
  189    349   
                }
  190         -
                ::std::write!(output, "/v1/spaces/{spaceName}/projects", spaceName = space_name).expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
  192         -
            }
  193         -
            #[allow(clippy::unnecessary_wraps)]
  194         -
            fn update_http_builder(
  195         -
                input: &crate::operation::create_project::CreateProjectInput,
  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("PUT").uri(uri))
         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("&"));
         363  +
                }
         364  +
                request.set_uri(uri.as_str()).expect("valid URI");
  201    365   
            }
  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_create_project::ser_create_project_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, CreateProject::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 CreateProjectEndpointParamsInterceptor;
  216    379   
  217    380   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateProjectEndpointParamsInterceptor {
  218    381   
    fn name(&self) -> &'static str {
  219    382   
        "CreateProjectEndpointParamsInterceptor"
  220    383   
    }
  221    384   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/create_source_repository.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 `CreateSourceRepository`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateSourceRepository;
    6      6   
impl CreateSourceRepository {
    7      7   
    /// Creates a new `CreateSourceRepository`
    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::create_source_repository::CreateSourceRepositoryInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_source_repository::CreateSourceRepositoryOutput::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::create_source_repository::CreateSourceRepositoryInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_source_repository::CreateSourceRepositoryOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_source_repository::CreateSourceRepositoryError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -114,118 +278,422 @@
  134    138   
                crate::operation::create_source_repository::CreateSourceRepositoryError,
  135    139   
            >::new());
  136    140   
  137    141   
        ::std::borrow::Cow::Owned(rcb)
  138    142   
    }
  139    143   
}
  140    144   
  141    145   
#[derive(Debug)]
  142    146   
struct CreateSourceRepositoryResponseDeserializer;
  143    147   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateSourceRepositoryResponseDeserializer {
  144         -
    fn deserialize_nonstreaming(
         148  +
    fn deserialize_nonstreaming_with_config(
  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 != 201 || force_error {
  155         -
            crate::protocol_serde::shape_create_source_repository::de_create_source_repository_http_error(status, headers, body)
         157  +
        if !success && status != 201 || 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::create_source_repository::CreateSourceRepositoryError::unhandled(generic),
         172  +
                        ),
         173  +
                    ))
         174  +
                }
         175  +
            };
         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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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::create_source_repository::CreateSourceRepositoryError::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  +
            ))
  156    314   
        } else {
  157         -
            crate::protocol_serde::shape_create_source_repository::de_create_source_repository_http_response(status, headers, body)
  158         -
        };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, CreateSourceRepository::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::create_source_repository::CreateSourceRepositoryOutput::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 CreateSourceRepositoryRequestSerializer;
  164    339   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateSourceRepositoryRequestSerializer {
  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::create_source_repository::CreateSourceRepositoryInput>()
  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::create_source_repository::CreateSourceRepositoryInput,
  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, CreateSourceRepository::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/{name}".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()));
  195    361   
                }
  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         -
                    ));
         362  +
                if let Some(ref val) = input.project_name {
         363  +
                    uri = uri.replace("{projectName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  206    364   
                }
  207         -
                let input_3 = &_input.name;
  208         -
                let input_3 = input_3
  209         -
                    .as_ref()
  210         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  211         -
                let name = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
  212         -
                if name.is_empty() {
  213         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  214         -
                        "name",
  215         -
                        "cannot be empty or unset",
  216         -
                    ));
         365  +
                if let Some(ref val) = input.name {
         366  +
                    uri = uri.replace("{name}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  217    367   
                }
  218         -
                ::std::write!(
  219         -
                    output,
  220         -
                    "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}",
  221         -
                    spaceName = space_name,
  222         -
                    projectName = project_name,
  223         -
                    name = name
  224         -
                )
  225         -
                .expect("formatting should succeed");
  226         -
                ::std::result::Result::Ok(())
  227         -
            }
  228         -
            #[allow(clippy::unnecessary_wraps)]
  229         -
            fn update_http_builder(
  230         -
                input: &crate::operation::create_source_repository::CreateSourceRepositoryInput,
  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("PUT").uri(uri))
         368  +
                if !query_params.is_empty() {
         369  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         370  +
                    let pairs: Vec<String> = query_params
         371  +
                        .iter()
         372  +
                        .map(|(k, v)| {
         373  +
                            format!(
         374  +
                                "{}={}",
         375  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         376  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         377  +
                            )
         378  +
                        })
         379  +
                        .collect();
         380  +
                    uri.push_str(&pairs.join("&"));
         381  +
                }
         382  +
                request.set_uri(uri.as_str()).expect("valid URI");
  236    383   
            }
  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_create_source_repository::ser_create_source_repository_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);
         384  +
         385  +
            return ::std::result::Result::Ok(request);
         386  +
        } else {
         387  +
            let mut request = protocol
         388  +
                .serialize_request(&input, CreateSourceRepository::INPUT_SCHEMA, "", _cfg)
         389  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         390  +
         391  +
            return ::std::result::Result::Ok(request);
  247    392   
        }
  248         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  249    393   
    }
  250    394   
}
  251    395   
#[derive(Debug)]
  252    396   
struct CreateSourceRepositoryEndpointParamsInterceptor;
  253    397   
  254    398   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateSourceRepositoryEndpointParamsInterceptor {
  255    399   
    fn name(&self) -> &'static str {
  256    400   
        "CreateSourceRepositoryEndpointParamsInterceptor"
  257    401   
    }
  258    402   

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

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

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

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

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/operation/create_source_repository_branch.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 `CreateSourceRepositoryBranch`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateSourceRepositoryBranch;
    6      6   
impl CreateSourceRepositoryBranch {
    7      7   
    /// Creates a new `CreateSourceRepositoryBranch`
    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::create_source_repository_branch::CreateSourceRepositoryBranchInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchOutput::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::create_source_repository_branch::CreateSourceRepositoryBranchInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -114,120 +290,434 @@
  134    140   
                crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError,
  135    141   
            >::new());
  136    142   
  137    143   
        ::std::borrow::Cow::Owned(rcb)
  138    144   
    }
  139    145   
}
  140    146   
  141    147   
#[derive(Debug)]
  142    148   
struct CreateSourceRepositoryBranchResponseDeserializer;
  143    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateSourceRepositoryBranchResponseDeserializer {
  144         -
    fn deserialize_nonstreaming(
         150  +
    fn deserialize_nonstreaming_with_config(
  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 != 201 || force_error {
  155         -
            crate::protocol_serde::shape_create_source_repository_branch::de_create_source_repository_branch_http_error(status, headers, body)
         159  +
        if !success && status != 201 || 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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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::create_source_repository_branch::CreateSourceRepositoryBranchError::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  +
                        }
         311  +
                    };
         312  +
                    tmp.meta = generic;
         313  +
                    tmp
         314  +
                }),
         315  +
                _ => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::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  +
            ))
  156    320   
        } else {
  157         -
            crate::protocol_serde::shape_create_source_repository_branch::de_create_source_repository_branch_http_response(status, headers, body)
  158         -
        };
  159         -
        crate::protocol_serde::type_erase_result(parse_result)
         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, CreateSourceRepositoryBranch::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::create_source_repository_branch::CreateSourceRepositoryBranchOutput::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 CreateSourceRepositoryBranchRequestSerializer;
  164    345   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateSourceRepositoryBranchRequestSerializer {
  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::create_source_repository_branch::CreateSourceRepositoryBranchInput>()
  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::create_source_repository_branch::CreateSourceRepositoryBranchInput,
  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         -
                    ));
         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, CreateSourceRepositoryBranch::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/{name}".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()));
  195    367   
                }
  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         -
                    ));
         368  +
                if let Some(ref val) = input.project_name {
         369  +
                    uri = uri.replace("{projectName}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  206    370   
                }
  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         -
                    ));
         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         -
                let input_4 = &_input.name;
  219         -
                let input_4 = input_4
  220         -
                    .as_ref()
  221         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("name", "cannot be empty or unset"))?;
  222         -
                let name = ::aws_smithy_http::label::fmt_string(input_4, ::aws_smithy_http::label::EncodingStrategy::Default);
  223         -
                if name.is_empty() {
  224         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  225         -
                        "name",
  226         -
                        "cannot be empty or unset",
  227         -
                    ));
         377  +
                if let Some(ref val) = input.name {
         378  +
                    uri = uri.replace("{name}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
  228    379   
                }
  229         -
                ::std::write!(
  230         -
                    output,
  231         -
                    "/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{sourceRepositoryName}/branches/{name}",
  232         -
                    spaceName = space_name,
  233         -
                    projectName = project_name,
  234         -
                    sourceRepositoryName = source_repository_name,
  235         -
                    name = name
  236         -
                )
  237         -
                .expect("formatting should succeed");
  238         -
                ::std::result::Result::Ok(())
  239         -
            }
  240         -
            #[allow(clippy::unnecessary_wraps)]
  241         -
            fn update_http_builder(
  242         -
                input: &crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchInput,
  243         -
                builder: ::http_1x::request::Builder,
  244         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  245         -
                let mut uri = ::std::string::String::new();
  246         -
                uri_base(input, &mut uri)?;
  247         -
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
         380  +
                if !query_params.is_empty() {
         381  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         382  +
                    let pairs: Vec<String> = query_params
         383  +
                        .iter()
         384  +
                        .map(|(k, v)| {
         385  +
                            format!(
         386  +
                                "{}={}",
         387  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         388  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         389  +
                            )
         390  +
                        })
         391  +
                        .collect();
         392  +
                    uri.push_str(&pairs.join("&"));
         393  +
                }
         394  +
                request.set_uri(uri.as_str()).expect("valid URI");
  248    395   
            }
  249         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  250         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
  251         -
            builder
  252         -
        };
  253         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  254         -
            crate::protocol_serde::shape_create_source_repository_branch::ser_create_source_repository_branch_input(&input)?,
  255         -
        );
  256         -
        if let Some(content_length) = body.content_length() {
  257         -
            let content_length = content_length.to_string();
  258         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
         396  +
         397  +
            return ::std::result::Result::Ok(request);
         398  +
        } else {
         399  +
            let mut request = protocol
         400  +
                .serialize_request(&input, CreateSourceRepositoryBranch::INPUT_SCHEMA, "", _cfg)
         401  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         402  +
         403  +
            return ::std::result::Result::Ok(request);
  259    404   
        }
  260         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  261    405   
    }
  262    406   
}
  263    407   
#[derive(Debug)]
  264    408   
struct CreateSourceRepositoryBranchEndpointParamsInterceptor;
  265    409   
  266    410   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateSourceRepositoryBranchEndpointParamsInterceptor {
  267    411   
    fn name(&self) -> &'static str {
  268    412   
        "CreateSourceRepositoryBranchEndpointParamsInterceptor"
  269    413   
    }
  270    414