AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_create_project_input.rs

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_create_project_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::create_project::CreateProjectInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.description {
    7         -
        object.key("description").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.display_name {
   10         -
        object.key("displayName").string(var_2.as_str());
   11         -
    }
   12         -
    Ok(())
   13         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_create_source_repository.rs

@@ -1,0 +206,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_create_source_repository_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::create_source_repository::CreateSourceRepositoryOutput,
    9         -
    crate::operation::create_source_repository::CreateSourceRepositoryError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "AccessDeniedException" => crate::operation::create_source_repository::CreateSourceRepositoryError::AccessDeniedException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   36         -
                    .build()
   37         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
   38         -
            };
   39         -
            tmp
   40         -
        }),
   41         -
        "ConflictException" => crate::operation::create_source_repository::CreateSourceRepositoryError::ConflictException({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   46         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   47         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   48         -
                let output = output.meta(generic);
   49         -
                crate::serde_util::conflict_exception_correct_errors(output)
   50         -
                    .build()
   51         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
   52         -
            };
   53         -
            tmp
   54         -
        }),
   55         -
        "ResourceNotFoundException" => crate::operation::create_source_repository::CreateSourceRepositoryError::ResourceNotFoundException({
   56         -
            #[allow(unused_mut)]
   57         -
            let mut tmp = {
   58         -
                #[allow(unused_mut)]
   59         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   60         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   61         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   62         -
                let output = output.meta(generic);
   63         -
                crate::serde_util::resource_not_found_exception_correct_errors(output)
   64         -
                    .build()
   65         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
   66         -
            };
   67         -
            tmp
   68         -
        }),
   69         -
        "ServiceQuotaExceededException" => crate::operation::create_source_repository::CreateSourceRepositoryError::ServiceQuotaExceededException({
   70         -
            #[allow(unused_mut)]
   71         -
            let mut tmp = {
   72         -
                #[allow(unused_mut)]
   73         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   74         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   75         -
                    _response_body,
   76         -
                    output,
   77         -
                )
   78         -
                .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   81         -
                    .build()
   82         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
   83         -
            };
   84         -
            tmp
   85         -
        }),
   86         -
        "ThrottlingException" => crate::operation::create_source_repository::CreateSourceRepositoryError::ThrottlingException({
   87         -
            #[allow(unused_mut)]
   88         -
            let mut tmp = {
   89         -
                #[allow(unused_mut)]
   90         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   91         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   92         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
   93         -
                let output = output.meta(generic);
   94         -
                crate::serde_util::throttling_exception_correct_errors(output)
   95         -
                    .build()
   96         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
   97         -
            };
   98         -
            tmp
   99         -
        }),
  100         -
        "ValidationException" => crate::operation::create_source_repository::CreateSourceRepositoryError::ValidationException({
  101         -
            #[allow(unused_mut)]
  102         -
            let mut tmp = {
  103         -
                #[allow(unused_mut)]
  104         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  105         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  106         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
  107         -
                let output = output.meta(generic);
  108         -
                crate::serde_util::validation_exception_correct_errors(output)
  109         -
                    .build()
  110         -
                    .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
  111         -
            };
  112         -
            tmp
  113         -
        }),
  114         -
        _ => crate::operation::create_source_repository::CreateSourceRepositoryError::generic(generic),
  115         -
    })
  116         -
}
  117         -
  118         -
#[allow(clippy::unnecessary_wraps)]
  119         -
pub fn de_create_source_repository_http_response(
  120         -
    _response_status: u16,
  121         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  122         -
    _response_body: &[u8],
  123         -
) -> std::result::Result<
  124         -
    crate::operation::create_source_repository::CreateSourceRepositoryOutput,
  125         -
    crate::operation::create_source_repository::CreateSourceRepositoryError,
  126         -
> {
  127         -
    Ok({
  128         -
        #[allow(unused_mut)]
  129         -
        let mut output = crate::operation::create_source_repository::builders::CreateSourceRepositoryOutputBuilder::default();
  130         -
        output = crate::protocol_serde::shape_create_source_repository::de_create_source_repository(_response_body, output)
  131         -
            .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?;
  132         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  133         -
        crate::serde_util::create_source_repository_output_output_correct_errors(output)
  134         -
            .build()
  135         -
            .map_err(crate::operation::create_source_repository::CreateSourceRepositoryError::unhandled)?
  136         -
    })
  137         -
}
  138         -
  139         -
