Server Test Python

Server Test Python

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-python/ebs/rust-server-codegen-python/src/python_module_export.rs

@@ -1,1 +70,70 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pymodule]
    3      3   
#[pyo3(name = "ebs")]
    4      4   
pub fn python_library(py: ::pyo3::Python<'_>, m: &::pyo3::types::PyModule) -> ::pyo3::PyResult<()> {
    5      5   
    let input = ::pyo3::types::PyModule::new(py, "input")?;
    6      6   
    let output = ::pyo3::types::PyModule::new(py, "output")?;
    7      7   
    let error = ::pyo3::types::PyModule::new(py, "error")?;
    8         -
    error.add_class::<crate::error::InternalServerError>()?;
    9         -
    error.add_class::<crate::error::ValidationException>()?;
   10         -
    let model = ::pyo3::types::PyModule::new(py, "model")?;
   11         -
    model.add_class::<crate::model::ValidationExceptionField>()?;
   12         -
    error.add_class::<crate::error::ConcurrentLimitExceededException>()?;
   13         -
    error.add_class::<crate::error::ServiceQuotaExceededException>()?;
   14         -
    model.add_class::<crate::model::ServiceQuotaExceededExceptionReason>()?;
   15         -
    error.add_class::<crate::error::RequestThrottledException>()?;
   16         -
    model.add_class::<crate::model::RequestThrottledExceptionReason>()?;
   17         -
    error.add_class::<crate::error::ConflictException>()?;
   18         -
    error.add_class::<crate::error::AccessDeniedException>()?;
   19         -
    model.add_class::<crate::model::AccessDeniedExceptionReason>()?;
   20         -
    error.add_class::<crate::error::ResourceNotFoundException>()?;
   21         -
    model.add_class::<crate::model::ResourceNotFoundExceptionReason>()?;
           8  +
    input.add_class::<crate::input::CompleteSnapshotInput>()?;
           9  +
    output.add_class::<crate::output::CompleteSnapshotOutput>()?;
   22     10   
    error.add_class::<crate::error::InternalServerException>()?;
   23         -
    output.add_class::<crate::output::StartSnapshotOutput>()?;
   24         -
    model.add_class::<crate::model::Status>()?;
   25         -
    model.add_class::<crate::model::Tag>()?;
   26         -
    input.add_class::<crate::input::StartSnapshotInput>()?;
          11  +
    error.add_class::<crate::error::ResourceNotFoundException>()?;
          12  +
    error.add_class::<crate::error::AccessDeniedException>()?;
          13  +
    error.add_class::<crate::error::RequestThrottledException>()?;
          14  +
    error.add_class::<crate::error::ServiceQuotaExceededException>()?;
          15  +
    error.add_class::<crate::error::ValidationException>()?;
          16  +
    error.add_class::<crate::error::InternalServerError>()?;
          17  +
    input.add_class::<crate::input::GetSnapshotBlockInput>()?;
          18  +
    output.add_class::<crate::output::GetSnapshotBlockOutput>()?;
          19  +
    input.add_class::<crate::input::ListChangedBlocksInput>()?;
          20  +
    output.add_class::<crate::output::ListChangedBlocksOutput>()?;
          21  +
    input.add_class::<crate::input::ListSnapshotBlocksInput>()?;
          22  +
    output.add_class::<crate::output::ListSnapshotBlocksOutput>()?;
          23  +
    input.add_class::<crate::input::PutSnapshotBlockInput>()?;
   27     24   
    output.add_class::<crate::output::PutSnapshotBlockOutput>()?;
          25  +
    input.add_class::<crate::input::StartSnapshotInput>()?;
          26  +
    output.add_class::<crate::output::StartSnapshotOutput>()?;
          27  +
    error.add_class::<crate::error::ConflictException>()?;
          28  +
    error.add_class::<crate::error::ConcurrentLimitExceededException>()?;
          29  +
    let model = ::pyo3::types::PyModule::new(py, "model")?;
          30  +
    model.add_class::<crate::model::ChecksumAggregationMethod>()?;
   28     31   
    model.add_class::<crate::model::ChecksumAlgorithm>()?;
   29         -
    input.add_class::<crate::input::PutSnapshotBlockInput>()?;
   30         -
    output.add_class::<crate::output::ListSnapshotBlocksOutput>()?;
   31         -
    model.add_class::<crate::model::Block>()?;
   32         -
    input.add_class::<crate::input::ListSnapshotBlocksInput>()?;
   33         -
    output.add_class::<crate::output::ListChangedBlocksOutput>()?;
          32  +
    model.add_class::<crate::model::Status>()?;
          33  +
    model.add_class::<crate::model::ResourceNotFoundExceptionReason>()?;
          34  +
    model.add_class::<crate::model::AccessDeniedExceptionReason>()?;
          35  +
    model.add_class::<crate::model::RequestThrottledExceptionReason>()?;
          36  +
    model.add_class::<crate::model::ServiceQuotaExceededExceptionReason>()?;
          37  +
    model.add_class::<crate::model::ValidationExceptionField>()?;
   34     38   
    model.add_class::<crate::model::ChangedBlock>()?;
   35         -
    input.add_class::<crate::input::ListChangedBlocksInput>()?;
   36         -
    output.add_class::<crate::output::GetSnapshotBlockOutput>()?;
   37         -
    input.add_class::<crate::input::GetSnapshotBlockInput>()?;
   38         -
    output.add_class::<crate::output::CompleteSnapshotOutput>()?;
   39         -
    input.add_class::<crate::input::CompleteSnapshotInput>()?;
   40         -
    model.add_class::<crate::model::ChecksumAggregationMethod>()?;
          39  +
    model.add_class::<crate::model::Block>()?;
          40  +
    model.add_class::<crate::model::Tag>()?;
   41     41   
    ::pyo3::py_run!(py, input, "import sys; sys.modules['ebs.input'] = input");
   42     42   
    m.add_submodule(input)?;
   43     43   
    ::pyo3::py_run!(py, output, "import sys; sys.modules['ebs.output'] = output");
   44     44   
    m.add_submodule(output)?;
   45     45   
    ::pyo3::py_run!(py, error, "import sys; sys.modules['ebs.error'] = error");
   46     46   
    m.add_submodule(error)?;
   47     47   
    ::pyo3::py_run!(py, model, "import sys; sys.modules['ebs.model'] = model");
   48     48   
    m.add_submodule(model)?;
   49     49   
    let types = ::pyo3::types::PyModule::new(py, "types")?;
   50     50   
    types.add_class::<::aws_smithy_http_server_python::types::Blob>()?;

tmp-codegen-diff/codegen-server-test-python/ebs/rust-server-codegen-python/src/python_operation_adaptor.rs

@@ -1,1 +316,316 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Python handler for operation `StartSnapshot`.
    3         -
pub(crate) async fn start_snapshot(
    4         -
    input: crate::input::StartSnapshotInput,
           2  +
/// Python handler for operation `CompleteSnapshot`.
           3  +
pub(crate) async fn complete_snapshot(
           4  +
    input: crate::input::CompleteSnapshotInput,
    5      5   
    state: ::aws_smithy_legacy_http_server::Extension<
    6      6   
        ::aws_smithy_http_server_python::context::PyContext,
    7      7   
    >,
    8      8   
    handler: ::aws_smithy_http_server_python::PyHandler,
    9         -
) -> std::result::Result<crate::output::StartSnapshotOutput, crate::error::StartSnapshotError> {
           9  +
) -> std::result::Result<crate::output::CompleteSnapshotOutput, crate::error::CompleteSnapshotError>
          10  +
{
   10     11   
    // Async block used to run the handler and catch any Python error.
   11     12   
    let result = if handler.is_coroutine {
   12     13   
        ::tracing::trace!(
   13         -
            name = "start_snapshot",
          14  +
            name = "complete_snapshot",
   14     15   
            "executing python handler coroutine"
   15     16   
        );
   16     17   
        let result = ::pyo3::Python::with_gil(|py| {
   17     18   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   18     19   
            let coroutine = if handler.args == 1 {
   19     20   
                pyhandler.call1((input,))?
   20     21   
            } else {
   21     22   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   22     23   
            };
   23     24   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   24     25   
        })?;
   25     26   
        result.await.and_then(|r| {
   26         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::StartSnapshotOutput>(py))
          27  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::CompleteSnapshotOutput>(py))
   27     28   
        })
   28     29   
    } else {
   29         -
        ::tracing::trace!(name = "start_snapshot", "executing python handler function");
          30  +
        ::tracing::trace!(
          31  +
            name = "complete_snapshot",
          32  +
            "executing python handler function"
          33  +
        );
   30     34   
        ::pyo3::Python::with_gil(|py| {
   31     35   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   32     36   
            let output = if handler.args == 1 {
   33     37   
                pyhandler.call1((input,))?
   34     38   
            } else {
   35     39   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   36     40   
            };
   37         -
            output.extract::<crate::output::StartSnapshotOutput>()
          41  +
            output.extract::<crate::output::CompleteSnapshotOutput>()
   38     42   
        })
   39     43   
    };
   40     44   
    // Catch and record a Python traceback.
   41     45   
    result.map_err(|e| {
   42     46   
        let rich_py_err =
   43     47   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   44     48   
                e.clone_ref(py)
   45     49   
            }));
   46     50   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   47     51   
        e.into()
   48     52   
    })
   49     53   
}
   50     54   
   51         -
/// Python handler for operation `PutSnapshotBlock`.
   52         -
pub(crate) async fn put_snapshot_block(
   53         -
    input: crate::input::PutSnapshotBlockInput,
          55  +
/// Python handler for operation `GetSnapshotBlock`.
          56  +
pub(crate) async fn get_snapshot_block(
          57  +
    input: crate::input::GetSnapshotBlockInput,
   54     58   
    state: ::aws_smithy_legacy_http_server::Extension<
   55     59   
        ::aws_smithy_http_server_python::context::PyContext,
   56     60   
    >,
   57     61   
    handler: ::aws_smithy_http_server_python::PyHandler,
   58         -
) -> std::result::Result<crate::output::PutSnapshotBlockOutput, crate::error::PutSnapshotBlockError>
          62  +
) -> std::result::Result<crate::output::GetSnapshotBlockOutput, crate::error::GetSnapshotBlockError>
   59     63   
{
   60     64   
    // Async block used to run the handler and catch any Python error.
   61     65   
    let result = if handler.is_coroutine {
   62     66   
        ::tracing::trace!(
   63         -
            name = "put_snapshot_block",
          67  +
            name = "get_snapshot_block",
   64     68   
            "executing python handler coroutine"
   65     69   
        );
   66     70   
        let result = ::pyo3::Python::with_gil(|py| {
   67     71   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   68     72   
            let coroutine = if handler.args == 1 {
   69     73   
                pyhandler.call1((input,))?
   70     74   
            } else {
   71     75   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   72     76   
            };
   73     77   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   74     78   
        })?;
   75     79   
        result.await.and_then(|r| {
   76         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::PutSnapshotBlockOutput>(py))
          80  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GetSnapshotBlockOutput>(py))
   77     81   
        })
   78     82   
    } else {
   79     83   
        ::tracing::trace!(
   80         -
            name = "put_snapshot_block",
          84  +
            name = "get_snapshot_block",
   81     85   
            "executing python handler function"
   82     86   
        );
   83     87   
        ::pyo3::Python::with_gil(|py| {
   84     88   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   85     89   
            let output = if handler.args == 1 {
   86     90   
                pyhandler.call1((input,))?
   87     91   
            } else {
   88     92   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   89     93   
            };
   90         -
            output.extract::<crate::output::PutSnapshotBlockOutput>()
          94  +
            output.extract::<crate::output::GetSnapshotBlockOutput>()
   91     95   
        })
   92     96   
    };
   93     97   
    // Catch and record a Python traceback.
   94     98   
    result.map_err(|e| {
   95     99   
        let rich_py_err =
   96    100   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   97    101   
                e.clone_ref(py)
   98    102   
            }));
   99    103   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  100    104   
        e.into()
  101    105   
    })
  102    106   
}
  103    107   
  104         -
/// Python handler for operation `ListSnapshotBlocks`.
  105         -
pub(crate) async fn list_snapshot_blocks(
  106         -
    input: crate::input::ListSnapshotBlocksInput,
         108  +
/// Python handler for operation `ListChangedBlocks`.
         109  +
pub(crate) async fn list_changed_blocks(
         110  +
    input: crate::input::ListChangedBlocksInput,
  107    111   
    state: ::aws_smithy_legacy_http_server::Extension<
  108    112   
        ::aws_smithy_http_server_python::context::PyContext,
  109    113   
    >,
  110    114   
    handler: ::aws_smithy_http_server_python::PyHandler,
  111         -
) -> std::result::Result<
  112         -
    crate::output::ListSnapshotBlocksOutput,
  113         -
    crate::error::ListSnapshotBlocksError,
  114         -
> {
         115  +
) -> std::result::Result<crate::output::ListChangedBlocksOutput, crate::error::ListChangedBlocksError>
         116  +
{
  115    117   
    // Async block used to run the handler and catch any Python error.
  116    118   
    let result = if handler.is_coroutine {
  117    119   
        ::tracing::trace!(
  118         -
            name = "list_snapshot_blocks",
         120  +
            name = "list_changed_blocks",
  119    121   
            "executing python handler coroutine"
  120    122   
        );
  121    123   
        let result = ::pyo3::Python::with_gil(|py| {
  122    124   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  123    125   
            let coroutine = if handler.args == 1 {
  124    126   
                pyhandler.call1((input,))?
  125    127   
            } else {
  126    128   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  127    129   
            };
  128    130   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  129    131   
        })?;
  130    132   
        result.await.and_then(|r| {
  131         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListSnapshotBlocksOutput>(py))
         133  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListChangedBlocksOutput>(py))
  132    134   
        })
  133    135   
    } else {
  134    136   
        ::tracing::trace!(
  135         -
            name = "list_snapshot_blocks",
         137  +
            name = "list_changed_blocks",
  136    138   
            "executing python handler function"
  137    139   
        );
  138    140   
        ::pyo3::Python::with_gil(|py| {
  139    141   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  140    142   
            let output = if handler.args == 1 {
  141    143   
                pyhandler.call1((input,))?
  142    144   
            } else {
  143    145   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  144    146   
            };
  145         -
            output.extract::<crate::output::ListSnapshotBlocksOutput>()
         147  +
            output.extract::<crate::output::ListChangedBlocksOutput>()
  146    148   
        })
  147    149   
    };
  148    150   
    // Catch and record a Python traceback.
  149    151   
    result.map_err(|e| {
  150    152   
        let rich_py_err =
  151    153   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  152    154   
                e.clone_ref(py)
  153    155   
            }));
  154    156   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  155    157   
        e.into()
  156    158   
    })
  157    159   
}
  158    160   
  159         -
/// Python handler for operation `ListChangedBlocks`.
  160         -
