// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_as2_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateAs2ConnectionOutput,
    crate::error::CreateAs2ConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::CreateAs2ConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateAs2ConnectionError {
                meta: generic,
                kind: crate::error::CreateAs2ConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateAs2ConnectionError {
            meta: generic,
            kind: crate::error::CreateAs2ConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateAs2ConnectionError {
                meta: generic,
                kind: crate::error::CreateAs2ConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateAs2ConnectionError {
                meta: generic,
                kind: crate::error::CreateAs2ConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateAs2ConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_as2_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateAs2ConnectionOutput,
    crate::error::CreateAs2ConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_as2_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_as2_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateAs2ConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_bucket_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateBucketConnectionOutput,
    crate::error::CreateBucketConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateBucketConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateBucketConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateBucketConnectionError {
                meta: generic,
                kind: crate::error::CreateBucketConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateBucketConnectionError {
            meta: generic,
            kind: crate::error::CreateBucketConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateBucketConnectionError {
                meta: generic,
                kind: crate::error::CreateBucketConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateBucketConnectionError {
                meta: generic,
                kind: crate::error::CreateBucketConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateBucketConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_bucket_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateBucketConnectionOutput,
    crate::error::CreateBucketConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_bucket_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_bucket_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateBucketConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_global_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateGlobalConnectionOutput,
    crate::error::CreateGlobalConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateGlobalConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateGlobalConnectionError {
                meta: generic,
                kind: crate::error::CreateGlobalConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateGlobalConnectionError {
            meta: generic,
            kind: crate::error::CreateGlobalConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateGlobalConnectionError {
                meta: generic,
                kind: crate::error::CreateGlobalConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateGlobalConnectionError {
                meta: generic,
                kind: crate::error::CreateGlobalConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateGlobalConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_global_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateGlobalConnectionOutput,
    crate::error::CreateGlobalConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_global_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_global_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateGlobalConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_inbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateInboundX12TransactionSettingsOutput,
    crate::error::CreateInboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateInboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateInboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ResourceConflictException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::resource_conflict_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "AccessDeniedException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::resource_not_found_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ServiceUnavailableException" => crate::error::CreateInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::CreateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::CreateInboundX12TransactionSettingsErrorKind::UnauthorizedError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::unauthorized_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        _ => crate::error::CreateInboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_inbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateInboundX12TransactionSettingsOutput,
    crate::error::CreateInboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::create_inbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_inbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::CreateInboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_outbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateOutboundX12TransactionSettingsOutput,
    crate::error::CreateOutboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateOutboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ResourceConflictException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "AccessDeniedException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::quota_exceeded_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ResourceNotFoundException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_not_found_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ServiceUnavailableException" => crate::error::CreateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::CreateOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateOutboundX12TransactionSettingsError {
                meta: generic,
                kind:
                    crate::error::CreateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(
                        {
                            #[allow(unused_mut)]
                            let mut tmp = {
                                #[allow(unused_mut)]
                                let mut output =
                                    crate::error::unauthorized_error::Builder::default();
                                let _ = response;
                                output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
                                output.build()
                            };
                            if tmp.message.is_none() {
                                tmp.message = _error_message;
                            }
                            tmp
                        },
                    ),
            }
        }
        _ => crate::error::CreateOutboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_outbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateOutboundX12TransactionSettingsOutput,
    crate::error::CreateOutboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::create_outbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_outbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::CreateOutboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_remote_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateRemoteFtpConnectionOutput,
    crate::error::CreateRemoteFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateRemoteFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateRemoteFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateRemoteFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateRemoteFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateRemoteFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_remote_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateRemoteFtpConnectionOutput,
    crate::error::CreateRemoteFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_remote_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_remote_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateRemoteFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_stedi_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateStediFtpConnectionOutput,
    crate::error::CreateStediFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::CreateStediFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateStediFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::CreateStediFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateStediFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::CreateStediFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateStediFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_stedi_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateStediFtpConnectionOutput,
    crate::error::CreateStediFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_stedi_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_stedi_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateStediFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_x12_partnership_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateX12PartnershipOutput,
    crate::error::CreateX12PartnershipError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateX12PartnershipError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::CreateX12PartnershipError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateX12PartnershipError {
                meta: generic,
                kind: crate::error::CreateX12PartnershipErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateX12PartnershipError {
            meta: generic,
            kind: crate::error::CreateX12PartnershipErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateX12PartnershipError {
                meta: generic,
                kind: crate::error::CreateX12PartnershipErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateX12PartnershipError {
                meta: generic,
                kind: crate::error::CreateX12PartnershipErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateX12PartnershipError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_x12_partnership_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::CreateX12PartnershipOutput,
    crate::error::CreateX12PartnershipError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_x12_partnership_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_x12_partnership(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateX12PartnershipError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_x12_profile_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateX12ProfileOutput, crate::error::CreateX12ProfileError>
{
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::CreateX12ProfileError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::CreateX12ProfileError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceConflictException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::ResourceConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::CreateX12ProfileError {
                meta: generic,
                kind: crate::error::CreateX12ProfileErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::CreateX12ProfileError {
            meta: generic,
            kind: crate::error::CreateX12ProfileErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::CreateX12ProfileError {
                meta: generic,
                kind: crate::error::CreateX12ProfileErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::CreateX12ProfileError {
                meta: generic,
                kind: crate::error::CreateX12ProfileErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::CreateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::CreateX12ProfileError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_create_x12_profile_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateX12ProfileOutput, crate::error::CreateX12ProfileError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::create_x12_profile_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_create_x12_profile(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::CreateX12ProfileError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_as2_basic_auth_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteAs2BasicAuthOutput,
    crate::error::DeleteAs2BasicAuthError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::DeleteAs2BasicAuthError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteAs2BasicAuthError {
                meta: generic,
                kind: crate::error::DeleteAs2BasicAuthErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteAs2BasicAuthError {
            meta: generic,
            kind: crate::error::DeleteAs2BasicAuthErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteAs2BasicAuthError {
                meta: generic,
                kind: crate::error::DeleteAs2BasicAuthErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteAs2BasicAuthError {
                meta: generic,
                kind: crate::error::DeleteAs2BasicAuthErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteAs2BasicAuthError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_as2_basic_auth_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteAs2BasicAuthOutput,
    crate::error::DeleteAs2BasicAuthError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_as2_basic_auth_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_as2_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteAs2ConnectionOutput,
    crate::error::DeleteAs2ConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::DeleteAs2ConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteAs2ConnectionError {
                meta: generic,
                kind: crate::error::DeleteAs2ConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteAs2ConnectionError {
            meta: generic,
            kind: crate::error::DeleteAs2ConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteAs2ConnectionError {
                meta: generic,
                kind: crate::error::DeleteAs2ConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteAs2ConnectionError {
                meta: generic,
                kind: crate::error::DeleteAs2ConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteAs2ConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_as2_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteAs2ConnectionOutput,
    crate::error::DeleteAs2ConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_as2_connection_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_bucket_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteBucketConnectionOutput,
    crate::error::DeleteBucketConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteBucketConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteBucketConnectionError {
                meta: generic,
                kind: crate::error::DeleteBucketConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteBucketConnectionError {
            meta: generic,
            kind: crate::error::DeleteBucketConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteBucketConnectionError {
                meta: generic,
                kind: crate::error::DeleteBucketConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteBucketConnectionError {
                meta: generic,
                kind: crate::error::DeleteBucketConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteBucketConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_bucket_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteBucketConnectionOutput,
    crate::error::DeleteBucketConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_bucket_connection_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_global_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteGlobalConnectionOutput,
    crate::error::DeleteGlobalConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteGlobalConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteGlobalConnectionError {
                meta: generic,
                kind: crate::error::DeleteGlobalConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteGlobalConnectionError {
            meta: generic,
            kind: crate::error::DeleteGlobalConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteGlobalConnectionError {
                meta: generic,
                kind: crate::error::DeleteGlobalConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteGlobalConnectionError {
                meta: generic,
                kind: crate::error::DeleteGlobalConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteGlobalConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_global_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteGlobalConnectionOutput,
    crate::error::DeleteGlobalConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_global_connection_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_inbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteInboundX12TransactionSettingsOutput,
    crate::error::DeleteInboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::DeleteInboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "AccessDeniedException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::resource_not_found_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ServiceUnavailableException" => crate::error::DeleteInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::DeleteInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::DeleteInboundX12TransactionSettingsErrorKind::UnauthorizedError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::unauthorized_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        _ => crate::error::DeleteInboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_inbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteInboundX12TransactionSettingsOutput,
    crate::error::DeleteInboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::delete_inbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_outbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteOutboundX12TransactionSettingsOutput,
    crate::error::DeleteOutboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::DeleteOutboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "AccessDeniedException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::quota_exceeded_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ResourceNotFoundException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::DeleteOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_not_found_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ServiceUnavailableException" => crate::error::DeleteOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::DeleteOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteOutboundX12TransactionSettingsError {
                meta: generic,
                kind:
                    crate::error::DeleteOutboundX12TransactionSettingsErrorKind::UnauthorizedError(
                        {
                            #[allow(unused_mut)]
                            let mut tmp = {
                                #[allow(unused_mut)]
                                let mut output =
                                    crate::error::unauthorized_error::Builder::default();
                                let _ = response;
                                output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteOutboundX12TransactionSettingsError::unhandled)?;
                                output.build()
                            };
                            if tmp.message.is_none() {
                                tmp.message = _error_message;
                            }
                            tmp
                        },
                    ),
            }
        }
        _ => crate::error::DeleteOutboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_outbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteOutboundX12TransactionSettingsOutput,
    crate::error::DeleteOutboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::delete_outbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_remote_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteRemoteFtpConnectionOutput,
    crate::error::DeleteRemoteFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteRemoteFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteRemoteFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteRemoteFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteRemoteFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteRemoteFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_remote_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteRemoteFtpConnectionOutput,
    crate::error::DeleteRemoteFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_remote_ftp_connection_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_stedi_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteStediFtpConnectionOutput,
    crate::error::DeleteStediFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::DeleteStediFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteStediFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteStediFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteStediFtpConnectionError {
            meta: generic,
            kind: crate::error::DeleteStediFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteStediFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteStediFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteStediFtpConnectionError {
                meta: generic,
                kind: crate::error::DeleteStediFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteStediFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_stedi_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteStediFtpConnectionOutput,
    crate::error::DeleteStediFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_stedi_ftp_connection_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_x12_partnership_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteX12PartnershipOutput,
    crate::error::DeleteX12PartnershipError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::DeleteX12PartnershipError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteX12PartnershipError {
                meta: generic,
                kind: crate::error::DeleteX12PartnershipErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteX12PartnershipError {
            meta: generic,
            kind: crate::error::DeleteX12PartnershipErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteX12PartnershipError {
                meta: generic,
                kind: crate::error::DeleteX12PartnershipErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteX12PartnershipError {
                meta: generic,
                kind: crate::error::DeleteX12PartnershipErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteX12PartnershipError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_x12_partnership_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::DeleteX12PartnershipOutput,
    crate::error::DeleteX12PartnershipError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_x12_partnership_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_x12_profile_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::DeleteX12ProfileOutput, crate::error::DeleteX12ProfileError>
{
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::DeleteX12ProfileError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::DeleteX12ProfileError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::DeleteX12ProfileError {
                meta: generic,
                kind: crate::error::DeleteX12ProfileErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::DeleteX12ProfileError {
            meta: generic,
            kind: crate::error::DeleteX12ProfileErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::DeleteX12ProfileError {
                meta: generic,
                kind: crate::error::DeleteX12ProfileErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::DeleteX12ProfileError {
                meta: generic,
                kind: crate::error::DeleteX12ProfileErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::DeleteX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::DeleteX12ProfileError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_delete_x12_profile_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::DeleteX12ProfileOutput, crate::error::DeleteX12ProfileError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::delete_x12_profile_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_generate_edi_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GenerateEdiOutput, crate::error::GenerateEdiError> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GenerateEdiError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GenerateEdiError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "JsonTranslationError" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::JsonTranslationError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::json_translation_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_json_translation_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GenerateEdiError {
                meta: generic,
                kind: crate::error::GenerateEdiErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GenerateEdiError {
            meta: generic,
            kind: crate::error::GenerateEdiErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GenerateEdiError {
                meta: generic,
                kind: crate::error::GenerateEdiErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GenerateEdiError {
                meta: generic,
                kind: crate::error::GenerateEdiErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEdiError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GenerateEdiError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_generate_edi_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GenerateEdiOutput, crate::error::GenerateEdiError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::generate_edi_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_generate_edi(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GenerateEdiError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_as2_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetAs2ConnectionOutput, crate::error::GetAs2ConnectionError>
{
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetAs2ConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetAs2ConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetAs2ConnectionError {
                meta: generic,
                kind: crate::error::GetAs2ConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetAs2ConnectionError {
            meta: generic,
            kind: crate::error::GetAs2ConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetAs2ConnectionError {
                meta: generic,
                kind: crate::error::GetAs2ConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetAs2ConnectionError {
                meta: generic,
                kind: crate::error::GetAs2ConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetAs2ConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_as2_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetAs2ConnectionOutput, crate::error::GetAs2ConnectionError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_as2_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_as2_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetAs2ConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_bucket_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetBucketConnectionOutput,
    crate::error::GetBucketConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetBucketConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetBucketConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetBucketConnectionError {
                meta: generic,
                kind: crate::error::GetBucketConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetBucketConnectionError {
            meta: generic,
            kind: crate::error::GetBucketConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetBucketConnectionError {
                meta: generic,
                kind: crate::error::GetBucketConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetBucketConnectionError {
                meta: generic,
                kind: crate::error::GetBucketConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetBucketConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_bucket_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetBucketConnectionOutput,
    crate::error::GetBucketConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_bucket_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_bucket_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetBucketConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_connections_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetConnectionsOutput, crate::error::GetConnectionsError> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetConnectionsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetConnectionsError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetConnectionsError {
                meta: generic,
                kind: crate::error::GetConnectionsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetConnectionsError {
            meta: generic,
            kind: crate::error::GetConnectionsErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetConnectionsError {
                meta: generic,
                kind: crate::error::GetConnectionsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetConnectionsError {
                meta: generic,
                kind: crate::error::GetConnectionsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetConnectionsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_connections_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetConnectionsOutput, crate::error::GetConnectionsError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_connections_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_connections(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetConnectionsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_global_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetGlobalConnectionOutput,
    crate::error::GetGlobalConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetGlobalConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetGlobalConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetGlobalConnectionError {
                meta: generic,
                kind: crate::error::GetGlobalConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetGlobalConnectionError {
            meta: generic,
            kind: crate::error::GetGlobalConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetGlobalConnectionError {
                meta: generic,
                kind: crate::error::GetGlobalConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetGlobalConnectionError {
                meta: generic,
                kind: crate::error::GetGlobalConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetGlobalConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_global_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetGlobalConnectionOutput,
    crate::error::GetGlobalConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_global_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_global_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetGlobalConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_inbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetInboundX12TransactionSettingsOutput,
    crate::error::GetInboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::GetInboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetInboundX12TransactionSettingsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output =
                            crate::error::service_unavailable_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ThrottlingException" => {
            crate::error::GetInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetInboundX12TransactionSettingsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetInboundX12TransactionSettingsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetInboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_inbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetInboundX12TransactionSettingsOutput,
    crate::error::GetInboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::get_inbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_inbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::GetInboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_outbound_x12_control_numbers_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetOutboundX12ControlNumbersOutput,
    crate::error::GetOutboundX12ControlNumbersError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::GetOutboundX12ControlNumbersError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetOutboundX12ControlNumbersError {
                meta: generic,
                kind: crate::error::GetOutboundX12ControlNumbersErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetOutboundX12ControlNumbersError {
            meta: generic,
            kind: crate::error::GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetOutboundX12ControlNumbersError {
                meta: generic,
                kind: crate::error::GetOutboundX12ControlNumbersErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetOutboundX12ControlNumbersError {
                meta: generic,
                kind: crate::error::GetOutboundX12ControlNumbersErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetOutboundX12ControlNumbersError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_outbound_x12_control_numbers_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetOutboundX12ControlNumbersOutput,
    crate::error::GetOutboundX12ControlNumbersError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_outbound_x12_control_numbers_output::Builder::default();
        let _ = response;
        output =
            crate::json_deser::deser_operation_crate_operation_get_outbound_x12_control_numbers(
                response.body().as_ref(),
                output,
            )
            .map_err(crate::error::GetOutboundX12ControlNumbersError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_outbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetOutboundX12TransactionSettingsOutput,
    crate::error::GetOutboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::GetOutboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::resource_not_found_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ServiceUnavailableException" => crate::error::GetOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output =
                            crate::error::service_unavailable_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ThrottlingException" => {
            crate::error::GetOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::GetOutboundX12TransactionSettingsErrorKind::UnauthorizedError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::unauthorized_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        _ => crate::error::GetOutboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_outbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetOutboundX12TransactionSettingsOutput,
    crate::error::GetOutboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::get_outbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_outbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::GetOutboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_remote_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetRemoteFtpConnectionOutput,
    crate::error::GetRemoteFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::GetRemoteFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::GetRemoteFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::GetRemoteFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::GetRemoteFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::GetRemoteFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetRemoteFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_remote_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetRemoteFtpConnectionOutput,
    crate::error::GetRemoteFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_remote_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_remote_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetRemoteFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_stedi_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetStediFtpConnectionOutput,
    crate::error::GetStediFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetStediFtpConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetStediFtpConnectionError {
                meta: generic,
                kind: crate::error::GetStediFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetStediFtpConnectionError {
            meta: generic,
            kind: crate::error::GetStediFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetStediFtpConnectionError {
                meta: generic,
                kind: crate::error::GetStediFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetStediFtpConnectionError {
                meta: generic,
                kind: crate::error::GetStediFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetStediFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_stedi_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetStediFtpConnectionOutput,
    crate::error::GetStediFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_stedi_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_stedi_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetStediFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_partnership_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetX12PartnershipOutput, crate::error::GetX12PartnershipError>
{
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetX12PartnershipError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetX12PartnershipError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetX12PartnershipError {
                meta: generic,
                kind: crate::error::GetX12PartnershipErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetX12PartnershipError {
            meta: generic,
            kind: crate::error::GetX12PartnershipErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetX12PartnershipError {
                meta: generic,
                kind: crate::error::GetX12PartnershipErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetX12PartnershipError {
                meta: generic,
                kind: crate::error::GetX12PartnershipErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetX12PartnershipError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_partnership_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetX12PartnershipOutput, crate::error::GetX12PartnershipError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_x12_partnership_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_x12_partnership(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetX12PartnershipError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_partnership_by_interchanges_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetX12PartnershipByInterchangesOutput,
    crate::error::GetX12PartnershipByInterchangesError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetX12PartnershipByInterchangesError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetX12PartnershipByInterchangesError {
                meta: generic,
                kind: crate::error::GetX12PartnershipByInterchangesErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetX12PartnershipByInterchangesError {
            meta: generic,
            kind: crate::error::GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output =
                            crate::error::service_unavailable_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ThrottlingException" => {
            crate::error::GetX12PartnershipByInterchangesError {
                meta: generic,
                kind: crate::error::GetX12PartnershipByInterchangesErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetX12PartnershipByInterchangesError {
                meta: generic,
                kind: crate::error::GetX12PartnershipByInterchangesErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetX12PartnershipByInterchangesError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_partnership_by_interchanges_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetX12PartnershipByInterchangesOutput,
    crate::error::GetX12PartnershipByInterchangesError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::get_x12_partnership_by_interchanges_output::Builder::default();
        let _ = response;
        output =
            crate::json_deser::deser_operation_crate_operation_get_x12_partnership_by_interchanges(
                response.body().as_ref(),
                output,
            )
            .map_err(crate::error::GetX12PartnershipByInterchangesError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_profile_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetX12ProfileOutput, crate::error::GetX12ProfileError> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetX12ProfileError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::GetX12ProfileError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetX12ProfileError {
                meta: generic,
                kind: crate::error::GetX12ProfileErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetX12ProfileError {
            meta: generic,
            kind: crate::error::GetX12ProfileErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetX12ProfileError {
                meta: generic,
                kind: crate::error::GetX12ProfileErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetX12ProfileError {
                meta: generic,
                kind: crate::error::GetX12ProfileErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetX12ProfileError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_profile_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::GetX12ProfileOutput, crate::error::GetX12ProfileError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_x12_profile_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_x12_profile(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetX12ProfileError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_profile_by_interchange_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetX12ProfileByInterchangeOutput,
    crate::error::GetX12ProfileByInterchangeError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::GetX12ProfileByInterchangeError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::GetX12ProfileByInterchangeError {
                meta: generic,
                kind: crate::error::GetX12ProfileByInterchangeErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::GetX12ProfileByInterchangeError {
            meta: generic,
            kind: crate::error::GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::GetX12ProfileByInterchangeError {
                meta: generic,
                kind: crate::error::GetX12ProfileByInterchangeErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::GetX12ProfileByInterchangeError {
                meta: generic,
                kind: crate::error::GetX12ProfileByInterchangeErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::GetX12ProfileByInterchangeError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_get_x12_profile_by_interchange_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::GetX12ProfileByInterchangeOutput,
    crate::error::GetX12ProfileByInterchangeError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::get_x12_profile_by_interchange_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_get_x12_profile_by_interchange(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::GetX12ProfileByInterchangeError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_increment_x12_control_number_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::IncrementX12ControlNumberOutput,
    crate::error::IncrementX12ControlNumberError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::IncrementX12ControlNumberError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::IncrementX12ControlNumberError {
                meta: generic,
                kind: crate::error::IncrementX12ControlNumberErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::IncrementX12ControlNumberError {
            meta: generic,
            kind: crate::error::IncrementX12ControlNumberErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::IncrementX12ControlNumberError {
                meta: generic,
                kind: crate::error::IncrementX12ControlNumberErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::IncrementX12ControlNumberError {
                meta: generic,
                kind: crate::error::IncrementX12ControlNumberErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::IncrementX12ControlNumberError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_increment_x12_control_number_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::IncrementX12ControlNumberOutput,
    crate::error::IncrementX12ControlNumberError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::increment_x12_control_number_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_increment_x12_control_number(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::IncrementX12ControlNumberError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_global_connections_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::ListGlobalConnectionsOutput,
    crate::error::ListGlobalConnectionsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::ListGlobalConnectionsError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::ListGlobalConnectionsError {
                meta: generic,
                kind: crate::error::ListGlobalConnectionsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::ListGlobalConnectionsError {
            meta: generic,
            kind: crate::error::ListGlobalConnectionsErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::ListGlobalConnectionsError {
                meta: generic,
                kind: crate::error::ListGlobalConnectionsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::ListGlobalConnectionsError {
                meta: generic,
                kind: crate::error::ListGlobalConnectionsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::ListGlobalConnectionsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_global_connections_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::ListGlobalConnectionsOutput,
    crate::error::ListGlobalConnectionsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::list_global_connections_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_list_global_connections(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::ListGlobalConnectionsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_x12_partnerships_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::ListX12PartnershipsOutput,
    crate::error::ListX12PartnershipsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::ListX12PartnershipsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::ListX12PartnershipsError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::ListX12PartnershipsError {
                meta: generic,
                kind: crate::error::ListX12PartnershipsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::ListX12PartnershipsError {
            meta: generic,
            kind: crate::error::ListX12PartnershipsErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::ListX12PartnershipsError {
                meta: generic,
                kind: crate::error::ListX12PartnershipsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::ListX12PartnershipsError {
                meta: generic,
                kind: crate::error::ListX12PartnershipsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12PartnershipsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::ListX12PartnershipsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_x12_partnerships_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::ListX12PartnershipsOutput,
    crate::error::ListX12PartnershipsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::list_x12_partnerships_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_list_x12_partnerships(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::ListX12PartnershipsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_x12_profiles_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListX12ProfilesOutput, crate::error::ListX12ProfilesError> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::ListX12ProfilesError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::ListX12ProfilesError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::ListX12ProfilesError {
                meta: generic,
                kind: crate::error::ListX12ProfilesErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::ListX12ProfilesError {
            meta: generic,
            kind: crate::error::ListX12ProfilesErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::ListX12ProfilesError {
                meta: generic,
                kind: crate::error::ListX12ProfilesErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::ListX12ProfilesError {
                meta: generic,
                kind: crate::error::ListX12ProfilesErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::ListX12ProfilesError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::ListX12ProfilesError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_list_x12_profiles_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListX12ProfilesOutput, crate::error::ListX12ProfilesError> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::list_x12_profiles_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_list_x12_profiles(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::ListX12ProfilesError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_set_outbound_x12_control_number_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::SetOutboundX12ControlNumberOutput,
    crate::error::SetOutboundX12ControlNumberError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::SetOutboundX12ControlNumberError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::SetOutboundX12ControlNumberError {
                meta: generic,
                kind: crate::error::SetOutboundX12ControlNumberErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::SetOutboundX12ControlNumberError {
            meta: generic,
            kind: crate::error::SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::SetOutboundX12ControlNumberError {
                meta: generic,
                kind: crate::error::SetOutboundX12ControlNumberErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::SetOutboundX12ControlNumberError {
                meta: generic,
                kind: crate::error::SetOutboundX12ControlNumberErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::SetOutboundX12ControlNumberError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_set_outbound_x12_control_number_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::SetOutboundX12ControlNumberOutput,
    crate::error::SetOutboundX12ControlNumberError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::set_outbound_x12_control_number_output::Builder::default();
        let _ = response;
        output =
            crate::json_deser::deser_operation_crate_operation_set_outbound_x12_control_number(
                response.body().as_ref(),
                output,
            )
            .map_err(crate::error::SetOutboundX12ControlNumberError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_basic_auth_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2BasicAuthOutput,
    crate::error::UpdateAs2BasicAuthError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::UpdateAs2BasicAuthError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateAs2BasicAuthError {
                meta: generic,
                kind: crate::error::UpdateAs2BasicAuthErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateAs2BasicAuthError {
            meta: generic,
            kind: crate::error::UpdateAs2BasicAuthErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateAs2BasicAuthError {
                meta: generic,
                kind: crate::error::UpdateAs2BasicAuthErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateAs2BasicAuthError {
                meta: generic,
                kind: crate::error::UpdateAs2BasicAuthErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateAs2BasicAuthError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_basic_auth_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2BasicAuthOutput,
    crate::error::UpdateAs2BasicAuthError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_as2_basic_auth_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_as2_basic_auth(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateAs2BasicAuthError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2ConnectionOutput,
    crate::error::UpdateAs2ConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::UpdateAs2ConnectionError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateAs2ConnectionError {
                meta: generic,
                kind: crate::error::UpdateAs2ConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateAs2ConnectionError {
            meta: generic,
            kind: crate::error::UpdateAs2ConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateAs2ConnectionError {
                meta: generic,
                kind: crate::error::UpdateAs2ConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateAs2ConnectionError {
                meta: generic,
                kind: crate::error::UpdateAs2ConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateAs2ConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2ConnectionOutput,
    crate::error::UpdateAs2ConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_as2_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_as2_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateAs2ConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_credentials_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2CredentialsOutput,
    crate::error::UpdateAs2CredentialsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::UpdateAs2CredentialsError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateAs2CredentialsError {
                meta: generic,
                kind: crate::error::UpdateAs2CredentialsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateAs2CredentialsError {
            meta: generic,
            kind: crate::error::UpdateAs2CredentialsErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateAs2CredentialsError {
                meta: generic,
                kind: crate::error::UpdateAs2CredentialsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateAs2CredentialsError {
                meta: generic,
                kind: crate::error::UpdateAs2CredentialsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateAs2CredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateAs2CredentialsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_as2_credentials_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateAs2CredentialsOutput,
    crate::error::UpdateAs2CredentialsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_as2_credentials_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_bucket_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateBucketConnectionOutput,
    crate::error::UpdateBucketConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateBucketConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateBucketConnectionError {
                meta: generic,
                kind: crate::error::UpdateBucketConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateBucketConnectionError {
            meta: generic,
            kind: crate::error::UpdateBucketConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateBucketConnectionError {
                meta: generic,
                kind: crate::error::UpdateBucketConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateBucketConnectionError {
                meta: generic,
                kind: crate::error::UpdateBucketConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateBucketConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_bucket_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateBucketConnectionOutput,
    crate::error::UpdateBucketConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_bucket_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_bucket_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateBucketConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_global_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateGlobalConnectionOutput,
    crate::error::UpdateGlobalConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateGlobalConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateGlobalConnectionError {
                meta: generic,
                kind: crate::error::UpdateGlobalConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateGlobalConnectionError {
            meta: generic,
            kind: crate::error::UpdateGlobalConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateGlobalConnectionError {
                meta: generic,
                kind: crate::error::UpdateGlobalConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateGlobalConnectionError {
                meta: generic,
                kind: crate::error::UpdateGlobalConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateGlobalConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_global_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateGlobalConnectionOutput,
    crate::error::UpdateGlobalConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_global_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_global_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateGlobalConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_inbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateInboundX12TransactionSettingsOutput,
    crate::error::UpdateInboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::UpdateInboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "AccessDeniedException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::resource_not_found_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ServiceUnavailableException" => crate::error::UpdateInboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::UpdateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateInboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::UpdateInboundX12TransactionSettingsErrorKind::UnauthorizedError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::unauthorized_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        _ => crate::error::UpdateInboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_inbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateInboundX12TransactionSettingsOutput,
    crate::error::UpdateInboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::update_inbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_inbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::UpdateInboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_outbound_x12_transaction_settings_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateOutboundX12TransactionSettingsOutput,
    crate::error::UpdateOutboundX12TransactionSettingsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled(generic))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::UpdateOutboundX12TransactionSettingsErrorKind::OperationConflictError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::operation_conflict_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "AccessDeniedException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::BadRequestError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::bad_request_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::gateway_timeout_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "InternalFailureException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::InternalFailureError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::internal_failure_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "QuotaExceededException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(
                {
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::quota_exceeded_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                },
            ),
        },
        "ResourceNotFoundException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::UpdateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::resource_not_found_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ServiceUnavailableException" => crate::error::UpdateOutboundX12TransactionSettingsError {
            meta: generic,
            kind:
                crate::error::UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output =
                                crate::error::service_unavailable_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
        },
        "ThrottlingException" => {
            crate::error::UpdateOutboundX12TransactionSettingsError {
                meta: generic,
                kind: crate::error::UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError(
                    {
                        #[allow(unused_mut)]
                        let mut tmp = {
                            #[allow(unused_mut)]
                            let mut output = crate::error::throttling_error::Builder::default();
                            let _ = response;
                            output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                            output.build()
                        };
                        if tmp.message.is_none() {
                            tmp.message = _error_message;
                        }
                        tmp
                    },
                ),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateOutboundX12TransactionSettingsError {
                meta: generic,
                kind:
                    crate::error::UpdateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(
                        {
                            #[allow(unused_mut)]
                            let mut tmp = {
                                #[allow(unused_mut)]
                                let mut output =
                                    crate::error::unauthorized_error::Builder::default();
                                let _ = response;
                                output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
                                output.build()
                            };
                            if tmp.message.is_none() {
                                tmp.message = _error_message;
                            }
                            tmp
                        },
                    ),
            }
        }
        _ => crate::error::UpdateOutboundX12TransactionSettingsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_outbound_x12_transaction_settings_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateOutboundX12TransactionSettingsOutput,
    crate::error::UpdateOutboundX12TransactionSettingsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output =
            crate::output::update_outbound_x12_transaction_settings_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_outbound_x12_transaction_settings(response.body().as_ref(), output).map_err(crate::error::UpdateOutboundX12TransactionSettingsError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_remote_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateRemoteFtpConnectionOutput,
    crate::error::UpdateRemoteFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateRemoteFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateRemoteFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateRemoteFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateRemoteFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_remote_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateRemoteFtpConnectionOutput,
    crate::error::UpdateRemoteFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_remote_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_remote_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateRemoteFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_remote_ftp_credentials_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateRemoteFtpCredentialsOutput,
    crate::error::UpdateRemoteFtpCredentialsError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateRemoteFtpCredentialsError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "AccessDeniedException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateRemoteFtpCredentialsError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateRemoteFtpCredentialsError {
            meta: generic,
            kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateRemoteFtpCredentialsError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateRemoteFtpCredentialsError {
                meta: generic,
                kind: crate::error::UpdateRemoteFtpCredentialsErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateRemoteFtpCredentialsError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateRemoteFtpCredentialsError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_remote_ftp_credentials_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateRemoteFtpCredentialsOutput,
    crate::error::UpdateRemoteFtpCredentialsError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_remote_ftp_credentials_output::Builder::default();
        let _ = response;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_stedi_ftp_connection_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateStediFtpConnectionOutput,
    crate::error::UpdateStediFtpConnectionError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => {
            return Err(crate::error::UpdateStediFtpConnectionError::unhandled(
                generic,
            ))
        }
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateStediFtpConnectionErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateStediFtpConnectionError {
            meta: generic,
            kind: crate::error::UpdateStediFtpConnectionErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateStediFtpConnectionErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateStediFtpConnectionError {
                meta: generic,
                kind: crate::error::UpdateStediFtpConnectionErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateStediFtpConnectionError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_stedi_ftp_connection_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateStediFtpConnectionOutput,
    crate::error::UpdateStediFtpConnectionError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_stedi_ftp_connection_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_stedi_ftp_connection(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateStediFtpConnectionError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_x12_partnership_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateX12PartnershipOutput,
    crate::error::UpdateX12PartnershipError,
> {
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::UpdateX12PartnershipError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateX12PartnershipError {
                meta: generic,
                kind: crate::error::UpdateX12PartnershipErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateX12PartnershipError {
            meta: generic,
            kind: crate::error::UpdateX12PartnershipErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateX12PartnershipError {
                meta: generic,
                kind: crate::error::UpdateX12PartnershipErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateX12PartnershipError {
                meta: generic,
                kind: crate::error::UpdateX12PartnershipErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateX12PartnershipError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_x12_partnership_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
    crate::output::UpdateX12PartnershipOutput,
    crate::error::UpdateX12PartnershipError,
> {
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_x12_partnership_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_x12_partnership(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateX12PartnershipError::unhandled)?;
        output.build()
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_x12_profile_error(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::UpdateX12ProfileOutput, crate::error::UpdateX12ProfileError>
{
    let generic = crate::json_deser::parse_http_generic_error(response)
        .map_err(crate::error::UpdateX12ProfileError::unhandled)?;
    let error_code = match generic.code() {
        Some(code) => code,
        None => return Err(crate::error::UpdateX12ProfileError::unhandled(generic)),
    };

    let _error_message = generic.message().map(|msg| msg.to_owned());
    Err(match error_code {
        "OperationConflictException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::OperationConflictError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::operation_conflict_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_operation_conflict_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "AccessDeniedException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::AccessDeniedError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::access_denied_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_access_denied_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "BadRequestException" => {
            crate::error::UpdateX12ProfileError {
                meta: generic,
                kind: crate::error::UpdateX12ProfileErrorKind::BadRequestError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::bad_request_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_bad_request_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "GatewayTimeoutException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::GatewayTimeoutError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::gateway_timeout_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_gateway_timeout_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "InternalFailureException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::InternalFailureError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::internal_failure_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_internal_failure_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "QuotaExceededException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::QuotaExceededError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::quota_exceeded_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_quota_exceeded_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ResourceNotFoundException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::ResourceNotFoundError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::resource_not_found_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_resource_not_found_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ServiceUnavailableException" => crate::error::UpdateX12ProfileError {
            meta: generic,
            kind: crate::error::UpdateX12ProfileErrorKind::ServiceUnavailableError({
                #[allow(unused_mut)]
                let mut tmp = {
                    #[allow(unused_mut)]
                    let mut output = crate::error::service_unavailable_error::Builder::default();
                    let _ = response;
                    output = crate::json_deser::deser_structure_crate_error_service_unavailable_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                    output.build()
                };
                if tmp.message.is_none() {
                    tmp.message = _error_message;
                }
                tmp
            }),
        },
        "ThrottlingException" => {
            crate::error::UpdateX12ProfileError {
                meta: generic,
                kind: crate::error::UpdateX12ProfileErrorKind::ThrottlingError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::throttling_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_throttling_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        "UnauthorizedException" => {
            crate::error::UpdateX12ProfileError {
                meta: generic,
                kind: crate::error::UpdateX12ProfileErrorKind::UnauthorizedError({
                    #[allow(unused_mut)]
                    let mut tmp = {
                        #[allow(unused_mut)]
                        let mut output = crate::error::unauthorized_error::Builder::default();
                        let _ = response;
                        output = crate::json_deser::deser_structure_crate_error_unauthorized_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateX12ProfileError::unhandled)?;
                        output.build()
                    };
                    if tmp.message.is_none() {
                        tmp.message = _error_message;
                    }
                    tmp
                }),
            }
        }
        _ => crate::error::UpdateX12ProfileError::generic(generic),
    })
}

#[allow(clippy::unnecessary_wraps)]
pub fn parse_update_x12_profile_response(
    response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::UpdateX12ProfileOutput, crate::error::UpdateX12ProfileError>
{
    Ok({
        #[allow(unused_mut)]
        let mut output = crate::output::update_x12_profile_output::Builder::default();
        let _ = response;
        output = crate::json_deser::deser_operation_crate_operation_update_x12_profile(
            response.body().as_ref(),
            output,
        )
        .map_err(crate::error::UpdateX12ProfileError::unhandled)?;
        output.build()
    })
}