pub fn ser_create_source_repository_input(
  140         -
    input: &crate::operation::create_source_repository::CreateSourceRepositoryInput,
  141         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  142         -
    let mut out = String::new();
  143         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  144         -
    crate::protocol_serde::shape_create_source_repository_input::ser_create_source_repository_input_input(&mut object, input)?;
  145         -
    object.finish();
  146         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  147         -
}
  148         -
  149         -
pub(crate) fn de_create_source_repository(
  150         -
    _value: &[u8],
  151         -
    mut builder: crate::operation::create_source_repository::builders::CreateSourceRepositoryOutputBuilder,
  152         -
) -> ::std::result::Result<
  153         -
    crate::operation::create_source_repository::builders::CreateSourceRepositoryOutputBuilder,
  154         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  155         -
> {
  156         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  157         -
    let tokens = &mut tokens_owned;
  158         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  159         -
    loop {
  160         -
        match tokens.next().transpose()? {
  161         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  162         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  163         -
                "description" => {
  164         -
                    builder = builder.set_description(
  165         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  166         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  167         -
                            .transpose()?,
  168         -
                    );
  169         -
                }
  170         -
                "name" => {
  171         -
                    builder = builder.set_name(
  172         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  173         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  174         -
                            .transpose()?,
  175         -
                    );
  176         -
                }
  177         -
                "projectName" => {
  178         -
                    builder = builder.set_project_name(
  179         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  180         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  181         -
                            .transpose()?,
  182         -
                    );
  183         -
                }
  184         -
                "spaceName" => {
  185         -
                    builder = builder.set_space_name(
  186         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  187         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  188         -
                            .transpose()?,
  189         -
                    );
  190         -
                }
  191         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  192         -
            },
  193         -
            other => {
  194         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  195         -
                    "expected object key or end object, found: {other:?}"
  196         -
                )))
  197         -
            }
  198         -
        }
  199         -
    }
  200         -
    if tokens.next().is_some() {
  201         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  202         -
            "found more JSON tokens after completing parsing",
  203         -
        ));
  204         -
    }
  205         -
    Ok(builder)
  206         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_create_source_repository_branch.rs

@@ -1,0 +204,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_create_source_repository_branch_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchOutput,
    9         -
    crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "ConflictException" => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::ConflictException({
   38         -
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   42         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   43         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::conflict_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "ResourceNotFoundException" => {
   52         -
            crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::ResourceNotFoundException({
   53         -
                #[allow(unused_mut)]
   54         -
                let mut tmp = {
   55         -
                    #[allow(unused_mut)]
   56         -
                    let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   57         -
                    output =
   58         -
                        crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   59         -
                            .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   60         -
                    let output = output.meta(generic);
   61         -
                    crate::serde_util::resource_not_found_exception_correct_errors(output)
   62         -
                        .build()
   63         -
                        .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
   64         -
                };
   65         -
                tmp
   66         -
            })
   67         -
        }
   68         -
        "ServiceQuotaExceededException" => {
   69         -
            crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::ServiceQuotaExceededException({
   70         -
                #[allow(unused_mut)]
   71         -
                let mut tmp = {
   72         -
                    #[allow(unused_mut)]
   73         -
                    let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   74         -
                    output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   75         -
                        _response_body,
   76         -
                        output,
   77         -
                    )
   78         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   79         -
                    let output = output.meta(generic);
   80         -
                    crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   81         -
                        .build()
   82         -
                        .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
   83         -
                };
   84         -
                tmp
   85         -
            })
   86         -
        }
   87         -
        "ThrottlingException" => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::ThrottlingException({
   88         -
            #[allow(unused_mut)]
   89         -
            let mut tmp = {
   90         -
                #[allow(unused_mut)]
   91         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   92         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   93         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
   94         -
                let output = output.meta(generic);
   95         -
                crate::serde_util::throttling_exception_correct_errors(output)
   96         -
                    .build()
   97         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
   98         -
            };
   99         -
            tmp
  100         -
        }),
  101         -
        "ValidationException" => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::ValidationException({
  102         -
            #[allow(unused_mut)]
  103         -
            let mut tmp = {
  104         -
                #[allow(unused_mut)]
  105         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  106         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  107         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
  108         -
                let output = output.meta(generic);
  109         -
                crate::serde_util::validation_exception_correct_errors(output)
  110         -
                    .build()
  111         -
                    .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?
  112         -
            };
  113         -
            tmp
  114         -
        }),
  115         -
        _ => crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::generic(generic),
  116         -
    })
  117         -
}
  118         -
  119         -