pub(crate) async fn list_changed_blocks(
  161         -
    input: crate::input::ListChangedBlocksInput,
         161  +
/// Python handler for operation `ListSnapshotBlocks`.
         162  +
pub(crate) async fn list_snapshot_blocks(
         163  +
    input: crate::input::ListSnapshotBlocksInput,
  162    164   
    state: ::aws_smithy_legacy_http_server::Extension<
  163    165   
        ::aws_smithy_http_server_python::context::PyContext,
  164    166   
    >,
  165    167   
    handler: ::aws_smithy_http_server_python::PyHandler,
  166         -
) -> std::result::Result<crate::output::ListChangedBlocksOutput, crate::error::ListChangedBlocksError>
  167         -
{
         168  +
) -> std::result::Result<
         169  +
    crate::output::ListSnapshotBlocksOutput,
         170  +
    crate::error::ListSnapshotBlocksError,
         171  +
> {
  168    172   
    // Async block used to run the handler and catch any Python error.
  169    173   
    let result = if handler.is_coroutine {
  170    174   
        ::tracing::trace!(
  171         -
            name = "list_changed_blocks",
         175  +
            name = "list_snapshot_blocks",
  172    176   
            "executing python handler coroutine"
  173    177   
        );
  174    178   
        let result = ::pyo3::Python::with_gil(|py| {
  175    179   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  176    180   
            let coroutine = if handler.args == 1 {
  177    181   
                pyhandler.call1((input,))?
  178    182   
            } else {
  179    183   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  180    184   
            };
  181    185   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  182    186   
        })?;
  183    187   
        result.await.and_then(|r| {
  184         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListChangedBlocksOutput>(py))
         188  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListSnapshotBlocksOutput>(py))
  185    189   
        })
  186    190   
    } else {
  187    191   
        ::tracing::trace!(
  188         -
            name = "list_changed_blocks",
         192  +
            name = "list_snapshot_blocks",
  189    193   
            "executing python handler function"
  190    194   
        );
  191    195   
        ::pyo3::Python::with_gil(|py| {
  192    196   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  193    197   
            let output = if handler.args == 1 {
  194    198   
                pyhandler.call1((input,))?
  195    199   
            } else {
  196    200   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  197    201   
            };
  198         -
            output.extract::<crate::output::ListChangedBlocksOutput>()
         202  +
            output.extract::<crate::output::ListSnapshotBlocksOutput>()
  199    203   
        })
  200    204   
    };
  201    205   
    // Catch and record a Python traceback.
  202    206   
    result.map_err(|e| {
  203    207   
        let rich_py_err =
  204    208   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  205    209   
                e.clone_ref(py)
  206    210   
            }));
  207    211   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  208    212   
        e.into()
  209    213   
    })
  210    214   
}
  211    215   
  212         -
/// Python handler for operation `GetSnapshotBlock`.
  213         -
pub(crate) async fn get_snapshot_block(
  214         -
    input: crate::input::GetSnapshotBlockInput,
         216  +
/// Python handler for operation `PutSnapshotBlock`.
         217  +
pub(crate) async fn put_snapshot_block(
         218  +
    input: crate::input::PutSnapshotBlockInput,
  215    219   
    state: ::aws_smithy_legacy_http_server::Extension<
  216    220   
        ::aws_smithy_http_server_python::context::PyContext,
  217    221   
    >,
  218    222   
    handler: ::aws_smithy_http_server_python::PyHandler,
  219         -
) -> std::result::Result<crate::output::GetSnapshotBlockOutput, crate::error::GetSnapshotBlockError>
         223  +
) -> std::result::Result<crate::output::PutSnapshotBlockOutput, crate::error::PutSnapshotBlockError>
  220    224   
{
  221    225   
    // Async block used to run the handler and catch any Python error.
  222    226   
    let result = if handler.is_coroutine {
  223    227   
        ::tracing::trace!(
  224         -
            name = "get_snapshot_block",
         228  +
            name = "put_snapshot_block",
  225    229   
            "executing python handler coroutine"
  226    230   
        );
  227    231   
        let result = ::pyo3::Python::with_gil(|py| {
  228    232   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  229    233   
            let coroutine = if handler.args == 1 {
  230    234   
                pyhandler.call1((input,))?
  231    235   
            } else {
  232    236   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  233    237   
            };
  234    238   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  235    239   
        })?;
  236    240   
        result.await.and_then(|r| {
  237         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GetSnapshotBlockOutput>(py))
         241  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::PutSnapshotBlockOutput>(py))
  238    242   
        })
  239    243   
    } else {
  240    244   
        ::tracing::trace!(
  241         -
            name = "get_snapshot_block",
         245  +
            name = "put_snapshot_block",
  242    246   
            "executing python handler function"
  243    247   
        );
  244    248   
        ::pyo3::Python::with_gil(|py| {
  245    249   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  246    250   
            let output = if handler.args == 1 {
  247    251   
                pyhandler.call1((input,))?
  248    252   
            } else {
  249    253   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  250    254   
            };
  251         -
            output.extract::<crate::output::GetSnapshotBlockOutput>()
         255  +
            output.extract::<crate::output::PutSnapshotBlockOutput>()
  252    256   
        })
  253    257   
    };
  254    258   
    // Catch and record a Python traceback.
  255    259   
    result.map_err(|e| {
  256    260   
        let rich_py_err =
  257    261   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  258    262   
                e.clone_ref(py)
  259    263   
            }));
  260    264   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  261    265   
        e.into()
  262    266   
    })
  263    267   
}
  264    268   
  265         -
/// Python handler for operation `CompleteSnapshot`.
  266         -
pub(crate) async fn complete_snapshot(
  267         -
    input: crate::input::CompleteSnapshotInput,
         269  +
/// Python handler for operation `StartSnapshot`.
         270  +
pub(crate) async fn start_snapshot(
         271  +
    input: crate::input::StartSnapshotInput,
  268    272   
    state: ::aws_smithy_legacy_http_server::Extension<
  269    273   
        ::aws_smithy_http_server_python::context::PyContext,
  270    274   
    >,
  271    275   
    handler: ::aws_smithy_http_server_python::PyHandler,
  272         -
) -> std::result::Result<crate::output::CompleteSnapshotOutput, crate::error::CompleteSnapshotError>
  273         -
{
         276  +
) -> std::result::Result<crate::output::StartSnapshotOutput, crate::error::StartSnapshotError> {
  274    277   
    // Async block used to run the handler and catch any Python error.
  275    278   
    let result = if handler.is_coroutine {
  276    279   
        ::tracing::trace!(
  277         -
            name = "complete_snapshot",
         280  +
            name = "start_snapshot",
  278    281   
            "executing python handler coroutine"
  279    282   
        );
  280    283   
        let result = ::pyo3::Python::with_gil(|py| {
  281    284   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  282    285   
            let coroutine = if handler.args == 1 {
  283    286   
                pyhandler.call1((input,))?
  284    287   
            } else {
  285    288   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  286    289   
            };
  287    290   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  288    291   
        })?;
  289    292   
        result.await.and_then(|r| {
  290         -
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::CompleteSnapshotOutput>(py))
         293  +
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::StartSnapshotOutput>(py))
  291    294   
        })
  292    295   
    } else {
  293         -
        ::tracing::trace!(
  294         -
            name = "complete_snapshot",
  295         -
            "executing python handler function"
  296         -
        );
         296  +
        ::tracing::trace!(name = "start_snapshot", "executing python handler function");
  297    297   
        ::pyo3::Python::with_gil(|py| {
  298    298   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  299    299   
            let output = if handler.args == 1 {
  300    300   
                pyhandler.call1((input,))?
  301    301   
            } else {
  302    302   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  303    303   
            };
  304         -
            output.extract::<crate::output::CompleteSnapshotOutput>()
         304  +
            output.extract::<crate::output::StartSnapshotOutput>()
  305    305   
        })
  306    306   
    };
  307    307   
    // Catch and record a Python traceback.
  308    308   
    result.map_err(|e| {
  309    309   
        let rich_py_err =
  310    310   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  311    311   
                e.clone_ref(py)
  312    312   
            }));
  313    313   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  314    314   
        e.into()

tmp-codegen-diff/codegen-server-test-python/ebs/rust-server-codegen-python/src/service.rs