#[allow(clippy::unnecessary_wraps)]
  120         -
pub fn de_create_source_repository_branch_http_response(
  121         -
    _response_status: u16,
  122         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  123         -
    _response_body: &[u8],
  124         -
) -> std::result::Result<
  125         -
    crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchOutput,
  126         -
    crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError,
  127         -
> {
  128         -
    Ok({
  129         -
        #[allow(unused_mut)]
  130         -
        let mut output = crate::operation::create_source_repository_branch::builders::CreateSourceRepositoryBranchOutputBuilder::default();
  131         -
        output = crate::protocol_serde::shape_create_source_repository_branch::de_create_source_repository_branch(_response_body, output)
  132         -
            .map_err(crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchError::unhandled)?;
  133         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  134         -
        output.build()
  135         -
    })
  136         -
}
  137         -
  138         -
pub fn ser_create_source_repository_branch_input(
  139         -
    input: &crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchInput,
  140         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
  141         -
    let mut out = String::new();
  142         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
  143         -
    crate::protocol_serde::shape_create_source_repository_branch_input::ser_create_source_repository_branch_input_input(&mut object, input)?;
  144         -
    object.finish();
  145         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
  146         -
}
  147         -
  148         -
pub(crate) fn de_create_source_repository_branch(
  149         -
    _value: &[u8],
  150         -
    mut builder: crate::operation::create_source_repository_branch::builders::CreateSourceRepositoryBranchOutputBuilder,
  151         -
) -> ::std::result::Result<
  152         -
    crate::operation::create_source_repository_branch::builders::CreateSourceRepositoryBranchOutputBuilder,
  153         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  154         -