@@ -969,969 +1037,1037 @@
  989    989   
                );
  990    990   
            }
  991    991   
            if !missing_operation_names.is_empty() {
  992    992   
                return Err(MissingOperationsError {
  993    993   
                    operation_names2setter_methods: missing_operation_names,
  994    994   
                });
  995    995   
            }
  996    996   
            let unexpected_error_msg = "this should never panic since we are supposed to check beforehand that a handler has been registered for this operation; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues";
  997    997   
  998    998   
            crate::model::SnapshotId::compile_regex();
  999         -
            crate::model::Description::compile_regex();
 1000         -
            crate::model::OwnerId::compile_regex();
 1001         -
            crate::model::KmsKeyArn::compile_regex();
 1002         -
            crate::model::TagValue::compile_regex();
 1003         -
            crate::model::TagKey::compile_regex();
 1004         -
            crate::model::IdempotencyToken::compile_regex();
 1005    999   
            crate::model::Checksum::compile_regex();
 1006   1000   
            crate::model::BlockToken::compile_regex();
 1007   1001   
            crate::model::PageToken::compile_regex();
        1002  +
            crate::model::IdempotencyToken::compile_regex();
        1003  +
            crate::model::KmsKeyArn::compile_regex();
        1004  +
            crate::model::Description::compile_regex();
        1005  +
            crate::model::OwnerId::compile_regex();
        1006  +
            crate::model::TagKey::compile_regex();
        1007  +
            crate::model::TagValue::compile_regex();
 1008   1008   
 1009   1009   
            ::aws_smithy_legacy_http_server::protocol::rest::router::RestRouter::from_iter([
 1010   1010   
                (
 1011   1011   
                    request_specs::complete_snapshot(),
 1012   1012   
                    self.complete_snapshot.expect(unexpected_error_msg),
 1013   1013   
                ),
 1014   1014   
                (
 1015   1015   
                    request_specs::get_snapshot_block(),
 1016   1016   
                    self.get_snapshot_block.expect(unexpected_error_msg),
 1017   1017   
                ),

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/src/error.rs

@@ -1,1 +607,551 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Error type for the `QueryIncompatibleOperation` operation.
    3         -
/// Each variant represents an error that can occur for the `QueryIncompatibleOperation` operation.
           2  +
/// Error type for the `NoInputAndNoOutput` operation.
           3  +
/// Each variant represents an error that can occur for the `NoInputAndNoOutput` operation.
    4      4   
#[derive(::std::fmt::Debug)]
    5         -
pub enum QueryIncompatibleOperationError {
           5  +
pub enum NoInputAndNoOutputError {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    InternalServerError(crate::error::InternalServerError),
    8      8   
}
    9         -
impl ::std::fmt::Display for QueryIncompatibleOperationError {
           9  +
impl ::std::fmt::Display for NoInputAndNoOutputError {
   10     10   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   11     11   
        match &self {
   12         -
            QueryIncompatibleOperationError::InternalServerError(_inner) => _inner.fmt(f),
          12  +
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.fmt(f),
   13     13   
        }
   14     14   
    }
   15     15   
}
   16         -
impl QueryIncompatibleOperationError {
   17         -
    /// Returns `true` if the error kind is `QueryIncompatibleOperationError::InternalServerError`.
          16  +
impl NoInputAndNoOutputError {
          17  +
    /// Returns `true` if the error kind is `NoInputAndNoOutputError::InternalServerError`.
   18     18   
    pub fn is_internal_server_error(&self) -> bool {
   19         -
        matches!(
   20         -
            &self,
   21         -
            QueryIncompatibleOperationError::InternalServerError(_)
   22         -
        )
          19  +
        matches!(&self, NoInputAndNoOutputError::InternalServerError(_))
   23     20   
    }
   24     21   
    /// Returns the error name string by matching the correct variant.
   25     22   
    pub fn name(&self) -> &'static str {
   26     23   
        match &self {
   27         -
            QueryIncompatibleOperationError::InternalServerError(_inner) => _inner.name(),
          24  +
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.name(),
   28     25   
        }
   29     26   
    }
   30     27   
}
   31         -
impl ::std::error::Error for QueryIncompatibleOperationError {
          28  +
impl ::std::error::Error for NoInputAndNoOutputError {
   32     29   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   33     30   
        match &self {
   34         -
            QueryIncompatibleOperationError::InternalServerError(_inner) => Some(_inner),
          31  +
            NoInputAndNoOutputError::InternalServerError(_inner) => Some(_inner),
   35     32   
        }
   36     33   
    }
   37     34   
}
   38     35   
impl ::std::convert::From<crate::error::InternalServerError>
   39         -
    for crate::error::QueryIncompatibleOperationError
          36  +
    for crate::error::NoInputAndNoOutputError
   40     37   
{
   41         -
    fn from(
   42         -
        variant: crate::error::InternalServerError,
   43         -
    ) -> crate::error::QueryIncompatibleOperationError {
          38  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndNoOutputError {
   44     39   
        Self::InternalServerError(variant)
   45     40   
    }
   46     41   
}
   47     42   
   48         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryIncompatibleOperationError {
   49         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::QueryIncompatibleOperationError {
          43  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndNoOutputError {
          44  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndNoOutputError {
   50     45   
        ::pyo3::Python::with_gil(|py| {
   51     46   
            let error = variant.value(py);
   52     47   
   53     48   
            crate::error::InternalServerError {
   54     49   
                message: error.to_string(),
   55     50   
            }
   56     51   
            .into()
   57     52   
        })
   58     53   
    }
   59     54   
}
   60     55   
   61         -
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
   62         -
/// :param message str:
   63         -
/// :rtype None:
   64         -
#[allow(missing_docs)] // documentation missing in model
   65         -
#[derive(
   66         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   67         -
)]
   68         -
pub struct InternalServerError {
   69         -
    #[pyo3(get, set)]
   70         -
    /// :type str:
          56  +
/// Error type for the `NoInputAndOutput` operation.
          57  +
/// Each variant represents an error that can occur for the `NoInputAndOutput` operation.
          58  +
#[derive(::std::fmt::Debug)]
          59  +
pub enum NoInputAndOutputError {
   71     60   
    #[allow(missing_docs)] // documentation missing in model
   72         -
    pub message: ::std::string::String,
          61  +
    InternalServerError(crate::error::InternalServerError),
   73     62   
}
   74         -
#[allow(clippy::new_without_default)]
   75         -
#[allow(clippy::too_many_arguments)]
   76         -
#[::pyo3::pymethods]
   77         -
impl InternalServerError {
   78         -
    #[new]
   79         -
    pub fn new(message: ::std::string::String) -> Self {
   80         -
        Self { message }
   81         -
    }
   82         -
    fn __repr__(&self) -> String {
   83         -
        format!("{self:?}")
          63  +
impl ::std::fmt::Display for NoInputAndOutputError {
          64  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          65  +
        match &self {
          66  +
            NoInputAndOutputError::InternalServerError(_inner) => _inner.fmt(f),
   84     67   
        }
   85         -
    fn __str__(&self) -> String {
   86         -
        format!("{self:?}")
   87     68   
    }
   88     69   
}
   89         -
impl InternalServerError {
   90         -
    /// Returns the error message.
   91         -
    pub fn message(&self) -> &str {
   92         -
        &self.message
          70  +
impl NoInputAndOutputError {
          71  +
    /// Returns `true` if the error kind is `NoInputAndOutputError::InternalServerError`.
          72  +
    pub fn is_internal_server_error(&self) -> bool {
          73  +
        matches!(&self, NoInputAndOutputError::InternalServerError(_))
   93     74   
    }
   94         -
    #[doc(hidden)]
   95         -
    /// Returns the error name.
          75  +
    /// Returns the error name string by matching the correct variant.
   96     76   
    pub fn name(&self) -> &'static str {
   97         -
        "InternalServerError"
          77  +
        match &self {
          78  +
            NoInputAndOutputError::InternalServerError(_inner) => _inner.name(),
          79  +
        }
   98     80   
    }
   99     81   
}
  100         -
impl ::std::fmt::Display for InternalServerError {
  101         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  102         -
        ::std::write!(f, "InternalServerError")?;
  103         -
        {
  104         -
            ::std::write!(f, ": {}", &self.message)?;
          82  +
impl ::std::error::Error for NoInputAndOutputError {
          83  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          84  +
        match &self {
          85  +
            NoInputAndOutputError::InternalServerError(_inner) => Some(_inner),
  105     86   
        }
  106         -
        Ok(())
  107     87   
    }
  108     88   
}
  109         -
impl ::std::error::Error for InternalServerError {}
  110         -
impl InternalServerError {
  111         -
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
  112         -
    pub fn builder() -> crate::error::internal_server_error::Builder {
  113         -
        crate::error::internal_server_error::Builder::default()
          89  +
impl ::std::convert::From<crate::error::InternalServerError>
          90  +
    for crate::error::NoInputAndOutputError
          91  +
{
          92  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndOutputError {
          93  +
        Self::InternalServerError(variant)
  114     94   
    }
  115     95   
}
  116     96   
  117         -
/// Error type for the `OperationWithRequiredMembersWithDefaults` operation.
  118         -
/// Each variant represents an error that can occur for the `OperationWithRequiredMembersWithDefaults` operation.
          97  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndOutputError {
          98  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndOutputError {
          99  +
        ::pyo3::Python::with_gil(|py| {
         100  +
            let error = variant.value(py);
         101  +
         102  +
            crate::error::InternalServerError {
         103  +
                message: error.to_string(),
         104  +
            }
         105  +
            .into()
         106  +
        })
         107  +
    }
         108  +
}
         109  +
         110  +
/// Error type for the `EmptyInputAndEmptyOutput` operation.
         111  +
/// Each variant represents an error that can occur for the `EmptyInputAndEmptyOutput` operation.
  119    112   
#[derive(::std::fmt::Debug)]
  120         -
pub enum OperationWithRequiredMembersWithDefaultsError {
         113  +
pub enum EmptyInputAndEmptyOutputError {
  121    114   
    #[allow(missing_docs)] // documentation missing in model
  122    115   
    InternalServerError(crate::error::InternalServerError),
  123    116   
}
  124         -
impl ::std::fmt::Display for OperationWithRequiredMembersWithDefaultsError {
         117  +
impl ::std::fmt::Display for EmptyInputAndEmptyOutputError {
  125    118   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  126    119   
        match &self {
  127         -
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
  128         -
                _inner.fmt(f)
  129         -
            }
         120  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.fmt(f),
  130    121   
        }
  131    122   
    }
  132    123   
}
  133         -
impl OperationWithRequiredMembersWithDefaultsError {
  134         -
    /// Returns `true` if the error kind is `OperationWithRequiredMembersWithDefaultsError::InternalServerError`.
         124  +
impl EmptyInputAndEmptyOutputError {
         125  +
    /// Returns `true` if the error kind is `EmptyInputAndEmptyOutputError::InternalServerError`.
  135    126   
    pub fn is_internal_server_error(&self) -> bool {
  136         -
        matches!(
  137         -
            &self,
  138         -
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_)
  139         -
        )
         127  +
        matches!(&self, EmptyInputAndEmptyOutputError::InternalServerError(_))
  140    128   
    }
  141    129   
    /// Returns the error name string by matching the correct variant.
  142    130   
    pub fn name(&self) -> &'static str {
  143    131   
        match &self {
  144         -
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
  145         -
                _inner.name()
  146         -
            }
         132  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.name(),
  147    133   
        }
  148    134   
    }
  149    135   
}
  150         -
impl ::std::error::Error for OperationWithRequiredMembersWithDefaultsError {
         136  +
impl ::std::error::Error for EmptyInputAndEmptyOutputError {
  151    137   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  152    138   
        match &self {
  153         -
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
  154         -
                Some(_inner)
  155         -
            }
         139  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => Some(_inner),
  156    140   
        }
  157    141   
    }
  158    142   
}
  159    143   
impl ::std::convert::From<crate::error::InternalServerError>
  160         -
    for crate::error::OperationWithRequiredMembersWithDefaultsError
         144  +
    for crate::error::EmptyInputAndEmptyOutputError
  161    145   
{
  162    146   
    fn from(
  163    147   
        variant: crate::error::InternalServerError,
  164         -
    ) -> crate::error::OperationWithRequiredMembersWithDefaultsError {
         148  +
    ) -> crate::error::EmptyInputAndEmptyOutputError {
  165    149   
        Self::InternalServerError(variant)
  166    150   
    }
  167    151   
}
  168    152   
  169         -
impl ::std::convert::From<::pyo3::PyErr>
  170         -
    for crate::error::OperationWithRequiredMembersWithDefaultsError
  171         -
{
  172         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersWithDefaultsError {
         153  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EmptyInputAndEmptyOutputError {
         154  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::EmptyInputAndEmptyOutputError {
  173    155   
        ::pyo3::Python::with_gil(|py| {
  174    156   
            let error = variant.value(py);
  175    157   
  176    158   
            crate::error::InternalServerError {
  177    159   
                message: error.to_string(),
  178    160   
            }
  179    161   
            .into()
  180    162   
        })
  181    163   
    }
  182    164   
}
  183    165   
  184         -
/// Error type for the `OperationWithNestedStructure` operation.
  185         -
/// Each variant represents an error that can occur for the `OperationWithNestedStructure` operation.
         166  +
/// Error type for the `SimpleScalarProperties` operation.
         167  +
/// Each variant represents an error that can occur for the `SimpleScalarProperties` operation.
  186    168   
#[derive(::std::fmt::Debug)]
  187         -
pub enum OperationWithNestedStructureError {
  188         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  189         -
    ValidationException(crate::error::ValidationException),
         169  +
pub enum SimpleScalarPropertiesError {
  190    170   
    #[allow(missing_docs)] // documentation missing in model
  191    171   
    InternalServerError(crate::error::InternalServerError),
  192    172   
}
  193         -
impl ::std::fmt::Display for OperationWithNestedStructureError {
         173  +
impl ::std::fmt::Display for SimpleScalarPropertiesError {
  194    174   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  195    175   
        match &self {
  196         -
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.fmt(f),
  197         -
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.fmt(f),
         176  +
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.fmt(f),
  198    177   
        }
  199    178   
    }
  200    179   
}
  201         -
impl OperationWithNestedStructureError {
  202         -
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::ValidationException`.
  203         -
    pub fn is_validation_exception(&self) -> bool {
  204         -
        matches!(
  205         -
            &self,
  206         -
            OperationWithNestedStructureError::ValidationException(_)
  207         -
        )
  208         -
    }
  209         -
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::InternalServerError`.
         180  +
impl SimpleScalarPropertiesError {
         181  +
    /// Returns `true` if the error kind is `SimpleScalarPropertiesError::InternalServerError`.
  210    182   
    pub fn is_internal_server_error(&self) -> bool {
  211         -
        matches!(
  212         -
            &self,
  213         -
            OperationWithNestedStructureError::InternalServerError(_)
  214         -
        )
         183  +
        matches!(&self, SimpleScalarPropertiesError::InternalServerError(_))
  215    184   
    }
  216    185   
    /// Returns the error name string by matching the correct variant.
  217    186   
    pub fn name(&self) -> &'static str {
  218    187   
        match &self {
  219         -
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.name(),
  220         -
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.name(),
         188  +
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.name(),
  221    189   
        }
  222    190   
    }
  223    191   
}
  224         -
impl ::std::error::Error for OperationWithNestedStructureError {
         192  +
impl ::std::error::Error for SimpleScalarPropertiesError {
  225    193   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  226    194   
        match &self {
  227         -
            OperationWithNestedStructureError::ValidationException(_inner) => Some(_inner),
  228         -
            OperationWithNestedStructureError::InternalServerError(_inner) => Some(_inner),
  229         -
        }
         195  +
            SimpleScalarPropertiesError::InternalServerError(_inner) => Some(_inner),
  230    196   
        }
  231         -
}
  232         -
impl ::std::convert::From<crate::error::ValidationException>
  233         -
    for crate::error::OperationWithNestedStructureError
  234         -
{
  235         -
    fn from(
  236         -
        variant: crate::error::ValidationException,
  237         -
    ) -> crate::error::OperationWithNestedStructureError {
  238         -
        Self::ValidationException(variant)
  239    197   
    }
  240    198   
}
  241    199   
impl ::std::convert::From<crate::error::InternalServerError>
  242         -
    for crate::error::OperationWithNestedStructureError
         200  +
    for crate::error::SimpleScalarPropertiesError
  243    201   
{
  244    202   
    fn from(
  245    203   
        variant: crate::error::InternalServerError,
  246         -
    ) -> crate::error::OperationWithNestedStructureError {
         204  +
    ) -> crate::error::SimpleScalarPropertiesError {
  247    205   
        Self::InternalServerError(variant)
  248    206   
    }
  249    207   
}
  250    208   
  251         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithNestedStructureError {
  252         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithNestedStructureError {
         209  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::SimpleScalarPropertiesError {
         210  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::SimpleScalarPropertiesError {
  253    211   
        ::pyo3::Python::with_gil(|py| {
  254    212   
            let error = variant.value(py);
  255         -
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  256         -
                return error.into();
  257         -
            }
         213  +
  258    214   
            crate::error::InternalServerError {
  259    215   
                message: error.to_string(),
  260    216   
            }
  261    217   
            .into()
  262    218   
        })
  263    219   
    }
  264    220   
}
  265    221   
  266         -
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
  267         -
/// :param message str:
  268         -
/// :param field_list typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
  269         -
/// :rtype None:
  270         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  271         -
#[derive(
  272         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  273         -
)]
  274         -
pub struct ValidationException {
  275         -
    #[pyo3(get, set)]
  276         -
    /// :type str:
  277         -
    /// A summary of the validation failure.
  278         -
    pub message: ::std::string::String,
  279         -
    #[pyo3(get, set)]
  280         -
    /// :type typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
  281         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
  282         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         222  +
/// Error type for the `GreetingWithErrors` operation.
         223  +
/// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
         224  +
#[derive(::std::fmt::Debug)]
         225  +
pub enum GreetingWithErrorsError {
         226  +
    /// This error is thrown when an invalid greeting value is provided.
         227  +
    InvalidGreeting(crate::error::InvalidGreeting),
         228  +
    /// This error is thrown when a request is invalid.
         229  +
    ComplexError(crate::error::ComplexError),
         230  +
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
         231  +
    FooError(crate::error::FooError),
         232  +
    #[allow(missing_docs)] // documentation missing in model
         233  +
    InternalServerError(crate::error::InternalServerError),
  283    234   
}
  284         -
impl ValidationException {
  285         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
  286         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
  287         -
        self.field_list.as_deref()
         235  +
impl ::std::fmt::Display for GreetingWithErrorsError {
         236  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         237  +
        match &self {
         238  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
         239  +
            GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
         240  +
            GreetingWithErrorsError::FooError(_inner) => _inner.fmt(f),
         241  +
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.fmt(f),
         242  +
        }
  288    243   
    }
  289    244   
}
  290         -
#[allow(clippy::new_without_default)]
  291         -
#[allow(clippy::too_many_arguments)]
  292         -
#[::pyo3::pymethods]
  293         -
impl ValidationException {
  294         -
    #[new]
  295         -
    pub fn new(
  296         -
        message: ::std::string::String,
  297         -
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  298         -
    ) -> Self {
  299         -
        Self {
  300         -
            message,
  301         -
            field_list,
  302         -
        }
         245  +
impl GreetingWithErrorsError {
         246  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
         247  +
    pub fn is_invalid_greeting(&self) -> bool {
         248  +
        matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
  303    249   
    }
  304         -
    fn __repr__(&self) -> String {
  305         -
        format!("{self:?}")
         250  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
         251  +
    pub fn is_complex_error(&self) -> bool {
         252  +
        matches!(&self, GreetingWithErrorsError::ComplexError(_))
  306    253   
    }
  307         -
    fn __str__(&self) -> String {
  308         -
        format!("{self:?}")
         254  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::FooError`.
         255  +
    pub fn is_foo_error(&self) -> bool {
         256  +
        matches!(&self, GreetingWithErrorsError::FooError(_))
  309    257   
    }
  310         -
}
  311         -
impl ValidationException {
  312         -
    /// Returns the error message.
  313         -
    pub fn message(&self) -> &str {
  314         -
        &self.message
         258  +
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InternalServerError`.
         259  +
    pub fn is_internal_server_error(&self) -> bool {
         260  +
        matches!(&self, GreetingWithErrorsError::InternalServerError(_))
  315    261   
    }
  316         -
    #[doc(hidden)]
  317         -
    /// Returns the error name.
         262  +
    /// Returns the error name string by matching the correct variant.
  318    263   
    pub fn name(&self) -> &'static str {
  319         -
        "ValidationException"
  320         -
    }
  321         -
}
  322         -
impl ::std::fmt::Display for ValidationException {
  323         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  324         -
        ::std::write!(f, "ValidationException")?;
  325         -
        {
  326         -
            ::std::write!(f, ": {}", &self.message)?;
  327         -
        }
  328         -
        Ok(())
         264  +
        match &self {
         265  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
         266  +
            GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
         267  +
            GreetingWithErrorsError::FooError(_inner) => _inner.name(),
         268  +
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.name(),
  329    269   
        }
  330         -
}
  331         -
impl ::std::error::Error for ValidationException {}
  332         -
impl ValidationException {
  333         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
  334         -
    pub fn builder() -> crate::error::validation_exception::Builder {
  335         -
        crate::error::validation_exception::Builder::default()
  336    270   
    }
  337    271   
}
  338         -
  339         -
/// Error type for the `OperationWithRequiredMembers` operation.
  340         -
/// Each variant represents an error that can occur for the `OperationWithRequiredMembers` operation.
  341         -
#[derive(::std::fmt::Debug)]
  342         -
pub enum OperationWithRequiredMembersError {
  343         -
    #[allow(missing_docs)] // documentation missing in model
  344         -
    InternalServerError(crate::error::InternalServerError),
  345         -
}
  346         -
impl ::std::fmt::Display for OperationWithRequiredMembersError {
  347         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         272  +
impl ::std::error::Error for GreetingWithErrorsError {
         273  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  348    274   
        match &self {
  349         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.fmt(f),
         275  +
            GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
         276  +
            GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
         277  +
            GreetingWithErrorsError::FooError(_inner) => Some(_inner),
         278  +
            GreetingWithErrorsError::InternalServerError(_inner) => Some(_inner),
  350    279   
        }
  351    280   
    }
  352    281   
}
  353         -
impl OperationWithRequiredMembersError {
  354         -
    /// Returns `true` if the error kind is `OperationWithRequiredMembersError::InternalServerError`.
  355         -
    pub fn is_internal_server_error(&self) -> bool {
  356         -
        matches!(
  357         -
            &self,
  358         -
            OperationWithRequiredMembersError::InternalServerError(_)
  359         -
        )
  360         -
    }
  361         -
    /// Returns the error name string by matching the correct variant.
  362         -
    pub fn name(&self) -> &'static str {
  363         -
        match &self {
  364         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.name(),
  365         -
        }
         282  +
impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
         283  +
    fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
         284  +
        Self::InvalidGreeting(variant)
  366    285   
    }
  367    286   
}
  368         -
impl ::std::error::Error for OperationWithRequiredMembersError {
  369         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  370         -
        match &self {
  371         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => Some(_inner),
         287  +
impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
         288  +
    fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
         289  +
        Self::ComplexError(variant)
  372    290   
    }
         291  +
}
         292  +
impl ::std::convert::From<crate::error::FooError> for crate::error::GreetingWithErrorsError {
         293  +
    fn from(variant: crate::error::FooError) -> crate::error::GreetingWithErrorsError {
         294  +
        Self::FooError(variant)
  373    295   
    }
  374    296   
}
  375    297   
impl ::std::convert::From<crate::error::InternalServerError>
  376         -
    for crate::error::OperationWithRequiredMembersError
         298  +
    for crate::error::GreetingWithErrorsError
  377    299   
{
  378         -
    fn from(
  379         -
        variant: crate::error::InternalServerError,
  380         -
    ) -> crate::error::OperationWithRequiredMembersError {
         300  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::GreetingWithErrorsError {
  381    301   
        Self::InternalServerError(variant)
  382    302   
    }
  383    303   
}
  384    304   
  385         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithRequiredMembersError {
  386         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersError {
         305  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::GreetingWithErrorsError {
         306  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::GreetingWithErrorsError {
  387    307   
        ::pyo3::Python::with_gil(|py| {
  388    308   
            let error = variant.value(py);
  389         -
         309  +
            if let Ok(error) = error.extract::<crate::error::InvalidGreeting>() {
         310  +
                return error.into();
         311  +
            }
         312  +
            if let Ok(error) = error.extract::<crate::error::ComplexError>() {
         313  +
                return error.into();
         314  +
            }
         315  +
            if let Ok(error) = error.extract::<crate::error::FooError>() {
         316  +
                return error.into();
         317  +
            }
  390    318   
            crate::error::InternalServerError {
  391    319   
                message: error.to_string(),
  392    320   
            }
  393    321   
            .into()
  394    322   
        })
  395    323   
    }
  396    324   
}
  397    325   
  398         -
/// Error type for the `OperationWithDefaults` operation.
  399         -
/// Each variant represents an error that can occur for the `OperationWithDefaults` operation.
         326  +
/// Error type for the `JsonUnions` operation.
         327  +
/// Each variant represents an error that can occur for the `JsonUnions` operation.
  400    328   
#[derive(::std::fmt::Debug)]
  401         -
pub enum OperationWithDefaultsError {
         329  +
pub enum JsonUnionsError {
  402    330   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  403    331   
    ValidationException(crate::error::ValidationException),
  404    332   
    #[allow(missing_docs)] // documentation missing in model
  405    333   
    InternalServerError(crate::error::InternalServerError),
  406    334   
}
  407         -
impl ::std::fmt::Display for OperationWithDefaultsError {
         335  +
impl ::std::fmt::Display for JsonUnionsError {
  408    336   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  409    337   
        match &self {
  410         -
            OperationWithDefaultsError::ValidationException(_inner) => _inner.fmt(f),
  411         -
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.fmt(f),
         338  +
            JsonUnionsError::ValidationException(_inner) => _inner.fmt(f),
         339  +
            JsonUnionsError::InternalServerError(_inner) => _inner.fmt(f),
  412    340   
        }
  413    341   
    }
  414    342   
}
  415         -
impl OperationWithDefaultsError {
  416         -
    /// Returns `true` if the error kind is `OperationWithDefaultsError::ValidationException`.
         343  +
impl JsonUnionsError {
         344  +
    /// Returns `true` if the error kind is `JsonUnionsError::ValidationException`.
  417    345   
    pub fn is_validation_exception(&self) -> bool {
  418         -
        matches!(&self, OperationWithDefaultsError::ValidationException(_))
         346  +
        matches!(&self, JsonUnionsError::ValidationException(_))
  419    347   
    }
  420         -
    /// Returns `true` if the error kind is `OperationWithDefaultsError::InternalServerError`.
         348  +
    /// Returns `true` if the error kind is `JsonUnionsError::InternalServerError`.
  421    349   
    pub fn is_internal_server_error(&self) -> bool {
  422         -
        matches!(&self, OperationWithDefaultsError::InternalServerError(_))
         350  +
        matches!(&self, JsonUnionsError::InternalServerError(_))
  423    351   
    }
  424    352   
    /// Returns the error name string by matching the correct variant.
  425    353   
    pub fn name(&self) -> &'static str {
  426    354   
        match &self {
  427         -
            OperationWithDefaultsError::ValidationException(_inner) => _inner.name(),
  428         -
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.name(),
         355  +
            JsonUnionsError::ValidationException(_inner) => _inner.name(),
         356  +
            JsonUnionsError::InternalServerError(_inner) => _inner.name(),
  429    357   
        }
  430    358   
    }
  431    359   
}
  432         -
impl ::std::error::Error for OperationWithDefaultsError {
         360  +
impl ::std::error::Error for JsonUnionsError {
  433    361   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  434    362   
        match &self {
  435         -
            OperationWithDefaultsError::ValidationException(_inner) => Some(_inner),
  436         -
            OperationWithDefaultsError::InternalServerError(_inner) => Some(_inner),
         363  +
            JsonUnionsError::ValidationException(_inner) => Some(_inner),
         364  +
            JsonUnionsError::InternalServerError(_inner) => Some(_inner),
  437    365   
        }
  438    366   
    }
  439    367   
}
  440         -
impl ::std::convert::From<crate::error::ValidationException>
  441         -
    for crate::error::OperationWithDefaultsError
  442         -
{
  443         -
    fn from(
  444         -
        variant: crate::error::ValidationException,
  445         -
    ) -> crate::error::OperationWithDefaultsError {
         368  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonUnionsError {
         369  +
    fn from(variant: crate::error::ValidationException) -> crate::error::JsonUnionsError {
  446    370   
        Self::ValidationException(variant)
  447    371   
    }
  448    372   
}
  449         -
impl ::std::convert::From<crate::error::InternalServerError>
  450         -
    for crate::error::OperationWithDefaultsError
  451         -
{
  452         -
    fn from(
  453         -
        variant: crate::error::InternalServerError,
  454         -
    ) -> crate::error::OperationWithDefaultsError {
         373  +
impl ::std::convert::From<crate::error::InternalServerError> for crate::error::JsonUnionsError {
         374  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::JsonUnionsError {
  455    375   
        Self::InternalServerError(variant)
  456    376   
    }
  457    377   
}
  458    378   
  459         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithDefaultsError {
  460         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithDefaultsError {
         379  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::JsonUnionsError {
         380  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::JsonUnionsError {
  461    381   
        ::pyo3::Python::with_gil(|py| {
  462    382   
            let error = variant.value(py);
  463    383   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  464    384   
                return error.into();
  465    385   
            }
  466    386   
            crate::error::InternalServerError {
  467    387   
                message: error.to_string(),
  468    388   
            }
  469    389   
            .into()
  470    390   
        })
  471    391   
    }
  472    392   
}
  473    393   
  474         -
/// Error type for the `ContentTypeParameters` operation.
  475         -
/// Each variant represents an error that can occur for the `ContentTypeParameters` operation.
         394  +
/// Error type for the `EndpointOperation` operation.
         395  +
/// Each variant represents an error that can occur for the `EndpointOperation` operation.
  476    396   
#[derive(::std::fmt::Debug)]
  477         -
pub enum ContentTypeParametersError {
         397  +
pub enum EndpointOperationError {
  478    398   
    #[allow(missing_docs)] // documentation missing in model
  479    399   
    InternalServerError(crate::error::InternalServerError),
  480    400   
}
  481         -
impl ::std::fmt::Display for ContentTypeParametersError {
         401  +
impl ::std::fmt::Display for EndpointOperationError {
  482    402   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  483    403   
        match &self {
  484         -
            ContentTypeParametersError::InternalServerError(_inner) => _inner.fmt(f),
         404  +
            EndpointOperationError::InternalServerError(_inner) => _inner.fmt(f),
  485    405   
        }
  486    406   
    }
  487    407   
}
  488         -
impl ContentTypeParametersError {
  489         -
    /// Returns `true` if the error kind is `ContentTypeParametersError::InternalServerError`.
         408  +
impl EndpointOperationError {
         409  +
    /// Returns `true` if the error kind is `EndpointOperationError::InternalServerError`.
  490    410   
    pub fn is_internal_server_error(&self) -> bool {
  491         -
        matches!(&self, ContentTypeParametersError::InternalServerError(_))
         411  +
        matches!(&self, EndpointOperationError::InternalServerError(_))
  492    412   
    }
  493    413   
    /// Returns the error name string by matching the correct variant.
  494    414   
    pub fn name(&self) -> &'static str {
  495    415   
        match &self {
  496         -
            ContentTypeParametersError::InternalServerError(_inner) => _inner.name(),
         416  +
            EndpointOperationError::InternalServerError(_inner) => _inner.name(),
  497    417   
        }
  498    418   
    }
  499    419   
}
  500         -
impl ::std::error::Error for ContentTypeParametersError {
         420  +
impl ::std::error::Error for EndpointOperationError {
  501    421   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  502    422   
        match &self {
  503         -
            ContentTypeParametersError::InternalServerError(_inner) => Some(_inner),
         423  +
            EndpointOperationError::InternalServerError(_inner) => Some(_inner),
  504    424   
        }
  505    425   
    }
  506    426   
}
  507    427   
impl ::std::convert::From<crate::error::InternalServerError>
  508         -
    for crate::error::ContentTypeParametersError
         428  +
    for crate::error::EndpointOperationError
  509    429   
{
  510         -
    fn from(
  511         -
        variant: crate::error::InternalServerError,
  512         -
    ) -> crate::error::ContentTypeParametersError {
         430  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::EndpointOperationError {
  513    431   
        Self::InternalServerError(variant)
  514    432   
    }
  515    433   
}
  516    434   
  517         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ContentTypeParametersError {
  518         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::ContentTypeParametersError {
         435  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointOperationError {
         436  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointOperationError {
  519    437   
        ::pyo3::Python::with_gil(|py| {
  520    438   
            let error = variant.value(py);
  521    439   
  522    440   
            crate::error::InternalServerError {
  523    441   
                message: error.to_string(),
  524    442   
            }
  525    443   
            .into()
  526    444   
        })
  527    445   
    }
  528    446   
}
  529    447   
  530         -
/// Error type for the `PutWithContentEncoding` operation.
  531         -
/// Each variant represents an error that can occur for the `PutWithContentEncoding` operation.
         448  +
/// Error type for the `EndpointWithHostLabelOperation` operation.
         449  +
/// Each variant represents an error that can occur for the `EndpointWithHostLabelOperation` operation.
  532    450   
#[derive(::std::fmt::Debug)]
  533         -
pub enum PutWithContentEncodingError {
         451  +
pub enum EndpointWithHostLabelOperationError {
         452  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         453  +
    ValidationException(crate::error::ValidationException),
  534    454   
    #[allow(missing_docs)] // documentation missing in model
  535    455   
    InternalServerError(crate::error::InternalServerError),
  536    456   
}
  537         -
impl ::std::fmt::Display for PutWithContentEncodingError {
         457  +
impl ::std::fmt::Display for EndpointWithHostLabelOperationError {
  538    458   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  539    459   
        match &self {
  540         -
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.fmt(f),
         460  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.fmt(f),
         461  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.fmt(f),
  541    462   
        }
  542    463   
    }
  543    464   
}
  544         -
impl PutWithContentEncodingError {
  545         -
    /// Returns `true` if the error kind is `PutWithContentEncodingError::InternalServerError`.
         465  +
impl EndpointWithHostLabelOperationError {
         466  +
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::ValidationException`.
         467  +
    pub fn is_validation_exception(&self) -> bool {
         468  +
        matches!(
         469  +
            &self,
         470  +
            EndpointWithHostLabelOperationError::ValidationException(_)
         471  +
        )
         472  +
    }
         473  +
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::InternalServerError`.
  546    474   
    pub fn is_internal_server_error(&self) -> bool {
  547         -
        matches!(&self, PutWithContentEncodingError::InternalServerError(_))
         475  +
        matches!(
         476  +
            &self,
         477  +
            EndpointWithHostLabelOperationError::InternalServerError(_)
         478  +
        )
  548    479   
    }
  549    480   
    /// Returns the error name string by matching the correct variant.
  550    481   
    pub fn name(&self) -> &'static str {
  551    482   
        match &self {
  552         -
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.name(),
         483  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.name(),
         484  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.name(),
  553    485   
        }
  554    486   
    }
  555    487   
}
  556         -
impl ::std::error::Error for PutWithContentEncodingError {
         488  +
impl ::std::error::Error for EndpointWithHostLabelOperationError {
  557    489   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  558    490   
        match &self {
  559         -
            PutWithContentEncodingError::InternalServerError(_inner) => Some(_inner),
         491  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) => Some(_inner),
         492  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => Some(_inner),
         493  +
        }
  560    494   
    }
         495  +
}
         496  +
impl ::std::convert::From<crate::error::ValidationException>
         497  +
    for crate::error::EndpointWithHostLabelOperationError
         498  +
{
         499  +
    fn from(
         500  +
        variant: crate::error::ValidationException,
         501  +
    ) -> crate::error::EndpointWithHostLabelOperationError {
         502  +
        Self::ValidationException(variant)
  561    503   
    }
  562    504   
}
  563    505   
impl ::std::convert::From<crate::error::InternalServerError>
  564         -
    for crate::error::PutWithContentEncodingError
         506  +
    for crate::error::EndpointWithHostLabelOperationError
  565    507   
{
  566    508   
    fn from(
  567    509   
        variant: crate::error::InternalServerError,
  568         -
    ) -> crate::error::PutWithContentEncodingError {
         510  +
    ) -> crate::error::EndpointWithHostLabelOperationError {
  569    511   
        Self::InternalServerError(variant)
  570    512   
    }
  571    513   
}
  572    514   
  573         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::PutWithContentEncodingError {
  574         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::PutWithContentEncodingError {
         515  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointWithHostLabelOperationError {
         516  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointWithHostLabelOperationError {
  575    517   
        ::pyo3::Python::with_gil(|py| {
  576    518   
            let error = variant.value(py);
  577         -
         519  +
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
         520  +
                return error.into();
         521  +
            }
  578    522   
            crate::error::InternalServerError {
  579    523   
                message: error.to_string(),
  580    524   
            }
  581    525   
            .into()
  582    526   
        })
  583    527   
    }
  584    528   
}
  585    529   
  586    530   
/// Error type for the `HostWithPathOperation` operation.
  587    531   
/// Each variant represents an error that can occur for the `HostWithPathOperation` operation.
@@ -612,556 +1086,1123 @@
  632    576   
            let error = variant.value(py);
  633    577   
  634    578   
            crate::error::InternalServerError {
  635    579   
                message: error.to_string(),
  636    580   
            }
  637    581   
            .into()
  638    582   
        })
  639    583   
    }
  640    584   
}
  641    585   
  642         -
/// Error type for the `EndpointWithHostLabelOperation` operation.
  643         -
/// Each variant represents an error that can occur for the `EndpointWithHostLabelOperation` operation.
         586  +
/// Error type for the `PutWithContentEncoding` operation.
         587  +
/// Each variant represents an error that can occur for the `PutWithContentEncoding` operation.
  644    588   
#[derive(::std::fmt::Debug)]
  645         -
pub enum EndpointWithHostLabelOperationError {
  646         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  647         -
    ValidationException(crate::error::ValidationException),
         589  +
pub enum PutWithContentEncodingError {
  648    590   
    #[allow(missing_docs)] // documentation missing in model
  649    591   
    InternalServerError(crate::error::InternalServerError),
  650    592   
}
  651         -
impl ::std::fmt::Display for EndpointWithHostLabelOperationError {
         593  +
impl ::std::fmt::Display for PutWithContentEncodingError {
  652    594   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  653    595   
        match &self {
  654         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.fmt(f),
  655         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.fmt(f),
         596  +
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.fmt(f),
  656    597   
        }
  657    598   
    }
  658    599   
}
  659         -
impl EndpointWithHostLabelOperationError {
  660         -
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::ValidationException`.
  661         -
    pub fn is_validation_exception(&self) -> bool {
  662         -
        matches!(
  663         -
            &self,
  664         -
            EndpointWithHostLabelOperationError::ValidationException(_)
  665         -
        )
  666         -
    }
  667         -
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::InternalServerError`.
         600  +
impl PutWithContentEncodingError {
         601  +
    /// Returns `true` if the error kind is `PutWithContentEncodingError::InternalServerError`.
  668    602   
    pub fn is_internal_server_error(&self) -> bool {
  669         -
        matches!(
  670         -
            &self,
  671         -
            EndpointWithHostLabelOperationError::InternalServerError(_)
  672         -
        )
         603  +
        matches!(&self, PutWithContentEncodingError::InternalServerError(_))
  673    604   
    }
  674    605   
    /// Returns the error name string by matching the correct variant.
  675    606   
    pub fn name(&self) -> &'static str {
  676    607   
        match &self {
  677         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.name(),
  678         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.name(),
         608  +
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.name(),
  679    609   
        }
  680    610   
    }
  681    611   
}
  682         -
impl ::std::error::Error for EndpointWithHostLabelOperationError {
         612  +
impl ::std::error::Error for PutWithContentEncodingError {
  683    613   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  684    614   
        match &self {
  685         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => Some(_inner),
  686         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => Some(_inner),
  687         -
        }
         615  +
            PutWithContentEncodingError::InternalServerError(_inner) => Some(_inner),
  688    616   
        }
  689         -
}
  690         -
impl ::std::convert::From<crate::error::ValidationException>
  691         -
    for crate::error::EndpointWithHostLabelOperationError
  692         -
{
  693         -
    fn from(
  694         -
        variant: crate::error::ValidationException,
  695         -
    ) -> crate::error::EndpointWithHostLabelOperationError {
  696         -
        Self::ValidationException(variant)
  697    617   
    }
  698    618   
}
  699    619   
impl ::std::convert::From<crate::error::InternalServerError>
  700         -
    for crate::error::EndpointWithHostLabelOperationError
         620  +
    for crate::error::PutWithContentEncodingError
  701    621   
{
  702    622   
    fn from(
  703    623   
        variant: crate::error::InternalServerError,
  704         -
    ) -> crate::error::EndpointWithHostLabelOperationError {
         624  +
    ) -> crate::error::PutWithContentEncodingError {
  705    625   
        Self::InternalServerError(variant)
  706    626   
    }
  707    627   
}
  708    628   
  709         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointWithHostLabelOperationError {
  710         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointWithHostLabelOperationError {
         629  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::PutWithContentEncodingError {
         630  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::PutWithContentEncodingError {
  711    631   
        ::pyo3::Python::with_gil(|py| {
  712    632   
            let error = variant.value(py);
  713         -
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  714         -
                return error.into();
  715         -
            }
         633  +
  716    634   
            crate::error::InternalServerError {
  717    635   
                message: error.to_string(),
  718    636   
            }
  719    637   
            .into()
  720    638   
        })
  721    639   
    }
  722    640   
}
  723    641   
  724         -
/// Error type for the `EndpointOperation` operation.
  725         -
/// Each variant represents an error that can occur for the `EndpointOperation` operation.
         642  +
/// Error type for the `ContentTypeParameters` operation.
         643  +
/// Each variant represents an error that can occur for the `ContentTypeParameters` operation.
  726    644   
#[derive(::std::fmt::Debug)]
  727         -
pub enum EndpointOperationError {
         645  +
pub enum ContentTypeParametersError {
  728    646   
    #[allow(missing_docs)] // documentation missing in model
  729    647   
    InternalServerError(crate::error::InternalServerError),
  730    648   
}
  731         -
impl ::std::fmt::Display for EndpointOperationError {
         649  +
impl ::std::fmt::Display for ContentTypeParametersError {
  732    650   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  733    651   
        match &self {
  734         -
            EndpointOperationError::InternalServerError(_inner) => _inner.fmt(f),
         652  +
            ContentTypeParametersError::InternalServerError(_inner) => _inner.fmt(f),
  735    653   
        }
  736    654   
    }
  737    655   
}
  738         -
impl EndpointOperationError {
  739         -
    /// Returns `true` if the error kind is `EndpointOperationError::InternalServerError`.
         656  +
impl ContentTypeParametersError {
         657  +
    /// Returns `true` if the error kind is `ContentTypeParametersError::InternalServerError`.
  740    658   
    pub fn is_internal_server_error(&self) -> bool {
  741         -
        matches!(&self, EndpointOperationError::InternalServerError(_))
         659  +
        matches!(&self, ContentTypeParametersError::InternalServerError(_))
  742    660   
    }
  743    661   
    /// Returns the error name string by matching the correct variant.
  744    662   
    pub fn name(&self) -> &'static str {
  745    663   
        match &self {
  746         -
            EndpointOperationError::InternalServerError(_inner) => _inner.name(),
         664  +
            ContentTypeParametersError::InternalServerError(_inner) => _inner.name(),
  747    665   
        }
  748    666   
    }
  749    667   
}
  750         -
impl ::std::error::Error for EndpointOperationError {
         668  +
impl ::std::error::Error for ContentTypeParametersError {
  751    669   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  752    670   
        match &self {
  753         -
            EndpointOperationError::InternalServerError(_inner) => Some(_inner),
         671  +
            ContentTypeParametersError::InternalServerError(_inner) => Some(_inner),
  754    672   
        }
  755    673   
    }
  756    674   
}
  757    675   
impl ::std::convert::From<crate::error::InternalServerError>
  758         -
    for crate::error::EndpointOperationError
         676  +
    for crate::error::ContentTypeParametersError
  759    677   
{
  760         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::EndpointOperationError {
         678  +
    fn from(
         679  +
        variant: crate::error::InternalServerError,
         680  +
    ) -> crate::error::ContentTypeParametersError {
  761    681   
        Self::InternalServerError(variant)
  762    682   
    }
  763    683   
}
  764    684   
  765         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointOperationError {
  766         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointOperationError {
         685  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ContentTypeParametersError {
         686  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::ContentTypeParametersError {
  767    687   
        ::pyo3::Python::with_gil(|py| {
  768    688   
            let error = variant.value(py);
  769    689   
  770    690   
            crate::error::InternalServerError {
  771    691   
                message: error.to_string(),
  772    692   
            }
  773    693   
            .into()
  774    694   
        })
  775    695   
    }
  776    696   
}
  777    697   
  778         -
/// Error type for the `JsonUnions` operation.
  779         -
/// Each variant represents an error that can occur for the `JsonUnions` operation.
         698  +
/// Error type for the `OperationWithDefaults` operation.
         699  +
/// Each variant represents an error that can occur for the `OperationWithDefaults` operation.
  780    700   
#[derive(::std::fmt::Debug)]
  781         -
pub enum JsonUnionsError {
         701  +
pub enum OperationWithDefaultsError {
  782    702   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  783    703   
    ValidationException(crate::error::ValidationException),
  784    704   
    #[allow(missing_docs)] // documentation missing in model
  785    705   
    InternalServerError(crate::error::InternalServerError),
  786    706   
}
  787         -
impl ::std::fmt::Display for JsonUnionsError {
         707  +
impl ::std::fmt::Display for OperationWithDefaultsError {
  788    708   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  789    709   
        match &self {
  790         -
            JsonUnionsError::ValidationException(_inner) => _inner.fmt(f),
  791         -
            JsonUnionsError::InternalServerError(_inner) => _inner.fmt(f),
         710  +
            OperationWithDefaultsError::ValidationException(_inner) => _inner.fmt(f),
         711  +
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.fmt(f),
  792    712   
        }
  793    713   
    }
  794    714   
}
  795         -
impl JsonUnionsError {
  796         -
    /// Returns `true` if the error kind is `JsonUnionsError::ValidationException`.
         715  +
impl OperationWithDefaultsError {
         716  +
    /// Returns `true` if the error kind is `OperationWithDefaultsError::ValidationException`.
  797    717   
    pub fn is_validation_exception(&self) -> bool {
  798         -
        matches!(&self, JsonUnionsError::ValidationException(_))
         718  +
        matches!(&self, OperationWithDefaultsError::ValidationException(_))
  799    719   
    }
  800         -
    /// Returns `true` if the error kind is `JsonUnionsError::InternalServerError`.
         720  +
    /// Returns `true` if the error kind is `OperationWithDefaultsError::InternalServerError`.
  801    721   
    pub fn is_internal_server_error(&self) -> bool {
  802         -
        matches!(&self, JsonUnionsError::InternalServerError(_))
         722  +
        matches!(&self, OperationWithDefaultsError::InternalServerError(_))
  803    723   
    }
  804    724   
    /// Returns the error name string by matching the correct variant.
  805    725   
    pub fn name(&self) -> &'static str {
  806    726   
        match &self {
  807         -
            JsonUnionsError::ValidationException(_inner) => _inner.name(),
  808         -
            JsonUnionsError::InternalServerError(_inner) => _inner.name(),
         727  +
            OperationWithDefaultsError::ValidationException(_inner) => _inner.name(),
         728  +
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.name(),
  809    729   
        }
  810    730   
    }
  811    731   
}
  812         -
impl ::std::error::Error for JsonUnionsError {
         732  +
impl ::std::error::Error for OperationWithDefaultsError {
  813    733   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  814    734   
        match &self {
  815         -
            JsonUnionsError::ValidationException(_inner) => Some(_inner),
  816         -
            JsonUnionsError::InternalServerError(_inner) => Some(_inner),
         735  +
            OperationWithDefaultsError::ValidationException(_inner) => Some(_inner),
         736  +
            OperationWithDefaultsError::InternalServerError(_inner) => Some(_inner),
  817    737   
        }
  818    738   
    }
  819    739   
}
  820         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonUnionsError {
  821         -
    fn from(variant: crate::error::ValidationException) -> crate::error::JsonUnionsError {
         740  +
impl ::std::convert::From<crate::error::ValidationException>
         741  +
    for crate::error::OperationWithDefaultsError
         742  +
{
         743  +
    fn from(
         744  +
        variant: crate::error::ValidationException,
         745  +
    ) -> crate::error::OperationWithDefaultsError {
  822    746   
        Self::ValidationException(variant)
  823    747   
    }
  824    748   
}
  825         -
impl ::std::convert::From<crate::error::InternalServerError> for crate::error::JsonUnionsError {
  826         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::JsonUnionsError {
         749  +
impl ::std::convert::From<crate::error::InternalServerError>
         750  +
    for crate::error::OperationWithDefaultsError
         751  +
{
         752  +
    fn from(
         753  +
        variant: crate::error::InternalServerError,
         754  +
    ) -> crate::error::OperationWithDefaultsError {
  827    755   
        Self::InternalServerError(variant)
  828    756   
    }
  829    757   
}
  830    758   
  831         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::JsonUnionsError {
  832         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::JsonUnionsError {
         759  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithDefaultsError {
         760  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithDefaultsError {
  833    761   
        ::pyo3::Python::with_gil(|py| {
  834    762   
            let error = variant.value(py);
  835    763   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  836    764   
                return error.into();
  837    765   
            }
  838    766   
            crate::error::InternalServerError {
  839    767   
                message: error.to_string(),
  840    768   
            }
  841    769   
            .into()
  842    770   
        })
  843    771   
    }
  844    772   
}
  845    773   
  846         -
/// Error type for the `GreetingWithErrors` operation.
  847         -
/// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
         774  +
/// Error type for the `OperationWithRequiredMembers` operation.
         775  +
/// Each variant represents an error that can occur for the `OperationWithRequiredMembers` operation.
  848    776   
#[derive(::std::fmt::Debug)]
  849         -
pub enum GreetingWithErrorsError {
  850         -
    /// This error is thrown when an invalid greeting value is provided.
  851         -
    InvalidGreeting(crate::error::InvalidGreeting),
  852         -
    /// This error is thrown when a request is invalid.
  853         -
    ComplexError(crate::error::ComplexError),
  854         -
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
  855         -
    FooError(crate::error::FooError),
         777  +
pub enum OperationWithRequiredMembersError {
  856    778   
    #[allow(missing_docs)] // documentation missing in model
  857    779   
    InternalServerError(crate::error::InternalServerError),
  858    780   
}
  859         -
impl ::std::fmt::Display for GreetingWithErrorsError {
         781  +
impl ::std::fmt::Display for OperationWithRequiredMembersError {
  860    782   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  861    783   
        match &self {
  862         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
  863         -
            GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
  864         -
            GreetingWithErrorsError::FooError(_inner) => _inner.fmt(f),
  865         -
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.fmt(f),
         784  +
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.fmt(f),
  866    785   
        }
  867    786   
    }
  868    787   
}
  869         -
impl GreetingWithErrorsError {
  870         -
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
  871         -
    pub fn is_invalid_greeting(&self) -> bool {
  872         -
        matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
  873         -
    }
  874         -
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
  875         -
    pub fn is_complex_error(&self) -> bool {
  876         -
        matches!(&self, GreetingWithErrorsError::ComplexError(_))
  877         -
    }
  878         -
    /// Returns `true` if the error kind is `GreetingWithErrorsError::FooError`.
  879         -
    pub fn is_foo_error(&self) -> bool {
  880         -
        matches!(&self, GreetingWithErrorsError::FooError(_))
  881         -
    }
  882         -
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InternalServerError`.
         788  +
impl OperationWithRequiredMembersError {
         789  +
    /// Returns `true` if the error kind is `OperationWithRequiredMembersError::InternalServerError`.
  883    790   
    pub fn is_internal_server_error(&self) -> bool {
  884         -
        matches!(&self, GreetingWithErrorsError::InternalServerError(_))
         791  +
        matches!(
         792  +
            &self,
         793  +
            OperationWithRequiredMembersError::InternalServerError(_)
         794  +
        )
  885    795   
    }
  886    796   
    /// Returns the error name string by matching the correct variant.
  887    797   
    pub fn name(&self) -> &'static str {
  888    798   
        match &self {
  889         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
  890         -
            GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
  891         -
            GreetingWithErrorsError::FooError(_inner) => _inner.name(),
  892         -
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.name(),
         799  +
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.name(),
  893    800   
        }
  894    801   
    }
  895    802   
}
  896         -
impl ::std::error::Error for GreetingWithErrorsError {
         803  +
impl ::std::error::Error for OperationWithRequiredMembersError {
  897    804   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  898    805   
        match &self {
  899         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
  900         -
            GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
  901         -
            GreetingWithErrorsError::FooError(_inner) => Some(_inner),
  902         -
            GreetingWithErrorsError::InternalServerError(_inner) => Some(_inner),
  903         -
        }
  904         -
    }
  905         -
}
  906         -
impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
  907         -
    fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
  908         -
        Self::InvalidGreeting(variant)
  909         -
    }
  910         -
}
  911         -
impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
  912         -
    fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
  913         -
        Self::ComplexError(variant)
         806  +
            OperationWithRequiredMembersError::InternalServerError(_inner) => Some(_inner),
  914    807   
        }
  915         -
}
  916         -
impl ::std::convert::From<crate::error::FooError> for crate::error::GreetingWithErrorsError {
  917         -
    fn from(variant: crate::error::FooError) -> crate::error::GreetingWithErrorsError {
  918         -
        Self::FooError(variant)
  919    808   
    }
  920    809   
}
  921    810   
impl ::std::convert::From<crate::error::InternalServerError>
  922         -
    for crate::error::GreetingWithErrorsError
         811  +
    for crate::error::OperationWithRequiredMembersError
  923    812   
{
  924         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::GreetingWithErrorsError {
         813  +
    fn from(
         814  +
        variant: crate::error::InternalServerError,
         815  +
    ) -> crate::error::OperationWithRequiredMembersError {
  925    816   
        Self::InternalServerError(variant)
  926    817   
    }
  927    818   
}
  928    819   
  929         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::GreetingWithErrorsError {
  930         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::GreetingWithErrorsError {
         820  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithRequiredMembersError {
         821  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersError {
  931    822   
        ::pyo3::Python::with_gil(|py| {
  932    823   
            let error = variant.value(py);
  933         -
            if let Ok(error) = error.extract::<crate::error::InvalidGreeting>() {
  934         -
                return error.into();
  935         -
            }
  936         -
            if let Ok(error) = error.extract::<crate::error::ComplexError>() {
  937         -
                return error.into();
  938         -
            }
  939         -
            if let Ok(error) = error.extract::<crate::error::FooError>() {
  940         -
                return error.into();
  941         -
            }
         824  +
  942    825   
            crate::error::InternalServerError {
  943    826   
                message: error.to_string(),
  944    827   
            }
  945    828   
            .into()
  946    829   
        })
  947    830   
    }
  948    831   
}
  949    832   
  950         -
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
  951         -
/// :rtype None:
  952         -
/// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
  953         -
#[derive(
  954         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  955         -
)]
  956         -
pub struct FooError {}
  957         -
#[allow(clippy::new_without_default)]
  958         -
#[allow(clippy::too_many_arguments)]
  959         -
#[::pyo3::pymethods]
  960         -
impl FooError {
  961         -
    #[new]
  962         -
    pub fn new() -> Self {
  963         -
        Self {}
  964         -
    }
  965         -
    fn __repr__(&self) -> String {
  966         -
        format!("{self:?}")
  967         -
    }
  968         -
    fn __str__(&self) -> String {
  969         -
        format!("{self:?}")
         833  +
/// Error type for the `OperationWithNestedStructure` operation.
         834  +
/// Each variant represents an error that can occur for the `OperationWithNestedStructure` operation.
         835  +
#[derive(::std::fmt::Debug)]
         836  +
pub enum OperationWithNestedStructureError {
         837  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         838  +
    ValidationException(crate::error::ValidationException),
         839  +
    #[allow(missing_docs)] // documentation missing in model
         840  +
    InternalServerError(crate::error::InternalServerError),
         841  +
}
         842  +
impl ::std::fmt::Display for OperationWithNestedStructureError {
         843  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         844  +
        match &self {
         845  +
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.fmt(f),
         846  +
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.fmt(f),
         847  +
        }
  970    848   
    }
  971    849   
}
  972         -
impl FooError {
  973         -
    #[doc(hidden)]
  974         -
    /// Returns the error name.
         850  +
impl OperationWithNestedStructureError {
         851  +
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::ValidationException`.
         852  +
    pub fn is_validation_exception(&self) -> bool {
         853  +
        matches!(
         854  +
            &self,
         855  +
            OperationWithNestedStructureError::ValidationException(_)
         856  +
        )
         857  +
    }
         858  +
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::InternalServerError`.
         859  +
    pub fn is_internal_server_error(&self) -> bool {
         860  +
        matches!(
         861  +
            &self,
         862  +
            OperationWithNestedStructureError::InternalServerError(_)
         863  +
        )
         864  +
    }
         865  +
    /// Returns the error name string by matching the correct variant.
  975    866   
    pub fn name(&self) -> &'static str {
  976         -
        "FooError"
         867  +
        match &self {
         868  +
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.name(),
         869  +
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.name(),
         870  +
        }
  977    871   
    }
  978    872   
}
  979         -
impl ::std::fmt::Display for FooError {
         873  +
impl ::std::error::Error for OperationWithNestedStructureError {
         874  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         875  +
        match &self {
         876  +
            OperationWithNestedStructureError::ValidationException(_inner) => Some(_inner),
         877  +
            OperationWithNestedStructureError::InternalServerError(_inner) => Some(_inner),
         878  +
        }
         879  +
    }
         880  +
}
         881  +
impl ::std::convert::From<crate::error::ValidationException>
         882  +
    for crate::error::OperationWithNestedStructureError
         883  +
{
         884  +
    fn from(
         885  +
        variant: crate::error::ValidationException,
         886  +
    ) -> crate::error::OperationWithNestedStructureError {
         887  +
        Self::ValidationException(variant)
         888  +
    }
         889  +
}
         890  +
impl ::std::convert::From<crate::error::InternalServerError>
         891  +
    for crate::error::OperationWithNestedStructureError
         892  +
{
         893  +
    fn from(
         894  +
        variant: crate::error::InternalServerError,
         895  +
    ) -> crate::error::OperationWithNestedStructureError {
         896  +
        Self::InternalServerError(variant)
         897  +
    }
         898  +
}
         899  +
         900  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithNestedStructureError {
         901  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithNestedStructureError {
         902  +
        ::pyo3::Python::with_gil(|py| {
         903  +
            let error = variant.value(py);
         904  +
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
         905  +
                return error.into();
         906  +
            }
         907  +
            crate::error::InternalServerError {
         908  +
                message: error.to_string(),
         909  +
            }
         910  +
            .into()
         911  +
        })
         912  +
    }
         913  +
}
         914  +
         915  +
/// Error type for the `OperationWithRequiredMembersWithDefaults` operation.
         916  +
/// Each variant represents an error that can occur for the `OperationWithRequiredMembersWithDefaults` operation.
         917  +
#[derive(::std::fmt::Debug)]
         918  +
pub enum OperationWithRequiredMembersWithDefaultsError {
         919  +
    #[allow(missing_docs)] // documentation missing in model
         920  +
    InternalServerError(crate::error::InternalServerError),
         921  +
}
         922  +
impl ::std::fmt::Display for OperationWithRequiredMembersWithDefaultsError {
  980    923   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  981         -
        ::std::write!(f, "FooError")?;
  982         -
        Ok(())
         924  +
        match &self {
         925  +
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
         926  +
                _inner.fmt(f)
         927  +
            }
         928  +
        }
  983    929   
    }
  984    930   
}
  985         -
impl ::std::error::Error for FooError {}
  986         -
impl FooError {
  987         -
    /// Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
  988         -
    pub fn builder() -> crate::error::foo_error::Builder {
  989         -
        crate::error::foo_error::Builder::default()
         931  +
impl OperationWithRequiredMembersWithDefaultsError {
         932  +
    /// Returns `true` if the error kind is `OperationWithRequiredMembersWithDefaultsError::InternalServerError`.
         933  +
    pub fn is_internal_server_error(&self) -> bool {
         934  +
        matches!(
         935  +
            &self,
         936  +
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_)
         937  +
        )
         938  +
    }
         939  +
    /// Returns the error name string by matching the correct variant.
         940  +
    pub fn name(&self) -> &'static str {
         941  +
        match &self {
         942  +
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
         943  +
                _inner.name()
         944  +
            }
         945  +
        }
         946  +
    }
         947  +
}
         948  +
impl ::std::error::Error for OperationWithRequiredMembersWithDefaultsError {
         949  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         950  +
        match &self {
         951  +
            OperationWithRequiredMembersWithDefaultsError::InternalServerError(_inner) => {
         952  +
                Some(_inner)
         953  +
            }
         954  +
        }
         955  +
    }
         956  +
}
         957  +
impl ::std::convert::From<crate::error::InternalServerError>
         958  +
    for crate::error::OperationWithRequiredMembersWithDefaultsError
         959  +
{
         960  +
    fn from(
         961  +
        variant: crate::error::InternalServerError,
         962  +
    ) -> crate::error::OperationWithRequiredMembersWithDefaultsError {
         963  +
        Self::InternalServerError(variant)
         964  +
    }
         965  +
}
         966  +
         967  +
impl ::std::convert::From<::pyo3::PyErr>
         968  +
    for crate::error::OperationWithRequiredMembersWithDefaultsError
         969  +
{
         970  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersWithDefaultsError {
         971  +
        ::pyo3::Python::with_gil(|py| {
         972  +
            let error = variant.value(py);
         973  +
         974  +
            crate::error::InternalServerError {
         975  +
                message: error.to_string(),
         976  +
            }
         977  +
            .into()
         978  +
        })
         979  +
    }
         980  +
}
         981  +
         982  +
/// Error type for the `QueryIncompatibleOperation` operation.
         983  +
/// Each variant represents an error that can occur for the `QueryIncompatibleOperation` operation.
         984  +
#[derive(::std::fmt::Debug)]
         985  +
pub enum QueryIncompatibleOperationError {
         986  +
    #[allow(missing_docs)] // documentation missing in model
         987  +
    InternalServerError(crate::error::InternalServerError),
         988  +
}
         989  +
impl ::std::fmt::Display for QueryIncompatibleOperationError {
         990  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         991  +
        match &self {
         992  +
            QueryIncompatibleOperationError::InternalServerError(_inner) => _inner.fmt(f),
         993  +
        }
         994  +
    }
         995  +
}
         996  +
impl QueryIncompatibleOperationError {
         997  +
    /// Returns `true` if the error kind is `QueryIncompatibleOperationError::InternalServerError`.
         998  +
    pub fn is_internal_server_error(&self) -> bool {
         999  +
        matches!(
        1000  +
            &self,
        1001  +
            QueryIncompatibleOperationError::InternalServerError(_)
        1002  +
        )
        1003  +
    }
        1004  +
    /// Returns the error name string by matching the correct variant.
        1005  +
    pub fn name(&self) -> &'static str {
        1006  +
        match &self {
        1007  +
            QueryIncompatibleOperationError::InternalServerError(_inner) => _inner.name(),
        1008  +
        }
        1009  +
    }
        1010  +
}
        1011  +
impl ::std::error::Error for QueryIncompatibleOperationError {
        1012  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1013  +
        match &self {
        1014  +
            QueryIncompatibleOperationError::InternalServerError(_inner) => Some(_inner),
        1015  +
        }
        1016  +
    }
        1017  +
}
        1018  +
impl ::std::convert::From<crate::error::InternalServerError>
        1019  +
    for crate::error::QueryIncompatibleOperationError
        1020  +
{
        1021  +
    fn from(
        1022  +
        variant: crate::error::InternalServerError,
        1023  +
    ) -> crate::error::QueryIncompatibleOperationError {
        1024  +
        Self::InternalServerError(variant)
        1025  +
    }
        1026  +
}
        1027  +
        1028  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryIncompatibleOperationError {
        1029  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::QueryIncompatibleOperationError {
        1030  +
        ::pyo3::Python::with_gil(|py| {
        1031  +
            let error = variant.value(py);
        1032  +
        1033  +
            crate::error::InternalServerError {
        1034  +
                message: error.to_string(),
        1035  +
            }
        1036  +
            .into()
        1037  +
        })
  990   1038   
    }
  991   1039   
}
  992   1040   
  993   1041   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
  994         -
/// :param top_level typing.Optional\[str\]:
  995         -
/// :param nested typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
        1042  +
/// :param message str:
  996   1043   
/// :rtype None:
  997         -
/// This error is thrown when a request is invalid.
        1044  +
#[allow(missing_docs)] // documentation missing in model
  998   1045   
#[derive(
  999   1046   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1000   1047   
)]
 1001         -
pub struct ComplexError {
 1002         -
    #[pyo3(get, set)]
 1003         -
    /// :type typing.Optional\[str\]:
 1004         -
    #[allow(missing_docs)] // documentation missing in model
 1005         -
    pub top_level: ::std::option::Option<::std::string::String>,
        1048  +
pub struct InternalServerError {
 1006   1049   
    #[pyo3(get, set)]
 1007         -
    /// :type typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
 1008         -
    #[allow(missing_docs)] // documentation missing in model
 1009         -
    pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1010         -
}
 1011         -
impl ComplexError {
 1012         -
    #[allow(missing_docs)] // documentation missing in model
 1013         -
    pub fn top_level(&self) -> ::std::option::Option<&str> {
 1014         -
        self.top_level.as_deref()
 1015         -
    }
        1050  +
    /// :type str:
 1016   1051   
    #[allow(missing_docs)] // documentation missing in model
 1017         -
    pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
 1018         -
        self.nested.as_ref()
 1019         -
    }
        1052  +
    pub message: ::std::string::String,
 1020   1053   
}
 1021   1054   
#[allow(clippy::new_without_default)]
 1022   1055   
#[allow(clippy::too_many_arguments)]
 1023   1056   
#[::pyo3::pymethods]
 1024         -
impl ComplexError {
        1057  +
impl InternalServerError {
 1025   1058   
    #[new]
 1026         -
    pub fn new(
 1027         -
        top_level: ::std::option::Option<::std::string::String>,
 1028         -
        nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1029         -
    ) -> Self {
 1030         -
        Self { top_level, nested }
        1059  +
    pub fn new(message: ::std::string::String) -> Self {
        1060  +
        Self { message }
 1031   1061   
    }
 1032   1062   
    fn __repr__(&self) -> String {
 1033   1063   
        format!("{self:?}")
 1034   1064   
    }
 1035   1065   
    fn __str__(&self) -> String {
 1036   1066   
        format!("{self:?}")
 1037   1067   
    }
 1038   1068   
}
 1039         -
impl ComplexError {
        1069  +
impl InternalServerError {
        1070  +
    /// Returns the error message.
        1071  +
    pub fn message(&self) -> &str {
        1072  +
        &self.message
        1073  +
    }
 1040   1074   
    #[doc(hidden)]
 1041   1075   
    /// Returns the error name.
 1042   1076   
    pub fn name(&self) -> &'static str {
 1043         -
        "ComplexError"
        1077  +
        "InternalServerError"
 1044   1078   
    }
 1045   1079   
}
 1046         -
impl ::std::fmt::Display for ComplexError {
        1080  +
impl ::std::fmt::Display for InternalServerError {
 1047   1081   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1048         -
        ::std::write!(f, "ComplexError")?;
        1082  +
        ::std::write!(f, "InternalServerError")?;
        1083  +
        {
        1084  +
            ::std::write!(f, ": {}", &self.message)?;
        1085  +
        }
 1049   1086   
        Ok(())
 1050   1087   
    }
 1051   1088   
}
 1052         -
impl ::std::error::Error for ComplexError {}
 1053         -
impl ComplexError {
 1054         -
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
 1055         -
    pub fn builder() -> crate::error::complex_error::Builder {
 1056         -
        crate::error::complex_error::Builder::default()
        1089  +
impl ::std::error::Error for InternalServerError {}
        1090  +
impl InternalServerError {
        1091  +
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
        1092  +
    pub fn builder() -> crate::error::internal_server_error::Builder {
        1093  +
        crate::error::internal_server_error::Builder::default()
 1057   1094   
    }
 1058   1095   
}
 1059   1096   
 1060   1097   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
 1061   1098   
/// :param message typing.Optional\[str\]:
 1062   1099   
/// :rtype None:
 1063   1100   
/// This error is thrown when an invalid greeting value is provided.
 1064   1101   
#[derive(
 1065   1102   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1066   1103   
)]
@@ -1088,1125 +1542,1542 @@
 1108   1145   
    }
 1109   1146   
}
 1110   1147   
impl ::std::error::Error for InvalidGreeting {}
 1111   1148   
impl InvalidGreeting {
 1112   1149   
    /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
 1113   1150   
    pub fn builder() -> crate::error::invalid_greeting::Builder {
 1114   1151   
        crate::error::invalid_greeting::Builder::default()
 1115   1152   
    }
 1116   1153   
}
 1117   1154   
 1118         -
/// Error type for the `SimpleScalarProperties` operation.
 1119         -
/// Each variant represents an error that can occur for the `SimpleScalarProperties` operation.
 1120         -
#[derive(::std::fmt::Debug)]
 1121         -
pub enum SimpleScalarPropertiesError {
        1155  +
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1156  +
/// :param top_level typing.Optional\[str\]:
        1157  +
/// :param nested typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
        1158  +
/// :rtype None:
        1159  +
/// This error is thrown when a request is invalid.
        1160  +
#[derive(
        1161  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1162  +
)]
        1163  +
pub struct ComplexError {
        1164  +
    #[pyo3(get, set)]
        1165  +
    /// :type typing.Optional\[str\]:
 1122   1166   
    #[allow(missing_docs)] // documentation missing in model
 1123         -
    InternalServerError(crate::error::InternalServerError),
 1124         -
}
 1125         -
impl ::std::fmt::Display for SimpleScalarPropertiesError {
 1126         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1127         -
        match &self {
 1128         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.fmt(f),
 1129         -
        }
 1130         -
    }
        1167  +
    pub top_level: ::std::option::Option<::std::string::String>,
        1168  +
    #[pyo3(get, set)]
        1169  +
    /// :type typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
        1170  +
    #[allow(missing_docs)] // documentation missing in model
        1171  +
    pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1131   1172   
}
 1132         -
impl SimpleScalarPropertiesError {
 1133         -
    /// Returns `true` if the error kind is `SimpleScalarPropertiesError::InternalServerError`.
 1134         -
    pub fn is_internal_server_error(&self) -> bool {
 1135         -
        matches!(&self, SimpleScalarPropertiesError::InternalServerError(_))
 1136         -
    }
 1137         -
    /// Returns the error name string by matching the correct variant.
 1138         -
    pub fn name(&self) -> &'static str {
 1139         -
        match &self {
 1140         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.name(),
        1173  +
impl ComplexError {
        1174  +
    #[allow(missing_docs)] // documentation missing in model
        1175  +
    pub fn top_level(&self) -> ::std::option::Option<&str> {
        1176  +
        self.top_level.as_deref()
 1141   1177   
    }
        1178  +
    #[allow(missing_docs)] // documentation missing in model
        1179  +
    pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
        1180  +
        self.nested.as_ref()
 1142   1181   
    }
 1143   1182   
}
 1144         -
impl ::std::error::Error for SimpleScalarPropertiesError {
 1145         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 1146         -
        match &self {
 1147         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => Some(_inner),
        1183  +
#[allow(clippy::new_without_default)]
        1184  +
#[allow(clippy::too_many_arguments)]
        1185  +
#[::pyo3::pymethods]
        1186  +
impl ComplexError {
        1187  +
    #[new]
        1188  +
    pub fn new(
        1189  +
        top_level: ::std::option::Option<::std::string::String>,
        1190  +
        nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
        1191  +
    ) -> Self {
        1192  +
        Self { top_level, nested }
 1148   1193   
    }
        1194  +
    fn __repr__(&self) -> String {
        1195  +
        format!("{self:?}")
 1149   1196   
    }
 1150         -
}
 1151         -
impl ::std::convert::From<crate::error::InternalServerError>
 1152         -
    for crate::error::SimpleScalarPropertiesError
 1153         -
{
 1154         -
    fn from(
 1155         -
        variant: crate::error::InternalServerError,
 1156         -
    ) -> crate::error::SimpleScalarPropertiesError {
 1157         -
        Self::InternalServerError(variant)
        1197  +
    fn __str__(&self) -> String {
        1198  +
        format!("{self:?}")
 1158   1199   
    }
 1159   1200   
}
 1160         -
 1161         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::SimpleScalarPropertiesError {
 1162         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::SimpleScalarPropertiesError {
 1163         -
        ::pyo3::Python::with_gil(|py| {
 1164         -
            let error = variant.value(py);
 1165         -
 1166         -
            crate::error::InternalServerError {
 1167         -
                message: error.to_string(),
 1168         -
            }
 1169         -
            .into()
 1170         -
        })
        1201  +
impl ComplexError {
        1202  +
    #[doc(hidden)]
        1203  +
    /// Returns the error name.
        1204  +
    pub fn name(&self) -> &'static str {
        1205  +
        "ComplexError"
 1171   1206   
    }
 1172   1207   
}
 1173         -
 1174         -
/// Error type for the `EmptyInputAndEmptyOutput` operation.
 1175         -
/// Each variant represents an error that can occur for the `EmptyInputAndEmptyOutput` operation.
 1176         -
#[derive(::std::fmt::Debug)]
 1177         -
pub enum EmptyInputAndEmptyOutputError {
 1178         -
    #[allow(missing_docs)] // documentation missing in model
 1179         -
    InternalServerError(crate::error::InternalServerError),
 1180         -
}
 1181         -
impl ::std::fmt::Display for EmptyInputAndEmptyOutputError {
        1208  +
impl ::std::fmt::Display for ComplexError {
 1182   1209   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1183         -
        match &self {
 1184         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.fmt(f),
 1185         -
        }
        1210  +
        ::std::write!(f, "ComplexError")?;
        1211  +
        Ok(())
 1186   1212   
    }
 1187   1213   
}
 1188         -
impl EmptyInputAndEmptyOutputError {
 1189         -
    /// Returns `true` if the error kind is `EmptyInputAndEmptyOutputError::InternalServerError`.
 1190         -
    pub fn is_internal_server_error(&self) -> bool {
 1191         -
        matches!(&self, EmptyInputAndEmptyOutputError::InternalServerError(_))
 1192         -
    }
 1193         -
    /// Returns the error name string by matching the correct variant.
 1194         -
    pub fn name(&self) -> &'static str {
 1195         -
        match &self {
 1196         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.name(),
 1197         -
        }
        1214  +
impl ::std::error::Error for ComplexError {}
        1215  +
impl ComplexError {
        1216  +
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
        1217  +
    pub fn builder() -> crate::error::complex_error::Builder {
        1218  +
        crate::error::complex_error::Builder::default()
 1198   1219   
    }
 1199   1220   
}
 1200         -
impl ::std::error::Error for EmptyInputAndEmptyOutputError {
 1201         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 1202         -
        match &self {
 1203         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => Some(_inner),
        1221  +
        1222  +
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1223  +
/// :rtype None:
        1224  +
/// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
        1225  +
#[derive(
        1226  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1227  +
)]
        1228  +
pub struct FooError {}
        1229  +
#[allow(clippy::new_without_default)]
        1230  +
#[allow(clippy::too_many_arguments)]
        1231  +
#[::pyo3::pymethods]
        1232  +
impl FooError {
        1233  +
    #[new]
        1234  +
    pub fn new() -> Self {
        1235  +
        Self {}
 1204   1236   
    }
        1237  +
    fn __repr__(&self) -> String {
        1238  +
        format!("{self:?}")
 1205   1239   
    }
 1206         -
}
 1207         -
impl ::std::convert::From<crate::error::InternalServerError>
 1208         -
    for crate::error::EmptyInputAndEmptyOutputError
 1209         -
{
 1210         -
    fn from(
 1211         -
        variant: crate::error::InternalServerError,
 1212         -
    ) -> crate::error::EmptyInputAndEmptyOutputError {
 1213         -
        Self::InternalServerError(variant)
        1240  +
    fn __str__(&self) -> String {
        1241  +
        format!("{self:?}")
 1214   1242   
    }
 1215   1243   
}
 1216         -
 1217         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EmptyInputAndEmptyOutputError {
 1218         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::EmptyInputAndEmptyOutputError {
 1219         -
        ::pyo3::Python::with_gil(|py| {
 1220         -
            let error = variant.value(py);
 1221         -
 1222         -
            crate::error::InternalServerError {
 1223         -
                message: error.to_string(),
 1224         -
            }
 1225         -
            .into()
 1226         -
        })
        1244  +
impl FooError {
        1245  +
    #[doc(hidden)]
        1246  +
    /// Returns the error name.
        1247  +
    pub fn name(&self) -> &'static str {
        1248  +
        "FooError"
 1227   1249   
    }
 1228   1250   
}
 1229         -
 1230         -
/// Error type for the `NoInputAndOutput` operation.
 1231         -
/// Each variant represents an error that can occur for the `NoInputAndOutput` operation.
 1232         -
#[derive(::std::fmt::Debug)]
 1233         -
pub enum NoInputAndOutputError {
 1234         -
    #[allow(missing_docs)] // documentation missing in model
 1235         -
    InternalServerError(crate::error::InternalServerError),
 1236         -
}
 1237         -
impl ::std::fmt::Display for NoInputAndOutputError {
        1251  +
impl ::std::fmt::Display for FooError {
 1238   1252   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1239         -
        match &self {
 1240         -
            NoInputAndOutputError::InternalServerError(_inner) => _inner.fmt(f),
 1241         -
        }
        1253  +
        ::std::write!(f, "FooError")?;
        1254  +
        Ok(())
 1242   1255   
    }
 1243   1256   
}
 1244         -
impl NoInputAndOutputError {
 1245         -
    /// Returns `true` if the error kind is `NoInputAndOutputError::InternalServerError`.
 1246         -
    pub fn is_internal_server_error(&self) -> bool {
 1247         -
        matches!(&self, NoInputAndOutputError::InternalServerError(_))
 1248         -
    }
 1249         -
    /// Returns the error name string by matching the correct variant.
 1250         -
    pub fn name(&self) -> &'static str {
 1251         -
        match &self {
 1252         -
            NoInputAndOutputError::InternalServerError(_inner) => _inner.name(),
 1253         -
        }
        1257  +
impl ::std::error::Error for FooError {}
        1258  +
impl FooError {
        1259  +
    /// Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
        1260  +
    pub fn builder() -> crate::error::foo_error::Builder {
        1261  +
        crate::error::foo_error::Builder::default()
 1254   1262   
    }
 1255   1263   
}
 1256         -
impl ::std::error::Error for NoInputAndOutputError {
 1257         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 1258         -
        match &self {
 1259         -
            NoInputAndOutputError::InternalServerError(_inner) => Some(_inner),
 1260         -
        }
 1261         -
    }
        1264  +
        1265  +
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1266  +
/// :param message str:
        1267  +
/// :param field_list typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
        1268  +
/// :rtype None:
        1269  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
        1270  +
#[derive(
        1271  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1272  +
)]
        1273  +
pub struct ValidationException {
        1274  +
    #[pyo3(get, set)]
        1275  +
    /// :type str:
        1276  +
    /// A summary of the validation failure.
        1277  +
    pub message: ::std::string::String,
        1278  +
    #[pyo3(get, set)]
        1279  +
    /// :type typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
        1280  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
        1281  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
 1262   1282   
}
 1263         -
impl ::std::convert::From<crate::error::InternalServerError>
 1264         -
    for crate::error::NoInputAndOutputError
 1265         -
{
 1266         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndOutputError {
 1267         -
        Self::InternalServerError(variant)
        1283  +
impl ValidationException {
        1284  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
        1285  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
        1286  +
        self.field_list.as_deref()
 1268   1287   
    }
 1269   1288   
}
 1270         -
 1271         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndOutputError {
 1272         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndOutputError {
 1273         -
        ::pyo3::Python::with_gil(|py| {
 1274         -
            let error = variant.value(py);
 1275         -
 1276         -
            crate::error::InternalServerError {
 1277         -
                message: error.to_string(),
        1289  +
#[allow(clippy::new_without_default)]
        1290  +
#[allow(clippy::too_many_arguments)]
        1291  +
#[::pyo3::pymethods]
        1292  +
impl ValidationException {
        1293  +
    #[new]
        1294  +
    pub fn new(
        1295  +
        message: ::std::string::String,
        1296  +
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
        1297  +
    ) -> Self {
        1298  +
        Self {
        1299  +
            message,
        1300  +
            field_list,
 1278   1301   
        }
 1279         -
            .into()
 1280         -
        })
 1281   1302   
    }
 1282         -
}
 1283         -
 1284         -
/// Error type for the `NoInputAndNoOutput` operation.
 1285         -
/// Each variant represents an error that can occur for the `NoInputAndNoOutput` operation.
 1286         -
#[derive(::std::fmt::Debug)]
 1287         -
pub enum NoInputAndNoOutputError {
 1288         -
    #[allow(missing_docs)] // documentation missing in model
 1289         -
    InternalServerError(crate::error::InternalServerError),
 1290         -
}
 1291         -
impl ::std::fmt::Display for NoInputAndNoOutputError {
 1292         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1293         -
        match &self {
 1294         -
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.fmt(f),
        1303  +
    fn __repr__(&self) -> String {
        1304  +
        format!("{self:?}")
 1295   1305   
    }
        1306  +
    fn __str__(&self) -> String {
        1307  +
        format!("{self:?}")
 1296   1308   
    }
 1297   1309   
}
 1298         -
impl NoInputAndNoOutputError {
 1299         -
    /// Returns `true` if the error kind is `NoInputAndNoOutputError::InternalServerError`.
 1300         -
    pub fn is_internal_server_error(&self) -> bool {
 1301         -
        matches!(&self, NoInputAndNoOutputError::InternalServerError(_))
        1310  +
impl ValidationException {
        1311  +
    /// Returns the error message.
        1312  +
    pub fn message(&self) -> &str {
        1313  +
        &self.message
 1302   1314   
    }
 1303         -
    /// Returns the error name string by matching the correct variant.
        1315  +
    #[doc(hidden)]
        1316  +
    /// Returns the error name.
 1304   1317   
    pub fn name(&self) -> &'static str {
 1305         -
        match &self {
 1306         -
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.name(),
 1307         -
        }
        1318  +
        "ValidationException"
 1308   1319   
    }
 1309   1320   
}
 1310         -
impl ::std::error::Error for NoInputAndNoOutputError {
 1311         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 1312         -
        match &self {
 1313         -
            NoInputAndNoOutputError::InternalServerError(_inner) => Some(_inner),
 1314         -
        }
        1321  +
impl ::std::fmt::Display for ValidationException {
        1322  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1323  +
        ::std::write!(f, "ValidationException")?;
        1324  +
        {
        1325  +
            ::std::write!(f, ": {}", &self.message)?;
 1315   1326   
        }
 1316         -
}
 1317         -
impl ::std::convert::From<crate::error::InternalServerError>
 1318         -
    for crate::error::NoInputAndNoOutputError
 1319         -
{
 1320         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndNoOutputError {
 1321         -
        Self::InternalServerError(variant)
        1327  +
        Ok(())
 1322   1328   
    }
 1323   1329   
}
 1324         -
 1325         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndNoOutputError {
 1326         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndNoOutputError {
 1327         -
        ::pyo3::Python::with_gil(|py| {
 1328         -
            let error = variant.value(py);
 1329         -
 1330         -
            crate::error::InternalServerError {
 1331         -
                message: error.to_string(),
 1332         -
            }
 1333         -
            .into()
 1334         -
        })
        1330  +
impl ::std::error::Error for ValidationException {}
        1331  +
impl ValidationException {
        1332  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
        1333  +
    pub fn builder() -> crate::error::validation_exception::Builder {
        1334  +
        crate::error::validation_exception::Builder::default()
 1335   1335   
    }
 1336   1336   
}
 1337   1337   
/// See [`InternalServerError`](crate::error::InternalServerError).
 1338   1338   
pub mod internal_server_error {
 1339   1339   
 1340   1340   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1341   1341   
    /// Holds one variant for each of the ways the builder can fail.
 1342   1342   
    #[allow(clippy::enum_variant_names)]
 1343   1343   
    pub enum ConstraintViolation {
 1344   1344   
        /// `message` was not provided but it is required when building `InternalServerError`.
 1345   1345   
        MissingMessage,
 1346   1346   
    }
 1347   1347   
    impl ::std::fmt::Display for ConstraintViolation {
 1348   1348   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1349   1349   
            match self {
 1350   1350   
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
 1351   1351   
            }
 1352   1352   
        }
 1353   1353   
    }
 1354   1354   
    impl ::std::error::Error for ConstraintViolation {}
 1355   1355   
    impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
 1356   1356   
        type Error = ConstraintViolation;
 1357   1357   
 1358   1358   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 1359   1359   
            builder.build()
 1360   1360   
        }
 1361   1361   
    }
 1362   1362   
    /// A builder for [`InternalServerError`](crate::error::InternalServerError).
 1363   1363   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1364   1364   
    pub struct Builder {
 1365   1365   
        pub(crate) message: ::std::option::Option<::std::string::String>,
 1366   1366   
    }
 1367   1367   
    impl Builder {
 1368   1368   
        #[allow(missing_docs)] // documentation missing in model
 1369   1369   
        pub fn message(mut self, input: ::std::string::String) -> Self {
 1370   1370   
            self.message = Some(input);
 1371   1371   
            self
 1372   1372   
        }
 1373   1373   
        /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
 1374   1374   
        ///
 1375   1375   
        /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
 1376   1376   
        ///
 1377   1377   
        pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
 1378   1378   
            self.build_enforcing_required_and_enum_traits()
 1379   1379   
        }
 1380   1380   
        fn build_enforcing_required_and_enum_traits(
 1381   1381   
            self,
 1382   1382   
        ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
 1383   1383   
            Ok(crate::error::InternalServerError {
 1384   1384   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1385   1385   
            })
 1386   1386   
        }
 1387   1387   
    }
 1388   1388   
}
 1389         -
/// See [`ValidationException`](crate::error::ValidationException).
 1390         -
pub mod validation_exception {
 1391         -
 1392         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1393         -
    /// Holds one variant for each of the ways the builder can fail.
 1394         -
    #[allow(clippy::enum_variant_names)]
 1395         -
    pub enum ConstraintViolation {
 1396         -
        /// `message` was not provided but it is required when building `ValidationException`.
 1397         -
        MissingMessage,
 1398         -
    }
 1399         -
    impl ::std::fmt::Display for ConstraintViolation {
 1400         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1401         -
            match self {
 1402         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
 1403         -
            }
 1404         -
        }
 1405         -
    }
 1406         -
    impl ::std::error::Error for ConstraintViolation {}
 1407         -
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
 1408         -
        type Error = ConstraintViolation;
        1389  +
/// See [`InvalidGreeting`](crate::error::InvalidGreeting).
        1390  +
pub mod invalid_greeting {
 1409   1391   
 1410         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        1392  +
    impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
        1393  +
        fn from(builder: Builder) -> Self {
 1411   1394   
            builder.build()
 1412   1395   
        }
 1413   1396   
    }
 1414         -
    /// A builder for [`ValidationException`](crate::error::ValidationException).
        1397  +
    /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
 1415   1398   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1416   1399   
    pub struct Builder {
 1417   1400   
        pub(crate) message: ::std::option::Option<::std::string::String>,
 1418         -
        pub(crate) field_list:
 1419         -
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
 1420   1401   
    }
 1421   1402   
    impl Builder {
 1422         -
        /// A summary of the validation failure.
 1423         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
 1424         -
            self.message = Some(input);
 1425         -
            self
 1426         -
        }
 1427         -
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
 1428         -
        pub fn field_list(
 1429         -
            mut self,
 1430         -
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
 1431         -
        ) -> Self {
 1432         -
            self.field_list = input;
        1403  +
        #[allow(missing_docs)] // documentation missing in model
        1404  +
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        1405  +
            self.message = input;
 1433   1406   
            self
 1434   1407   
        }
 1435         -
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
 1436         -
        ///
 1437         -
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
 1438         -
        ///
 1439         -
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
        1408  +
        /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
        1409  +
        pub fn build(self) -> crate::error::InvalidGreeting {
 1440   1410   
            self.build_enforcing_required_and_enum_traits()
 1441   1411   
        }
 1442         -
        fn build_enforcing_required_and_enum_traits(
 1443         -
            self,
 1444         -
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
 1445         -
            Ok(crate::error::ValidationException {
 1446         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1447         -
                field_list: self.field_list,
 1448         -
            })
 1449         -
        }
 1450         -
    }
 1451         -
}
 1452         -
/// See [`FooError`](crate::error::FooError).
 1453         -
pub mod foo_error {
 1454         -
 1455         -
    impl ::std::convert::From<Builder> for crate::error::FooError {
 1456         -
        fn from(builder: Builder) -> Self {
 1457         -
            builder.build()
 1458         -
        }
 1459         -
    }
 1460         -
    /// A builder for [`FooError`](crate::error::FooError).
 1461         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1462         -
    pub struct Builder {}
 1463         -
    impl Builder {
 1464         -
        /// Consumes the builder and constructs a [`FooError`](crate::error::FooError).
 1465         -
        pub fn build(self) -> crate::error::FooError {
 1466         -
            self.build_enforcing_required_and_enum_traits()
        1412  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::InvalidGreeting {
        1413  +
            crate::error::InvalidGreeting {
        1414  +
                message: self.message,
 1467   1415   
            }
 1468         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::FooError {
 1469         -
            crate::error::FooError {}
 1470   1416   
        }
 1471   1417   
    }
 1472   1418   
}
 1473   1419   
/// See [`ComplexError`](crate::error::ComplexError).
 1474   1420   
pub mod complex_error {
 1475   1421   
 1476   1422   
    impl ::std::convert::From<Builder> for crate::error::ComplexError {
 1477   1423   
        fn from(builder: Builder) -> Self {
 1478   1424   
            builder.build()
 1479   1425   
        }
 1480   1426   
    }
 1481   1427   
    /// A builder for [`ComplexError`](crate::error::ComplexError).
 1482   1428   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1483   1429   
    pub struct Builder {
 1484   1430   
        pub(crate) top_level: ::std::option::Option<::std::string::String>,
 1485   1431   
        pub(crate) nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1486   1432   
    }
 1487   1433   
    impl Builder {
 1488   1434   
        #[allow(missing_docs)] // documentation missing in model
 1489   1435   
        pub fn top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1490   1436   
            self.top_level = input;
 1491   1437   
            self
 1492   1438   
        }
 1493   1439   
        #[allow(missing_docs)] // documentation missing in model
 1494   1440   
        pub fn nested(
 1495   1441   
            mut self,
 1496   1442   
            input: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1497   1443   
        ) -> Self {
 1498   1444   
            self.nested = input;
 1499   1445   
            self
 1500   1446   
        }
 1501   1447   
        /// Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
 1502   1448   
        pub fn build(self) -> crate::error::ComplexError {
 1503   1449   
            self.build_enforcing_required_and_enum_traits()
 1504   1450   
        }
 1505   1451   
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::ComplexError {
 1506   1452   
            crate::error::ComplexError {
 1507   1453   
                top_level: self.top_level,
 1508   1454   
                nested: self.nested,
 1509   1455   
            }
 1510   1456   
        }
 1511   1457   
    }
 1512   1458   
}
 1513         -
/// See [`InvalidGreeting`](crate::error::InvalidGreeting).
 1514         -
pub mod invalid_greeting {
        1459  +
/// See [`FooError`](crate::error::FooError).
        1460  +
pub mod foo_error {
 1515   1461   
 1516         -
    impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
        1462  +
    impl ::std::convert::From<Builder> for crate::error::FooError {
 1517   1463   
        fn from(builder: Builder) -> Self {
 1518   1464   
            builder.build()
 1519   1465   
        }
 1520   1466   
    }
 1521         -
    /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
        1467  +
    /// A builder for [`FooError`](crate::error::FooError).
        1468  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1469  +
    pub struct Builder {}
        1470  +
    impl Builder {
        1471  +
        /// Consumes the builder and constructs a [`FooError`](crate::error::FooError).
        1472  +
        pub fn build(self) -> crate::error::FooError {
        1473  +
            self.build_enforcing_required_and_enum_traits()
        1474  +
        }
        1475  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::FooError {
        1476  +
            crate::error::FooError {}
        1477  +
        }
        1478  +
    }
        1479  +
}
        1480  +
/// See [`ValidationException`](crate::error::ValidationException).
        1481  +
pub mod validation_exception {
        1482  +
        1483  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        1484  +
    /// Holds one variant for each of the ways the builder can fail.
        1485  +
    #[allow(clippy::enum_variant_names)]
        1486  +
    pub enum ConstraintViolation {
        1487  +
        /// `message` was not provided but it is required when building `ValidationException`.
        1488  +
        MissingMessage,
        1489  +
    }
        1490  +
    impl ::std::fmt::Display for ConstraintViolation {
        1491  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1492  +
            match self {
        1493  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
        1494  +
            }
        1495  +
        }
        1496  +
    }
        1497  +
    impl ::std::error::Error for ConstraintViolation {}
        1498  +
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
        1499  +
        type Error = ConstraintViolation;
        1500  +
        1501  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        1502  +
            builder.build()
        1503  +
        }
        1504  +
    }
        1505  +
    /// A builder for [`ValidationException`](crate::error::ValidationException).
 1522   1506   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1523   1507   
    pub struct Builder {
 1524   1508   
        pub(crate) message: ::std::option::Option<::std::string::String>,
        1509  +
        pub(crate) field_list:
        1510  +
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
 1525   1511   
    }
 1526   1512   
    impl Builder {
 1527         -
        #[allow(missing_docs)] // documentation missing in model
 1528         -
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1529         -
            self.message = input;
        1513  +
        /// A summary of the validation failure.
        1514  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
        1515  +
            self.message = Some(input);
 1530   1516   
            self
 1531   1517   
        }
 1532         -
        /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
 1533         -
        pub fn build(self) -> crate::error::InvalidGreeting {
 1534         -
            self.build_enforcing_required_and_enum_traits()
        1518  +
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
        1519  +
        pub fn field_list(
        1520  +
            mut self,
        1521  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
        1522  +
        ) -> Self {
        1523  +
            self.field_list = input;
        1524  +
            self
 1535   1525   
        }
 1536         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::InvalidGreeting {
 1537         -
            crate::error::InvalidGreeting {
 1538         -
                message: self.message,
        1526  +
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
        1527  +
        ///
        1528  +
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
        1529  +
        ///
        1530  +
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
        1531  +
            self.build_enforcing_required_and_enum_traits()
 1539   1532   
        }
        1533  +
        fn build_enforcing_required_and_enum_traits(
        1534  +
            self,
        1535  +
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
        1536  +
            Ok(crate::error::ValidationException {
        1537  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
        1538  +
                field_list: self.field_list,
        1539  +
            })
 1540   1540   
        }
 1541   1541   
    }
 1542   1542   
}