> {
  155         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  156         -
    let tokens = &mut tokens_owned;
  157         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  158         -
    loop {
  159         -
        match tokens.next().transpose()? {
  160         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  161         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  162         -
                "headCommitId" => {
  163         -
                    builder = builder.set_head_commit_id(
  164         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  165         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  166         -
                            .transpose()?,
  167         -
                    );
  168         -
                }
  169         -
                "lastUpdatedTime" => {
  170         -
                    builder = builder.set_last_updated_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  171         -
                        tokens.next(),
  172         -
                        ::aws_smithy_types::date_time::Format::DateTimeWithOffset,
  173         -
                    )?);
  174         -
                }
  175         -
                "name" => {
  176         -
                    builder = builder.set_name(
  177         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  178         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  179         -
                            .transpose()?,
  180         -
                    );
  181         -
                }
  182         -
                "ref" => {
  183         -
                    builder = builder.set_ref(
  184         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  185         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  186         -
                            .transpose()?,
  187         -
                    );
  188         -
                }
  189         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  190         -
            },
  191         -
            other => {
  192         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  193         -
                    "expected object key or end object, found: {other:?}"
  194         -
                )))
  195         -
            }
  196         -
        }
  197         -
    }
  198         -
    if tokens.next().is_some() {
  199         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  200         -
            "found more JSON tokens after completing parsing",
  201         -
        ));
  202         -
    }
  203         -
    Ok(builder)
  204         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_create_source_repository_branch_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_create_source_repository_branch_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::create_source_repository_branch::CreateSourceRepositoryBranchInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.head_commit_id {
    7         -
        object.key("headCommitId").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_create_source_repository_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_create_source_repository_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::create_source_repository::CreateSourceRepositoryInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.description {
    7         -
        object.key("description").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_delete_access_token.rs

@@ -1,0 +125,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_access_token_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::delete_access_token::DeleteAccessTokenOutput, crate::operation::delete_access_token::DeleteAccessTokenError>
    8         -
{
    9         -
    #[allow(unused_mut)]
   10         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   11         -
        .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   12         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   13         -
    let generic = generic_builder.build();
   14         -
    let error_code = match generic.code() {
   15         -
        Some(code) => code,
   16         -
        None => return Err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled(generic)),
   17         -
    };
   18         -
   19         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   20         -
    Err(match error_code {
   21         -
        "AccessDeniedException" => crate::operation::delete_access_token::DeleteAccessTokenError::AccessDeniedException({
   22         -
            #[allow(unused_mut)]
   23         -
            let mut tmp = {
   24         -
                #[allow(unused_mut)]
   25         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   26         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   27         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   28         -
                let output = output.meta(generic);
   29         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   30         -
                    .build()
   31         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
   32         -
            };
   33         -
            tmp
   34         -
        }),
   35         -
        "ConflictException" => crate::operation::delete_access_token::DeleteAccessTokenError::ConflictException({
   36         -
            #[allow(unused_mut)]
   37         -
            let mut tmp = {
   38         -
                #[allow(unused_mut)]
   39         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   40         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   41         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   42         -
                let output = output.meta(generic);
   43         -
                crate::serde_util::conflict_exception_correct_errors(output)
   44         -
                    .build()
   45         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
   46         -
            };
   47         -
            tmp
   48         -
        }),
   49         -
        "ResourceNotFoundException" => crate::operation::delete_access_token::DeleteAccessTokenError::ResourceNotFoundException({
   50         -
            #[allow(unused_mut)]
   51         -
            let mut tmp = {
   52         -
                #[allow(unused_mut)]
   53         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   54         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   55         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   56         -
                let output = output.meta(generic);
   57         -
                crate::serde_util::resource_not_found_exception_correct_errors(output)
   58         -
                    .build()
   59         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
   60         -
            };
   61         -
            tmp
   62         -
        }),
   63         -
        "ServiceQuotaExceededException" => crate::operation::delete_access_token::DeleteAccessTokenError::ServiceQuotaExceededException({
   64         -
            #[allow(unused_mut)]
   65         -
            let mut tmp = {
   66         -
                #[allow(unused_mut)]
   67         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   68         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   69         -
                    _response_body,
   70         -
                    output,
   71         -
                )
   72         -
                .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   73         -
                let output = output.meta(generic);
   74         -
                crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   75         -
                    .build()
   76         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
   77         -
            };
   78         -
            tmp
   79         -
        }),
   80         -
        "ThrottlingException" => crate::operation::delete_access_token::DeleteAccessTokenError::ThrottlingException({
   81         -
            #[allow(unused_mut)]
   82         -
            let mut tmp = {
   83         -
                #[allow(unused_mut)]
   84         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   85         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   86         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
   87         -
                let output = output.meta(generic);
   88         -
                crate::serde_util::throttling_exception_correct_errors(output)
   89         -
                    .build()
   90         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
   91         -
            };
   92         -
            tmp
   93         -
        }),
   94         -
        "ValidationException" => crate::operation::delete_access_token::DeleteAccessTokenError::ValidationException({
   95         -
            #[allow(unused_mut)]
   96         -
            let mut tmp = {
   97         -
                #[allow(unused_mut)]
   98         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   99         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  100         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?;
  101         -
                let output = output.meta(generic);
  102         -
                crate::serde_util::validation_exception_correct_errors(output)
  103         -
                    .build()
  104         -
                    .map_err(crate::operation::delete_access_token::DeleteAccessTokenError::unhandled)?
  105         -
            };
  106         -
            tmp
  107         -
        }),
  108         -
        _ => crate::operation::delete_access_token::DeleteAccessTokenError::generic(generic),
  109         -
    })
  110         -
}
  111         -
  112         -
#[allow(clippy::unnecessary_wraps)]
  113         -
pub fn de_delete_access_token_http_response(
  114         -
    _response_status: u16,
  115         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  116         -
    _response_body: &[u8],
  117         -
) -> std::result::Result<crate::operation::delete_access_token::DeleteAccessTokenOutput, crate::operation::delete_access_token::DeleteAccessTokenError>
  118         -
{
  119         -
    Ok({
  120         -
        #[allow(unused_mut)]
  121         -
        let mut output = crate::operation::delete_access_token::builders::DeleteAccessTokenOutputBuilder::default();
  122         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  123         -
        output.build()
  124         -
    })
  125         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_delete_dev_environment.rs

@@ -1,0 +185,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_dev_environment_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::delete_dev_environment::DeleteDevEnvironmentOutput,
    9         -
    crate::operation::delete_dev_environment::DeleteDevEnvironmentError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => return Err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled(generic)),
   19         -
    };
   20         -
   21         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   22         -
    Err(match error_code {
   23         -
        "AccessDeniedException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::AccessDeniedException({
   24         -
            #[allow(unused_mut)]
   25         -
            let mut tmp = {
   26         -
                #[allow(unused_mut)]
   27         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   28         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   29         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   30         -
                let output = output.meta(generic);
   31         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   32         -
                    .build()
   33         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
   34         -
            };
   35         -
            tmp
   36         -
        }),
   37         -
        "ConflictException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::ConflictException({
   38         -
            #[allow(unused_mut)]
   39         -
            let mut tmp = {
   40         -
                #[allow(unused_mut)]
   41         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   42         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   43         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   44         -
                let output = output.meta(generic);
   45         -
                crate::serde_util::conflict_exception_correct_errors(output)
   46         -
                    .build()
   47         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
   48         -
            };
   49         -
            tmp
   50         -
        }),
   51         -
        "ResourceNotFoundException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::ResourceNotFoundException({
   52         -
            #[allow(unused_mut)]
   53         -
            let mut tmp = {
   54         -
                #[allow(unused_mut)]
   55         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   56         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   57         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   58         -
                let output = output.meta(generic);
   59         -
                crate::serde_util::resource_not_found_exception_correct_errors(output)
   60         -
                    .build()
   61         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
   62         -
            };
   63         -
            tmp
   64         -
        }),
   65         -
        "ServiceQuotaExceededException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::ServiceQuotaExceededException({
   66         -
            #[allow(unused_mut)]
   67         -
            let mut tmp = {
   68         -
                #[allow(unused_mut)]
   69         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   70         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   71         -
                    _response_body,
   72         -
                    output,
   73         -
                )
   74         -
                .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   75         -
                let output = output.meta(generic);
   76         -
                crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   77         -
                    .build()
   78         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
   79         -
            };
   80         -
            tmp
   81         -
        }),
   82         -
        "ThrottlingException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::ThrottlingException({
   83         -
            #[allow(unused_mut)]
   84         -
            let mut tmp = {
   85         -
                #[allow(unused_mut)]
   86         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   87         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   88         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
   89         -
                let output = output.meta(generic);
   90         -
                crate::serde_util::throttling_exception_correct_errors(output)
   91         -
                    .build()
   92         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
   93         -
            };
   94         -
            tmp
   95         -
        }),
   96         -
        "ValidationException" => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::ValidationException({
   97         -
            #[allow(unused_mut)]
   98         -
            let mut tmp = {
   99         -
                #[allow(unused_mut)]
  100         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  101         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  102         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
  103         -
                let output = output.meta(generic);
  104         -
                crate::serde_util::validation_exception_correct_errors(output)
  105         -
                    .build()
  106         -
                    .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
  107         -
            };
  108         -
            tmp
  109         -
        }),
  110         -
        _ => crate::operation::delete_dev_environment::DeleteDevEnvironmentError::generic(generic),
  111         -
    })
  112         -
}
  113         -
  114         -
#[allow(clippy::unnecessary_wraps)]
  115         -
pub fn de_delete_dev_environment_http_response(
  116         -
    _response_status: u16,
  117         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  118         -
    _response_body: &[u8],
  119         -
) -> std::result::Result<
  120         -
    crate::operation::delete_dev_environment::DeleteDevEnvironmentOutput,
  121         -
    crate::operation::delete_dev_environment::DeleteDevEnvironmentError,
  122         -
> {
  123         -
    Ok({
  124         -
        #[allow(unused_mut)]
  125         -
        let mut output = crate::operation::delete_dev_environment::builders::DeleteDevEnvironmentOutputBuilder::default();
  126         -
        output = crate::protocol_serde::shape_delete_dev_environment::de_delete_dev_environment(_response_body, output)
  127         -
            .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?;
  128         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  129         -
        crate::serde_util::delete_dev_environment_output_output_correct_errors(output)
  130         -
            .build()
  131         -
            .map_err(crate::operation::delete_dev_environment::DeleteDevEnvironmentError::unhandled)?
  132         -
    })
  133         -
}
  134         -
  135         -
pub(crate) fn de_delete_dev_environment(
  136         -
    _value: &[u8],
  137         -
    mut builder: crate::operation::delete_dev_environment::builders::DeleteDevEnvironmentOutputBuilder,
  138         -
) -> ::std::result::Result<
  139         -
    crate::operation::delete_dev_environment::builders::DeleteDevEnvironmentOutputBuilder,
  140         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  141         -
> {
  142         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  143         -
    let tokens = &mut tokens_owned;
  144         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  145         -
    loop {
  146         -
        match tokens.next().transpose()? {
  147         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  148         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  149         -
                "id" => {
  150         -
                    builder = builder.set_id(
  151         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  152         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  153         -
                            .transpose()?,
  154         -
                    );
  155         -
                }
  156         -
                "projectName" => {
  157         -
                    builder = builder.set_project_name(
  158         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  159         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  160         -
                            .transpose()?,
  161         -
                    );
  162         -
                }
  163         -
                "spaceName" => {
  164         -
                    builder = builder.set_space_name(
  165         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  166         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  167         -
                            .transpose()?,
  168         -
                    );
  169         -
                }
  170         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  171         -
            },
  172         -
            other => {
  173         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  174         -
                    "expected object key or end object, found: {other:?}"
  175         -
                )))
  176         -
            }
  177         -
        }
  178         -
    }
  179         -
    if tokens.next().is_some() {
  180         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  181         -
            "found more JSON tokens after completing parsing",
  182         -
        ));
  183         -
    }
  184         -
    Ok(builder)
  185         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_delete_project.rs

@@ -1,0 +179,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_project_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::delete_project::DeleteProjectOutput, crate::operation::delete_project::DeleteProjectError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   11         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   12         -
    let generic = generic_builder.build();
   13         -
    let error_code = match generic.code() {
   14         -
        Some(code) => code,
   15         -
        None => return Err(crate::operation::delete_project::DeleteProjectError::unhandled(generic)),
   16         -
    };
   17         -
   18         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   19         -
    Err(match error_code {
   20         -
        "AccessDeniedException" => crate::operation::delete_project::DeleteProjectError::AccessDeniedException({
   21         -
            #[allow(unused_mut)]
   22         -
            let mut tmp = {
   23         -
                #[allow(unused_mut)]
   24         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   25         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   26         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   27         -
                let output = output.meta(generic);
   28         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   29         -
                    .build()
   30         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
   31         -
            };
   32         -
            tmp
   33         -
        }),
   34         -
        "ConflictException" => crate::operation::delete_project::DeleteProjectError::ConflictException({
   35         -
            #[allow(unused_mut)]
   36         -
            let mut tmp = {
   37         -
                #[allow(unused_mut)]
   38         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   39         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   40         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   41         -
                let output = output.meta(generic);
   42         -
                crate::serde_util::conflict_exception_correct_errors(output)
   43         -
                    .build()
   44         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
   45         -
            };
   46         -
            tmp
   47         -
        }),
   48         -
        "ResourceNotFoundException" => crate::operation::delete_project::DeleteProjectError::ResourceNotFoundException({
   49         -
            #[allow(unused_mut)]
   50         -
            let mut tmp = {
   51         -
                #[allow(unused_mut)]
   52         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   53         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   54         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   55         -
                let output = output.meta(generic);
   56         -
                crate::serde_util::resource_not_found_exception_correct_errors(output)
   57         -
                    .build()
   58         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
   59         -
            };
   60         -
            tmp
   61         -
        }),
   62         -
        "ServiceQuotaExceededException" => crate::operation::delete_project::DeleteProjectError::ServiceQuotaExceededException({
   63         -
            #[allow(unused_mut)]
   64         -
            let mut tmp = {
   65         -
                #[allow(unused_mut)]
   66         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   67         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   68         -
                    _response_body,
   69         -
                    output,
   70         -
                )
   71         -
                .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   72         -
                let output = output.meta(generic);
   73         -
                crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   74         -
                    .build()
   75         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
   76         -
            };
   77         -
            tmp
   78         -
        }),
   79         -
        "ThrottlingException" => crate::operation::delete_project::DeleteProjectError::ThrottlingException({
   80         -
            #[allow(unused_mut)]
   81         -
            let mut tmp = {
   82         -
                #[allow(unused_mut)]
   83         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   84         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   85         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
   86         -
                let output = output.meta(generic);
   87         -
                crate::serde_util::throttling_exception_correct_errors(output)
   88         -
                    .build()
   89         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
   90         -
            };
   91         -
            tmp
   92         -
        }),
   93         -
        "ValidationException" => crate::operation::delete_project::DeleteProjectError::ValidationException({
   94         -
            #[allow(unused_mut)]
   95         -
            let mut tmp = {
   96         -
                #[allow(unused_mut)]
   97         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
   98         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
   99         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
  100         -
                let output = output.meta(generic);
  101         -
                crate::serde_util::validation_exception_correct_errors(output)
  102         -
                    .build()
  103         -
                    .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
  104         -
            };
  105         -
            tmp
  106         -
        }),
  107         -
        _ => crate::operation::delete_project::DeleteProjectError::generic(generic),
  108         -
    })
  109         -
}
  110         -
  111         -
#[allow(clippy::unnecessary_wraps)]
  112         -
pub fn de_delete_project_http_response(
  113         -
    _response_status: u16,
  114         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  115         -
    _response_body: &[u8],
  116         -
) -> std::result::Result<crate::operation::delete_project::DeleteProjectOutput, crate::operation::delete_project::DeleteProjectError> {
  117         -
    Ok({
  118         -
        #[allow(unused_mut)]
  119         -
        let mut output = crate::operation::delete_project::builders::DeleteProjectOutputBuilder::default();
  120         -
        output = crate::protocol_serde::shape_delete_project::de_delete_project(_response_body, output)
  121         -
            .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?;
  122         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  123         -
        crate::serde_util::delete_project_output_output_correct_errors(output)
  124         -
            .build()
  125         -
            .map_err(crate::operation::delete_project::DeleteProjectError::unhandled)?
  126         -
    })
  127         -
}
  128         -
  129         -
pub(crate) fn de_delete_project(
  130         -
    _value: &[u8],
  131         -
    mut builder: crate::operation::delete_project::builders::DeleteProjectOutputBuilder,
  132         -
) -> ::std::result::Result<
  133         -
    crate::operation::delete_project::builders::DeleteProjectOutputBuilder,
  134         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  135         -
> {
  136         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  137         -
    let tokens = &mut tokens_owned;
  138         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  139         -
    loop {
  140         -
        match tokens.next().transpose()? {
  141         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  142         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  143         -
                "displayName" => {
  144         -
                    builder = builder.set_display_name(
  145         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  146         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  147         -
                            .transpose()?,
  148         -
                    );
  149         -
                }
  150         -
                "name" => {
  151         -
                    builder = builder.set_name(
  152         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  153         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  154         -
                            .transpose()?,
  155         -
                    );
  156         -
                }
  157         -
                "spaceName" => {
  158         -
                    builder = builder.set_space_name(
  159         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  160         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  161         -
                            .transpose()?,
  162         -
                    );
  163         -
                }
  164         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  165         -
            },
  166         -
            other => {
  167         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  168         -
                    "expected object key or end object, found: {other:?}"
  169         -
                )))
  170         -
            }
  171         -
        }
  172         -
    }
  173         -
    if tokens.next().is_some() {
  174         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  175         -
            "found more JSON tokens after completing parsing",
  176         -
        ));
  177         -
    }
  178         -
    Ok(builder)
  179         -
}

tmp-codegen-diff/aws-sdk/sdk/codecatalyst/src/protocol_serde/shape_delete_source_repository.rs

@@ -1,0 +189,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_delete_source_repository_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::delete_source_repository::DeleteSourceRepositoryOutput,
    9         -
    crate::operation::delete_source_repository::DeleteSourceRepositoryError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   14         -
    generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
   15         -
    let generic = generic_builder.build();
   16         -
    let error_code = match generic.code() {
   17         -
        Some(code) => code,
   18         -
        None => {
   19         -
            return Err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled(
   20         -
                generic,
   21         -
            ))
   22         -
        }
   23         -
    };
   24         -
   25         -
    let _error_message = generic.message().map(|msg| msg.to_owned());
   26         -
    Err(match error_code {
   27         -
        "AccessDeniedException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::AccessDeniedException({
   28         -
            #[allow(unused_mut)]
   29         -
            let mut tmp = {
   30         -
                #[allow(unused_mut)]
   31         -
                let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
   32         -
                output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
   33         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   34         -
                let output = output.meta(generic);
   35         -
                crate::serde_util::access_denied_exception_correct_errors(output)
   36         -
                    .build()
   37         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
   38         -
            };
   39         -
            tmp
   40         -
        }),
   41         -
        "ConflictException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::ConflictException({
   42         -
            #[allow(unused_mut)]
   43         -
            let mut tmp = {
   44         -
                #[allow(unused_mut)]
   45         -
                let mut output = crate::types::error::builders::ConflictExceptionBuilder::default();
   46         -
                output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
   47         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   48         -
                let output = output.meta(generic);
   49         -
                crate::serde_util::conflict_exception_correct_errors(output)
   50         -
                    .build()
   51         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
   52         -
            };
   53         -
            tmp
   54         -
        }),
   55         -
        "ResourceNotFoundException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::ResourceNotFoundException({
   56         -
            #[allow(unused_mut)]
   57         -
            let mut tmp = {
   58         -
                #[allow(unused_mut)]
   59         -
                let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
   60         -
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
   61         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   62         -
                let output = output.meta(generic);
   63         -
                crate::serde_util::resource_not_found_exception_correct_errors(output)
   64         -
                    .build()
   65         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
   66         -
            };
   67         -
            tmp
   68         -
        }),
   69         -
        "ServiceQuotaExceededException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::ServiceQuotaExceededException({
   70         -
            #[allow(unused_mut)]
   71         -
            let mut tmp = {
   72         -
                #[allow(unused_mut)]
   73         -
                let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
   74         -
                output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
   75         -
                    _response_body,
   76         -
                    output,
   77         -
                )
   78         -
                .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   79         -
                let output = output.meta(generic);
   80         -
                crate::serde_util::service_quota_exceeded_exception_correct_errors(output)
   81         -
                    .build()
   82         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
   83         -
            };
   84         -
            tmp
   85         -
        }),
   86         -
        "ThrottlingException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::ThrottlingException({
   87         -
            #[allow(unused_mut)]
   88         -
            let mut tmp = {
   89         -
                #[allow(unused_mut)]
   90         -
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
   91         -
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
   92         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
   93         -
                let output = output.meta(generic);
   94         -
                crate::serde_util::throttling_exception_correct_errors(output)
   95         -
                    .build()
   96         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
   97         -
            };
   98         -
            tmp
   99         -
        }),
  100         -
        "ValidationException" => crate::operation::delete_source_repository::DeleteSourceRepositoryError::ValidationException({
  101         -
            #[allow(unused_mut)]
  102         -
            let mut tmp = {
  103         -
                #[allow(unused_mut)]
  104         -
                let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
  105         -
                output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
  106         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
  107         -
                let output = output.meta(generic);
  108         -
                crate::serde_util::validation_exception_correct_errors(output)
  109         -
                    .build()
  110         -
                    .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
  111         -
            };
  112         -
            tmp
  113         -
        }),
  114         -
        _ => crate::operation::delete_source_repository::DeleteSourceRepositoryError::generic(generic),
  115         -
    })
  116         -
}
  117         -
  118         -
#[allow(clippy::unnecessary_wraps)]
  119         -
pub fn de_delete_source_repository_http_response(
  120         -
    _response_status: u16,
  121         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
  122         -
    _response_body: &[u8],
  123         -
) -> std::result::Result<
  124         -
    crate::operation::delete_source_repository::DeleteSourceRepositoryOutput,
  125         -
    crate::operation::delete_source_repository::DeleteSourceRepositoryError,
  126         -
> {
  127         -
    Ok({
  128         -
        #[allow(unused_mut)]
  129         -
        let mut output = crate::operation::delete_source_repository::builders::DeleteSourceRepositoryOutputBuilder::default();
  130         -
        output = crate::protocol_serde::shape_delete_source_repository::de_delete_source_repository(_response_body, output)
  131         -
            .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?;
  132         -
        output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
  133         -
        crate::serde_util::delete_source_repository_output_output_correct_errors(output)
  134         -
            .build()
  135         -
            .map_err(crate::operation::delete_source_repository::DeleteSourceRepositoryError::unhandled)?
  136         -
    })
  137         -
}
  138         -
  139         -
pub(crate) fn de_delete_source_repository(
  140         -
    _value: &[u8],
  141         -
    mut builder: crate::operation::delete_source_repository::builders::DeleteSourceRepositoryOutputBuilder,
  142         -
) -> ::std::result::Result<
  143         -
    crate::operation::delete_source_repository::builders::DeleteSourceRepositoryOutputBuilder,
  144         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
  145         -
> {
  146         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
  147         -
    let tokens = &mut tokens_owned;
  148         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
  149         -
    loop {
  150         -
        match tokens.next().transpose()? {
  151         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
  152         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  153         -
                "name" => {
  154         -
                    builder = builder.set_name(
  155         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  156         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  157         -
                            .transpose()?,
  158         -
                    );
  159         -
                }
  160         -
                "projectName" => {
  161         -
                    builder = builder.set_project_name(
  162         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  163         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  164         -
                            .transpose()?,
  165         -
                    );
  166         -
                }
  167         -
                "spaceName" => {
  168         -
                    builder = builder.set_space_name(
  169         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  170         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  171         -
                            .transpose()?,
  172         -
                    );
  173         -
                }
  174         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  175         -
            },
  176         -
            other => {
  177         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  178         -
                    "expected object key or end object, found: {other:?}"
  179         -
                )))
  180         -
            }
  181         -
        }
  182         -
    }
  183         -
    if tokens.next().is_some() {
  184         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  185         -
            "found more JSON tokens after completing parsing",
  186         -
        ));
  187         -
    }
  188         -
    Ok(builder)
  189         -
}