Server Test Typescript

Server Test Typescript

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/operation.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
    2      3   
const CONTENT_TYPE_GETPOKEMONSPECIES: ::mime::Mime = ::mime::APPLICATION_JSON;
    3      4   
::pin_project_lite::pin_project! {
    4      5   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    5      6   
    /// [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) using modelled bindings.
    6      7   
    pub struct GetPokemonSpeciesInputFuture {
    7      8   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    8      9   
    }
    9     10   
}
   10     11   
   11     12   
impl std::future::Future for GetPokemonSpeciesInputFuture {
@@ -40,41 +137,141 @@
   60     61   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   61     62   
                    e,
   62     63   
                )
   63     64   
            },
   64     65   
        );
   65     66   
        GetPokemonSpeciesInputFuture {
   66     67   
            inner: Box::pin(fut),
   67     68   
        }
   68     69   
    }
   69     70   
}
          71  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
   70     72   
impl
   71     73   
    ::aws_smithy_http_server::response::IntoResponse<
   72     74   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   73     75   
    > for crate::output::GetPokemonSpeciesOutput
   74     76   
{
   75     77   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   76     78   
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_response(self) {
   77     79   
                        Ok(response) => response,
   78     80   
                        Err(e) => {
   79     81   
                            ::tracing::error!(error = %e, "failed to serialize response");
   80     82   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   81     83   
                        }
   82     84   
                    }
   83     85   
    }
   84     86   
}
          87  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
   85     88   
impl
   86     89   
    ::aws_smithy_http_server::response::IntoResponse<
   87     90   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   88     91   
    > for crate::error::GetPokemonSpeciesError
   89     92   
{
   90     93   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   91     94   
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_error(
   92     95   
            &self,
   93     96   
        ) {
   94     97   
            Ok(mut response) => {
   95     98   
                response.extensions_mut().insert(
   96     99   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
   97    100   
                );
   98    101   
                response
   99    102   
            }
  100    103   
            Err(e) => {
  101    104   
                ::tracing::error!(error = %e, "failed to serialize response");
  102    105   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  103    106   
            }
  104    107   
        }
  105    108   
    }
  106    109   
}
  107    110   
         111  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  108    112   
const CONTENT_TYPE_CHECKHEALTH: ::mime::Mime = ::mime::APPLICATION_JSON;
  109    113   
::pin_project_lite::pin_project! {
  110    114   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  111    115   
    /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
  112    116   
    pub struct CheckHealthInputFuture {
  113    117   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  114    118   
    }
  115    119   
}
  116    120   
  117    121   
impl std::future::Future for CheckHealthInputFuture {
@@ -144,148 +239,246 @@
  164    168   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  165    169   
                    e,
  166    170   
                )
  167    171   
            },
  168    172   
        );
  169    173   
        CheckHealthInputFuture {
  170    174   
            inner: Box::pin(fut),
  171    175   
        }
  172    176   
    }
  173    177   
}
         178  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  174    179   
impl
  175    180   
    ::aws_smithy_http_server::response::IntoResponse<
  176    181   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  177    182   
    > for crate::output::CheckHealthOutput
  178    183   
{
  179    184   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  180    185   
        match crate::protocol_serde::shape_check_health::ser_check_health_http_response(self) {
  181    186   
            Ok(response) => response,
  182    187   
            Err(e) => {
  183    188   
                ::tracing::error!(error = %e, "failed to serialize response");
  184    189   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  185    190   
            }
  186    191   
        }
  187    192   
    }
  188    193   
}
         194  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  189    195   
impl
  190    196   
    ::aws_smithy_http_server::response::IntoResponse<
  191    197   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  192    198   
    > for crate::error::CheckHealthError
  193    199   
{
  194    200   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  195    201   
        match crate::protocol_serde::shape_check_health::ser_check_health_http_error(&self) {
  196    202   
            Ok(mut response) => {
  197    203   
                response.extensions_mut().insert(
  198    204   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  199    205   
                );
  200    206   
                response
  201    207   
            }
  202    208   
            Err(e) => {
  203    209   
                ::tracing::error!(error = %e, "failed to serialize response");
  204    210   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  205    211   
            }
  206    212   
        }
  207    213   
    }
  208    214   
}
  209    215   
         216  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  210    217   
const CONTENT_TYPE_DONOTHING: ::mime::Mime = ::mime::APPLICATION_JSON;
  211    218   
::pin_project_lite::pin_project! {
  212    219   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  213    220   
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
  214    221   
    pub struct DoNothingInputFuture {
  215    222   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  216    223   
    }
  217    224   
}
  218    225   
  219    226   
impl std::future::Future for DoNothingInputFuture {
@@ -246,253 +341,351 @@
  266    273   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  267    274   
                    e,
  268    275   
                )
  269    276   
            },
  270    277   
        );
  271    278   
        DoNothingInputFuture {
  272    279   
            inner: Box::pin(fut),
  273    280   
        }
  274    281   
    }
  275    282   
}
         283  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  276    284   
impl
  277    285   
    ::aws_smithy_http_server::response::IntoResponse<
  278    286   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  279    287   
    > for crate::output::DoNothingOutput
  280    288   
{
  281    289   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  282    290   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
  283    291   
            Ok(response) => response,
  284    292   
            Err(e) => {
  285    293   
                ::tracing::error!(error = %e, "failed to serialize response");
  286    294   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  287    295   
            }
  288    296   
        }
  289    297   
    }
  290    298   
}
         299  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  291    300   
impl
  292    301   
    ::aws_smithy_http_server::response::IntoResponse<
  293    302   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  294    303   
    > for crate::error::DoNothingError
  295    304   
{
  296    305   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  297    306   
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_error(&self) {
  298    307   
            Ok(mut response) => {
  299    308   
                response.extensions_mut().insert(
  300    309   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  301    310   
                );
  302    311   
                response
  303    312   
            }
  304    313   
            Err(e) => {
  305    314   
                ::tracing::error!(error = %e, "failed to serialize response");
  306    315   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  307    316   
            }
  308    317   
        }
  309    318   
    }
  310    319   
}
  311    320   
         321  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  312    322   
const CONTENT_TYPE_GETSERVERSTATISTICS: ::mime::Mime = ::mime::APPLICATION_JSON;
  313    323   
::pin_project_lite::pin_project! {
  314    324   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  315    325   
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
  316    326   
    pub struct GetServerStatisticsInputFuture {
  317    327   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  318    328   
    }
  319    329   
}
  320    330   
  321    331   
impl std::future::Future for GetServerStatisticsInputFuture {
@@ -348,358 +410,422 @@
  368    378   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  369    379   
                    e,
  370    380   
                )
  371    381   
            },
  372    382   
        );
  373    383   
        GetServerStatisticsInputFuture {
  374    384   
            inner: Box::pin(fut),
  375    385   
        }
  376    386   
    }
  377    387   
}
         388  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  378    389   
impl
  379    390   
    ::aws_smithy_http_server::response::IntoResponse<
  380    391   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  381    392   
    > for crate::output::GetServerStatisticsOutput
  382    393   
{
  383    394   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  384    395   
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
  385    396   
                        Ok(response) => response,
  386    397   
                        Err(e) => {
  387    398   
                            ::tracing::error!(error = %e, "failed to serialize response");
  388    399   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  389    400   
                        }
  390    401   
                    }
  391    402   
    }
  392    403   
}
         404  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  393    405   
impl
  394    406   
    ::aws_smithy_http_server::response::IntoResponse<
  395    407   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  396    408   
    > for crate::error::GetServerStatisticsError
  397    409   
{
  398    410   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  399    411   
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_error(&self) {
  400    412   
            Ok(mut response) => {
  401    413   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  402    414   
                response

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/operation_shape.rs

@@ -1,1 +0,161 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Retrieve information about a Pokémon species.
           2  +
/* ServerOperationGenerator.kt:48 */
           3  +
/// /* ServerOperationGenerator.kt:48 */Retrieve information about a Pokémon species.
           4  +
/* ServerOperationGenerator.kt:55 */
    4      5   
pub struct GetPokemonSpecies;
    5      6   
    6      7   
impl ::aws_smithy_http_server::operation::OperationShape for GetPokemonSpecies {
    7      8   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8      9   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    9     10   
            "com.aws.example#GetPokemonSpecies",
   10     11   
            "com.aws.example",
   11     12   
            "GetPokemonSpecies",
   12     13   
        );
   13     14   
   14     15   
    type Input = crate::input::GetPokemonSpeciesInput;
   15     16   
    type Output = crate::output::GetPokemonSpeciesOutput;
   16     17   
    type Error = crate::error::GetPokemonSpeciesError;
   17     18   
}
   18     19   
   19     20   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetPokemonSpecies {
   20     21   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   21     22   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   22     23   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   23     24   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     25   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   25     26   
        >,
   26     27   
    >;
   27     28   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   28     29   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   29     30   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   30     31   
    >;
   31     32   
   32     33   
    fn request_fmt() -> Self::RequestFmt {
   33     34   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   34     35   
    }
   35     36   
   36     37   
    fn response_fmt() -> Self::ResponseFmt {
   37     38   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   38     39   
    }
   39     40   
}
          41  +
/* ServerOperationGenerator.kt:88 */
   40     42   
   41         -
/// Health check operation, to check the service is up Not yet a deep check
          43  +
/// /* ServerOperationGenerator.kt:48 */Health check operation, to check the service is up Not yet a deep check
          44  +
/* ServerOperationGenerator.kt:55 */
   42     45   
pub struct CheckHealth;
   43     46   
   44     47   
impl ::aws_smithy_http_server::operation::OperationShape for CheckHealth {
   45     48   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   46     49   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   47     50   
            "com.aws.example#CheckHealth",
   48     51   
            "com.aws.example",
   49     52   
            "CheckHealth",
   50     53   
        );
   51     54   
   52     55   
    type Input = crate::input::CheckHealthInput;
   53     56   
    type Output = crate::output::CheckHealthOutput;
   54     57   
    type Error = crate::error::CheckHealthError;
   55     58   
}
   56     59   
   57     60   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CheckHealth {
   58     61   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   59     62   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   60     63   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   61     64   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   62     65   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   63     66   
        >,
   64     67   
    >;
   65     68   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   66     69   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   67     70   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   68     71   
    >;
   69     72   
   70     73   
    fn request_fmt() -> Self::RequestFmt {
   71     74   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   72     75   
    }
   73     76   
   74     77   
    fn response_fmt() -> Self::ResponseFmt {
   75     78   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   76     79   
    }
   77     80   
}
          81  +
/* ServerOperationGenerator.kt:88 */
   78     82   
   79         -
/// DoNothing operation, used to stress test the framework.
          83  +
/// /* ServerOperationGenerator.kt:48 */DoNothing operation, used to stress test the framework.
          84  +
/* ServerOperationGenerator.kt:55 */
   80     85   
pub struct DoNothing;
   81     86   
   82     87   
impl ::aws_smithy_http_server::operation::OperationShape for DoNothing {
   83     88   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   84     89   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   85     90   
            "com.aws.example#DoNothing",
   86     91   
            "com.aws.example",
   87     92   
            "DoNothing",
   88     93   
        );
   89     94   
   90     95   
    type Input = crate::input::DoNothingInput;
   91     96   
    type Output = crate::output::DoNothingOutput;
   92     97   
    type Error = crate::error::DoNothingError;
   93     98   
}
   94     99   
   95    100   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
   96    101   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   97    102   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   98    103   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   99    104   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  100    105   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  101    106   
        >,
  102    107   
    >;
  103    108   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  104    109   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  105    110   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  106    111   
    >;
  107    112   
  108    113   
    fn request_fmt() -> Self::RequestFmt {
  109    114   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  110    115   
    }
  111    116   
  112    117   
    fn response_fmt() -> Self::ResponseFmt {
  113    118   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  114    119   
    }
  115    120   
}
         121  +
/* ServerOperationGenerator.kt:88 */
  116    122   
  117         -
/// Retrieve HTTP server statistiscs, such as calls count.
         123  +
/// /* ServerOperationGenerator.kt:48 */Retrieve HTTP server statistiscs, such as calls count.
         124  +
/* ServerOperationGenerator.kt:55 */
  118    125   
pub struct GetServerStatistics;
  119    126   
  120    127   
impl ::aws_smithy_http_server::operation::OperationShape for GetServerStatistics {
  121    128   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  122    129   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  123    130   
            "com.aws.example#GetServerStatistics",
  124    131   
            "com.aws.example",
  125    132   
            "GetServerStatistics",
  126    133   
        );
  127    134   
  128    135   
    type Input = crate::input::GetServerStatisticsInput;
  129    136   
    type Output = crate::output::GetServerStatisticsOutput;
  130    137   
    type Error = crate::error::GetServerStatisticsError;
  131    138   
}
  132    139   
  133    140   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetServerStatistics {
  134    141   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  135    142   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  136    143   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  137    144   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  138    145   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  139    146   
        >,
  140    147   
    >;
  141    148   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  142    149   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  143    150   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  144    151   
    >;
  145    152   
  146    153   
    fn request_fmt() -> Self::RequestFmt {
  147    154   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  148    155   
    }
  149    156   
  150    157   
    fn response_fmt() -> Self::ResponseFmt {
  151    158   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  152    159   
    }
  153    160   
}
         161  +
/* ServerOperationGenerator.kt:88 */

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/output.rs

@@ -1,1 +246,400 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[::napi_derive::napi(object)]
           4  +
/* StructureGenerator.kt:197 */
    3      5   
#[allow(missing_docs)] // documentation missing in model
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(
    5      8   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6      9   
)]
    7         -
pub struct GetPokemonSpeciesOutput {
    8         -
    /// The name for this resource.
          10  +
pub /* StructureGenerator.kt:201 */ struct GetPokemonSpeciesOutput {
          11  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
    9     12   
    pub name: ::std::string::String,
   10         -
    /// A list of flavor text entries for this Pokémon species.
          13  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
   11     14   
    pub flavor_text_entries: ::std::vec::Vec<crate::model::FlavorText>,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl GetPokemonSpeciesOutput {
   14         -
    /// The name for this resource.
          19  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn name(&self) -> &str {
          22  +
        /* StructureGenerator.kt:171 */
   16     23   
        use std::ops::Deref;
   17     24   
        self.name.deref()
          25  +
        /* StructureGenerator.kt:166 */
   18     26   
    }
   19         -
    /// A list of flavor text entries for this Pokémon species.
          27  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
          28  +
    /* StructureGenerator.kt:166 */
   20     29   
    pub fn flavor_text_entries(&self) -> &[crate::model::FlavorText] {
          30  +
        /* StructureGenerator.kt:171 */
   21     31   
        use std::ops::Deref;
   22     32   
        self.flavor_text_entries.deref()
          33  +
        /* StructureGenerator.kt:166 */
   23     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   24     36   
}
          37  +
/* ServerCodegenVisitor.kt:370 */
   25     38   
impl GetPokemonSpeciesOutput {
   26         -
    /// Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
          39  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
          40  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   27     41   
    pub fn builder() -> crate::output::get_pokemon_species_output::Builder {
          42  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   28     43   
        crate::output::get_pokemon_species_output::Builder::default()
          44  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   29     45   
    }
          46  +
    /* ServerCodegenVisitor.kt:370 */
   30     47   
}
   31     48   
          49  +
/* RustType.kt:516 */
   32     50   
#[::napi_derive::napi(object)]
          51  +
/* StructureGenerator.kt:197 */
   33     52   
#[allow(missing_docs)] // documentation missing in model
          53  +
/* RustType.kt:516 */
   34     54   
#[derive(
   35     55   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   36     56   
)]
   37         -
pub struct CheckHealthOutput {}
          57  +
pub /* StructureGenerator.kt:201 */ struct CheckHealthOutput {/* StructureGenerator.kt:201 */}
          58  +
/* ServerCodegenVisitor.kt:370 */
   38     59   
impl CheckHealthOutput {
   39         -
    /// Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
          60  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
          61  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   40     62   
    pub fn builder() -> crate::output::check_health_output::Builder {
          63  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   41     64   
        crate::output::check_health_output::Builder::default()
          65  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   42     66   
    }
          67  +
    /* ServerCodegenVisitor.kt:370 */
   43     68   
}
   44     69   
          70  +
/* RustType.kt:516 */
   45     71   
#[::napi_derive::napi(object)]
          72  +
/* StructureGenerator.kt:197 */
   46     73   
#[allow(missing_docs)] // documentation missing in model
          74  +
/* RustType.kt:516 */
   47     75   
#[derive(
   48     76   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   49     77   
)]
   50         -
pub struct DoNothingOutput {}
          78  +
pub /* StructureGenerator.kt:201 */ struct DoNothingOutput {/* StructureGenerator.kt:201 */}
          79  +
/* ServerCodegenVisitor.kt:370 */
   51     80   
impl DoNothingOutput {
   52         -
    /// Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
          81  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
          82  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   53     83   
    pub fn builder() -> crate::output::do_nothing_output::Builder {
          84  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   54     85   
        crate::output::do_nothing_output::Builder::default()
          86  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   55     87   
    }
          88  +
    /* ServerCodegenVisitor.kt:370 */
   56     89   
}
   57     90   
          91  +
/* RustType.kt:516 */
   58     92   
#[::napi_derive::napi(object)]
          93  +
/* StructureGenerator.kt:197 */
   59     94   
#[allow(missing_docs)] // documentation missing in model
          95  +
/* RustType.kt:516 */
   60     96   
#[derive(
   61     97   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   62     98   
)]
   63         -
pub struct GetServerStatisticsOutput {
   64         -
    /// The number of calls executed by the server.
          99  +
pub /* StructureGenerator.kt:201 */ struct GetServerStatisticsOutput {
         100  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
   65    101   
    pub calls_count: i64,
         102  +
    /* StructureGenerator.kt:201 */
   66    103   
}
         104  +
/* StructureGenerator.kt:135 */
   67    105   
impl GetServerStatisticsOutput {
   68         -
    /// The number of calls executed by the server.
         106  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
         107  +
    /* StructureGenerator.kt:166 */
   69    108   
    pub fn calls_count(&self) -> i64 {
         109  +
        /* StructureGenerator.kt:168 */
   70    110   
        self.calls_count
         111  +
        /* StructureGenerator.kt:166 */
   71    112   
    }
         113  +
    /* StructureGenerator.kt:135 */
   72    114   
}
         115  +
/* ServerCodegenVisitor.kt:370 */
   73    116   
impl GetServerStatisticsOutput {
   74         -
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         117  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         118  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   75    119   
    pub fn builder() -> crate::output::get_server_statistics_output::Builder {
         120  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   76    121   
        crate::output::get_server_statistics_output::Builder::default()
         122  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   77    123   
    }
         124  +
    /* ServerCodegenVisitor.kt:370 */
   78    125   
}
   79         -
/// See [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
         126  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
   80    127   
pub mod get_pokemon_species_output {
   81    128   
         129  +
    /* RustType.kt:516 */
   82    130   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
   83         -
    /// Holds one variant for each of the ways the builder can fail.
   84         -
         131  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         132  +
    /* ServerBuilderConstraintViolations.kt:75 */
   85    133   
    #[allow(clippy::enum_variant_names)]
   86    134   
    pub enum ConstraintViolation {
   87         -
        /// `name` was not provided but it is required when building `GetPokemonSpeciesOutput`.
         135  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`name` was not provided but it is required when building `GetPokemonSpeciesOutput`.
         136  +
        /* ServerBuilderConstraintViolations.kt:143 */
   88    137   
        MissingName,
   89         -
        /// `flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`.
         138  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`.
         139  +
        /* ServerBuilderConstraintViolations.kt:143 */
   90    140   
        MissingFlavorTextEntries,
         141  +
        /* ServerBuilderConstraintViolations.kt:75 */
   91    142   
    }
         143  +
    /* ServerBuilderConstraintViolations.kt:117 */
   92    144   
    impl ::std::fmt::Display for ConstraintViolation {
         145  +
        /* ServerBuilderConstraintViolations.kt:118 */
   93    146   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         147  +
            /* ServerBuilderConstraintViolations.kt:119 */
   94    148   
            match self {
   95         -
                ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
   96         -
                ConstraintViolation::MissingFlavorTextEntries => write!(f, "`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
   97         -
            }
         149  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
         150  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingFlavorTextEntries => write!(f, "`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
         151  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         152  +
            /* ServerBuilderConstraintViolations.kt:118 */
   98    153   
        }
         154  +
        /* ServerBuilderConstraintViolations.kt:117 */
   99    155   
    }
         156  +
    /* ServerBuilderConstraintViolations.kt:84 */
  100    157   
    impl ::std::error::Error for ConstraintViolation {}
         158  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  101    159   
    impl ::std::convert::TryFrom<Builder> for crate::output::GetPokemonSpeciesOutput {
  102    160   
        type Error = ConstraintViolation;
  103    161   
  104    162   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  105    163   
            builder.build()
  106    164   
        }
  107    165   
    }
  108         -
    /// A builder for [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
         166  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
         167  +
    /* RustType.kt:516 */
  109    168   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         169  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  110    170   
    pub struct Builder {
         171  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  111    172   
        pub(crate) name: ::std::option::Option<::std::string::String>,
         173  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  112    174   
        pub(crate) flavor_text_entries:
  113    175   
            ::std::option::Option<::std::vec::Vec<crate::model::FlavorText>>,
         176  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  114    177   
    }
         178  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  115    179   
    impl Builder {
  116         -
        /// The name for this resource.
         180  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */The name for this resource.
         181  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  117    182   
        pub fn name(mut self, input: ::std::string::String) -> Self {
  118         -
            self.name = Some(input);
         183  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         184  +
            self.name =
         185  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         186  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         187  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         188  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  119    189   
            self
         190  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  120    191   
        }
  121         -
        /// A list of flavor text entries for this Pokémon species.
         192  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A list of flavor text entries for this Pokémon species.
         193  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  122    194   
        pub fn flavor_text_entries(
  123    195   
            mut self,
  124    196   
            input: ::std::vec::Vec<crate::model::FlavorText>,
  125    197   
        ) -> Self {
  126         -
            self.flavor_text_entries = Some(input);
         198  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         199  +
            self.flavor_text_entries =
         200  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         201  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         202  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         203  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  127    204   
            self
         205  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  128    206   
        }
  129         -
        /// Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  130         -
        ///
         207  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
         208  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  131    209   
        /// The builder fails to construct a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput) if you do not provide a value for all non-`Option`al members.
  132    210   
        ///
         211  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  133    212   
        pub fn build(self) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
  134    213   
            self.build_enforcing_required_and_enum_traits()
  135    214   
        }
         215  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  136    216   
        fn build_enforcing_required_and_enum_traits(
  137    217   
            self,
  138    218   
        ) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
  139         -
            Ok(crate::output::GetPokemonSpeciesOutput {
  140         -
                name: self.name.ok_or(ConstraintViolation::MissingName)?,
  141         -
                flavor_text_entries: self
  142         -
                    .flavor_text_entries
  143         -
                    .ok_or(ConstraintViolation::MissingFlavorTextEntries)?,
  144         -
            })
         219  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         220  +
            Ok(
         221  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         222  +
                crate::output::GetPokemonSpeciesOutput {
         223  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         224  +
                    name: self
         225  +
                        .name
         226  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         227  +
                        .ok_or(ConstraintViolation::MissingName)?,
         228  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         229  +
                    flavor_text_entries: self
         230  +
                        .flavor_text_entries
         231  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         232  +
                        .ok_or(ConstraintViolation::MissingFlavorTextEntries)?,
         233  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         234  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         235  +
            )
         236  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  145    237   
        }
         238  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  146    239   
    }
         240  +
         241  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  147    242   
}
  148         -
/// See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         243  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  149    244   
pub mod check_health_output {
  150    245   
         246  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  151    247   
    impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
  152    248   
        fn from(builder: Builder) -> Self {
  153    249   
            builder.build()
  154    250   
        }
  155    251   
    }
  156         -
    /// A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         252  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         253  +
    /* RustType.kt:516 */
  157    254   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  158         -
    pub struct Builder {}
         255  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         256  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         257  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  159    258   
    impl Builder {
  160         -
        /// Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         259  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         260  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  161    261   
        pub fn build(self) -> crate::output::CheckHealthOutput {
  162    262   
            self.build_enforcing_required_and_enum_traits()
  163    263   
        }
         264  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  164    265   
        fn build_enforcing_required_and_enum_traits(self) -> crate::output::CheckHealthOutput {
  165         -
            crate::output::CheckHealthOutput {}
         266  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         267  +
            crate::output::CheckHealthOutput {
         268  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         269  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  166    270   
        }
         271  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  167    272   
    }
         273  +
         274  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  168    275   
}
  169         -
/// See [`DoNothingOutput`](crate::output::DoNothingOutput).
         276  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`DoNothingOutput`](crate::output::DoNothingOutput).
  170    277   
pub mod do_nothing_output {
  171    278   
         279  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  172    280   
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
  173    281   
        fn from(builder: Builder) -> Self {
  174    282   
            builder.build()
  175    283   
        }
  176    284   
    }
  177         -
    /// A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
         285  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
         286  +
    /* RustType.kt:516 */
  178    287   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  179         -
    pub struct Builder {}
         288  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         289  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         290  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  180    291   
    impl Builder {
  181         -
        /// Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
         292  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
         293  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  182    294   
        pub fn build(self) -> crate::output::DoNothingOutput {
  183    295   
            self.build_enforcing_required_and_enum_traits()
  184    296   
        }
         297  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  185    298   
        fn build_enforcing_required_and_enum_traits(self) -> crate::output::DoNothingOutput {
  186         -
            crate::output::DoNothingOutput {}
         299  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         300  +
            crate::output::DoNothingOutput {
         301  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         302  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  187    303   
        }
         304  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  188    305   
    }
         306  +
         307  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  189    308   
}
  190         -
/// See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         309  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  191    310   
pub mod get_server_statistics_output {
  192    311   
         312  +
    /* RustType.kt:516 */
  193    313   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  194         -
    /// Holds one variant for each of the ways the builder can fail.
  195         -
         314  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         315  +
    /* ServerBuilderConstraintViolations.kt:75 */
  196    316   
    #[allow(clippy::enum_variant_names)]
  197    317   
    pub enum ConstraintViolation {
  198         -
        /// `calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
         318  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
         319  +
        /* ServerBuilderConstraintViolations.kt:143 */
  199    320   
        MissingCallsCount,
         321  +
        /* ServerBuilderConstraintViolations.kt:75 */
  200    322   
    }
         323  +
    /* ServerBuilderConstraintViolations.kt:117 */
  201    324   
    impl ::std::fmt::Display for ConstraintViolation {
         325  +
        /* ServerBuilderConstraintViolations.kt:118 */
  202    326   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         327  +
            /* ServerBuilderConstraintViolations.kt:119 */
  203    328   
            match self {
  204         -
                ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
  205         -
            }
         329  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
         330  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         331  +
            /* ServerBuilderConstraintViolations.kt:118 */
  206    332   
        }
         333  +
        /* ServerBuilderConstraintViolations.kt:117 */
  207    334   
    }
         335  +
    /* ServerBuilderConstraintViolations.kt:84 */
  208    336   
    impl ::std::error::Error for ConstraintViolation {}
         337  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  209    338   
    impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
  210    339   
        type Error = ConstraintViolation;
  211    340   
  212    341   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  213    342   
            builder.build()
  214    343   
        }
  215    344   
    }
  216         -
    /// A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         345  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         346  +
    /* RustType.kt:516 */
  217    347   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         348  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  218    349   
    pub struct Builder {
         350  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  219    351   
        pub(crate) calls_count: ::std::option::Option<i64>,
         352  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  220    353   
    }
         354  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  221    355   
    impl Builder {
  222         -
        /// The number of calls executed by the server.
         356  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */The number of calls executed by the server.
         357  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  223    358   
        pub fn calls_count(mut self, input: i64) -> Self {
  224         -
            self.calls_count = Some(input);
         359  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         360  +
            self.calls_count =
         361  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         362  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         363  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         364  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  225    365   
            self
         366  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  226    367   
        }
  227         -
        /// Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  228         -
        ///
         368  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         369  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  229    370   
        /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if you do not provide a value for all non-`Option`al members.
  230    371   
        ///
         372  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  231    373   
        pub fn build(
  232    374   
            self,
  233    375   
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
  234    376   
            self.build_enforcing_required_and_enum_traits()
  235    377   
        }
         378  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  236    379   
        fn build_enforcing_required_and_enum_traits(
  237    380   
            self,
  238    381   
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
  239         -
            Ok(crate::output::GetServerStatisticsOutput {
  240         -
                calls_count: self
  241         -
                    .calls_count
  242         -
                    .ok_or(ConstraintViolation::MissingCallsCount)?,
  243         -
            })
         382  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         383  +
            Ok(
         384  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         385  +
                crate::output::GetServerStatisticsOutput {
         386  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         387  +
                    calls_count: self
         388  +
                        .calls_count
         389  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         390  +
                        .ok_or(ConstraintViolation::MissingCallsCount)?,
         391  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         392  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         393  +
            )
         394  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  244    395   
        }
         396  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  245    397   
    }
         398  +
         399  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  246    400   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_check_health.rs

@@ -1,1 +91,132 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_check_health_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::CheckHealthInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::check_health_input_internal::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:811 */
   22     30   
        ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(&headers, None)?;
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   23     32   
        input.build()
          33  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   24     34   
    })
          35  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   25     36   
}
   26     37   
          38  +
/* RustType.kt:516 */
   27     39   
#[allow(clippy::unnecessary_wraps)]
          40  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   28     41   
pub fn ser_check_health_http_response(
   29     42   
    #[allow(unused_variables)] output: crate::output::CheckHealthOutput,
   30     43   
) -> std::result::Result<
   31     44   
    ::aws_smithy_http_server::response::Response,
   32     45   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   33     46   
> {
          47  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   34     48   
    Ok({
          49  +
        /* RustType.kt:516 */
   35     50   
        #[allow(unused_mut)]
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   36     52   
        let mut builder = ::http::Response::builder();
          53  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   37     54   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   38     55   
            builder,
   39     56   
            ::http::header::CONTENT_TYPE,
   40     57   
            "application/json",
   41     58   
        );
          59  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   42     60   
        let http_status: u16 = 200;
   43     61   
        builder = builder.status(http_status);
   44         -
        let payload = "";
          62  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          63  +
        let payload =
          64  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          65  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          66  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   45     67   
        let content_length = payload.len();
   46     68   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   47     69   
            builder,
   48     70   
            ::http::header::CONTENT_LENGTH,
   49     71   
            content_length,
   50     72   
        );
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   51     74   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   52     76   
        builder.body(body)?
          77  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   53     78   
    })
          79  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   54     80   
}
   55     81   
          82  +
/* RustType.kt:516 */
   56     83   
#[allow(clippy::unnecessary_wraps)]
          84  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   57     85   
pub fn ser_check_health_http_error(
   58     86   
    error: &crate::error::CheckHealthError,
   59     87   
) -> std::result::Result<
   60     88   
    ::aws_smithy_http_server::response::Response,
   61     89   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   62     90   
> {
          91  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   63     92   
    Ok({
          93  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   64     94   
        match error {
          95  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   65     96   
            crate::error::CheckHealthError::InternalServerError(output) => {
          97  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   66     98   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
          99  +
                /* RustType.kt:516 */
   67    100   
                #[allow(unused_mut)]
         101  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   68    102   
                let mut builder = ::http::Response::builder();
         103  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   69    104   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   70    105   
                    builder,
   71    106   
                    ::http::header::CONTENT_TYPE,
   72    107   
                    "application/json",
   73    108   
                );
         109  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   74    110   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   75    111   
                    builder,
   76    112   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   77    113   
                    "InternalServerError",
   78    114   
                );
         115  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   79    116   
                let content_length = payload.len();
   80    117   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   81    118   
                    builder,
   82    119   
                    ::http::header::CONTENT_LENGTH,
   83    120   
                    content_length,
   84    121   
                );
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   85    123   
                builder
   86    124   
                    .status(500)
   87    125   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   88         -
            }
         126  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         127  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
   89    128   
        }
         129  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   90    130   
    })
         131  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   91    132   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_do_nothing.rs

@@ -1,1 +93,130 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_do_nothing_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::DoNothingInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::do_nothing_input_internal::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   22     30   
        input.build()
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   23     32   
    })
          33  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   24     34   
}
   25     35   
          36  +
/* RustType.kt:516 */
   26     37   
#[allow(clippy::unnecessary_wraps)]
          38  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   27     39   
pub fn ser_do_nothing_http_response(
   28     40   
    #[allow(unused_variables)] output: crate::output::DoNothingOutput,
   29     41   
) -> std::result::Result<
   30     42   
    ::aws_smithy_http_server::response::Response,
   31     43   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   32     44   
> {
          45  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   33     46   
    Ok({
          47  +
        /* RustType.kt:516 */
   34     48   
        #[allow(unused_mut)]
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   35     50   
        let mut builder = ::http::Response::builder();
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   36     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     53   
            builder,
   38     54   
            ::http::header::CONTENT_TYPE,
   39     55   
            "application/json",
   40     56   
        );
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   41     58   
        let http_status: u16 = 200;
   42     59   
        builder = builder.status(http_status);
          60  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   43     61   
        let payload =
   44         -
            crate::protocol_serde::shape_do_nothing_output::ser_do_nothing_output_output_output(
   45         -
                &output,
   46         -
            )?;
          62  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_do_nothing_output::ser_do_nothing_output_output_output(&output)?
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   47     65   
        let content_length = payload.len();
   48     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   49     67   
            builder,
   50     68   
            ::http::header::CONTENT_LENGTH,
   51     69   
            content_length,
   52     70   
        );
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   53     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   54     74   
        builder.body(body)?
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   55     76   
    })
          77  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   56     78   
}
   57     79   
          80  +
/* RustType.kt:516 */
   58     81   
#[allow(clippy::unnecessary_wraps)]
          82  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   59     83   
pub fn ser_do_nothing_http_error(
   60     84   
    error: &crate::error::DoNothingError,
   61     85   
) -> std::result::Result<
   62     86   
    ::aws_smithy_http_server::response::Response,
   63     87   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   64     88   
> {
          89  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   65     90   
    Ok({
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   66     92   
        match error {
          93  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   67     94   
            crate::error::DoNothingError::InternalServerError(output) => {
          95  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   68     96   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
          97  +
                /* RustType.kt:516 */
   69     98   
                #[allow(unused_mut)]
          99  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   70    100   
                let mut builder = ::http::Response::builder();
         101  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   71    102   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   72    103   
                    builder,
   73    104   
                    ::http::header::CONTENT_TYPE,
   74    105   
                    "application/json",
   75    106   
                );
         107  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   76    108   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   77    109   
                    builder,
   78    110   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   79    111   
                    "InternalServerError",
   80    112   
                );
         113  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   81    114   
                let content_length = payload.len();
   82    115   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   83    116   
                    builder,
   84    117   
                    ::http::header::CONTENT_LENGTH,
   85    118   
                    content_length,
   86    119   
                );
         120  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   87    121   
                builder
   88    122   
                    .status(500)
   89    123   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   90         -
            }
         124  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         125  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
   91    126   
        }
         127  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   92    128   
    })
         129  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   93    130   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_do_nothing_output.rs

@@ -1,1 +20,28 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_do_nothing_output_output_output(
    3      4   
    value: &crate::output::DoNothingOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_do_nothing_output::ser_do_nothing_output_output(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_do_nothing_output_output(
   16     22   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    #[allow(unused_variables)] input: &crate::output::DoNothingOutput,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* JsonSerializerGenerator.kt:372 */
   19     26   
    Ok(())
          27  +
    /* JsonSerializerGenerator.kt:358 */
   20     28   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_flavor_text.rs

@@ -1,1 +13,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_flavor_text(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::model::FlavorText,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* SerializerUtil.kt:42 */
    6      8   
    {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("flavorText").string(input.flavor_text.as_str());
          11  +
        /* SerializerUtil.kt:42 */
    8     12   
    }
          13  +
    /* SerializerUtil.kt:42 */
    9     14   
    {
          15  +
        /* JsonSerializerGenerator.kt:423 */
   10     16   
        object.key("language").string(input.language.as_str());
          17  +
        /* SerializerUtil.kt:42 */
   11     18   
    }
          19  +
    /* JsonSerializerGenerator.kt:372 */
   12     20   
    Ok(())
          21  +
    /* JsonSerializerGenerator.kt:358 */
   13     22   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_pokemon_species.rs

@@ -1,1 +160,219 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_get_pokemon_species_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::GetPokemonSpeciesInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::get_pokemon_species_input_internal::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:986 */
   22     30   
        let input_string = uri.path();
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:998 */
   23     32   
        let (input_string, (_, m1)) =
   24     33   
            ::nom::sequence::tuple::<_, _, ::nom::error::Error<&str>, _>((
   25     34   
                ::nom::sequence::preceded(
   26     35   
                    ::nom::bytes::complete::tag("/"),
   27     36   
                    ::nom::bytes::complete::tag::<_, _, ::nom::error::Error<&str>>(
   28     37   
                        "pokemon-species",
   29     38   
                    ),
   30     39   
                ),
   31     40   
                ::nom::sequence::preceded(
   32     41   
                    ::nom::bytes::complete::tag("/"),
   33     42   
                    ::nom::branch::alt::<_, _, ::nom::error::Error<&str>, _>((
   34     43   
                        ::nom::bytes::complete::take_until("/"),
   35     44   
                        ::nom::combinator::rest,
   36     45   
                    )),
   37     46   
                ),
   38     47   
            ))(input_string)?;
   39     48   
        debug_assert_eq!("", input_string);
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:1009 */
   40     50   
        input =
   41     51   
            input.set_name(crate::protocol_serde::shape_get_pokemon_species_input::de_name(m1)?);
          52  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   42     53   
        input.build()?
          54  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   43     55   
    })
          56  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   44     57   
}
   45     58   
          59  +
/* RustType.kt:516 */
   46     60   
#[allow(clippy::unnecessary_wraps)]
          61  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   47     62   
pub fn ser_get_pokemon_species_http_response(
   48     63   
    #[allow(unused_variables)] output: crate::output::GetPokemonSpeciesOutput,
   49     64   
) -> std::result::Result<
   50     65   
    ::aws_smithy_http_server::response::Response,
   51     66   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   52     67   
> {
          68  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   53     69   
    Ok({
          70  +
        /* RustType.kt:516 */
   54     71   
        #[allow(unused_mut)]
          72  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   55     73   
        let mut builder = ::http::Response::builder();
          74  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   56     75   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   57     76   
            builder,
   58     77   
            ::http::header::CONTENT_TYPE,
   59     78   
            "application/json",
   60     79   
        );
          80  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   61     81   
        let http_status: u16 = 200;
   62     82   
        builder = builder.status(http_status);
          83  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   63     84   
        let payload =
   64         -
            crate::protocol_serde::shape_get_pokemon_species_output::ser_get_pokemon_species_output_output_output(&output)?
   65         -
        ;
          85  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_get_pokemon_species_output::ser_get_pokemon_species_output_output_output(&output)?
          86  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          87  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   66     88   
        let content_length = payload.len();
   67     89   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   68     90   
            builder,
   69     91   
            ::http::header::CONTENT_LENGTH,
   70     92   
            content_length,
   71     93   
        );
          94  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   72     95   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          96  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   73     97   
        builder.body(body)?
          98  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   74     99   
    })
         100  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   75    101   
}
   76    102   
         103  +
/* RustType.kt:516 */
   77    104   
#[allow(clippy::unnecessary_wraps)]
         105  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   78    106   
pub fn ser_get_pokemon_species_http_error(
   79    107   
    error: &crate::error::GetPokemonSpeciesError,
   80    108   
) -> std::result::Result<
   81    109   
    ::aws_smithy_http_server::response::Response,
   82    110   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   83    111   
> {
         112  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   84    113   
    Ok({
         114  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   85    115   
        match error {
         116  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   86    117   
            crate::error::GetPokemonSpeciesError::ResourceNotFoundException(output) => {
         118  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   87    119   
                let payload = crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception_error(output)?;
         120  +
                /* RustType.kt:516 */
   88    121   
                #[allow(unused_mut)]
         122  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   89    123   
                let mut builder = ::http::Response::builder();
         124  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   90    125   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   91    126   
                    builder,
   92    127   
                    ::http::header::CONTENT_TYPE,
   93    128   
                    "application/json",
   94    129   
                );
         130  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   95    131   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   96    132   
                    builder,
   97    133   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   98    134   
                    "ResourceNotFoundException",
   99    135   
                );
         136  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  100    137   
                let content_length = payload.len();
  101    138   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  102    139   
                    builder,
  103    140   
                    ::http::header::CONTENT_LENGTH,
  104    141   
                    content_length,
  105    142   
                );
         143  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  106    144   
                builder
  107    145   
                    .status(404)
  108    146   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         147  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
  109    148   
            }
         149  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  110    150   
            crate::error::GetPokemonSpeciesError::ValidationException(output) => {
         151  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  111    152   
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
         153  +
                /* RustType.kt:516 */
  112    154   
                #[allow(unused_mut)]
         155  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  113    156   
                let mut builder = ::http::Response::builder();
         157  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  114    158   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  115    159   
                    builder,
  116    160   
                    ::http::header::CONTENT_TYPE,
  117    161   
                    "application/json",
  118    162   
                );
         163  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  119    164   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  120    165   
                    builder,
  121    166   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  122    167   
                    "ValidationException",
  123    168   
                );
         169  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  124    170   
                let content_length = payload.len();
  125    171   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  126    172   
                    builder,
  127    173   
                    ::http::header::CONTENT_LENGTH,
  128    174   
                    content_length,
  129    175   
                );
         176  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  130    177   
                builder
  131    178   
                    .status(400)
  132    179   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         180  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
  133    181   
            }
         182  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
  134    183   
            crate::error::GetPokemonSpeciesError::InternalServerError(output) => {
         184  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
  135    185   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
         186  +
                /* RustType.kt:516 */
  136    187   
                #[allow(unused_mut)]
         188  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
  137    189   
                let mut builder = ::http::Response::builder();
         190  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  138    191   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  139    192   
                    builder,
  140    193   
                    ::http::header::CONTENT_TYPE,
  141    194   
                    "application/json",
  142    195   
                );
         196  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
  143    197   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  144    198   
                    builder,
  145    199   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
  146    200   
                    "InternalServerError",
  147    201   
                );
         202  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
  148    203   
                let content_length = payload.len();
  149    204   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
  150    205   
                    builder,
  151    206   
                    ::http::header::CONTENT_LENGTH,
  152    207   
                    content_length,
  153    208   
                );
         209  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
  154    210   
                builder
  155    211   
                    .status(500)
  156    212   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
  157         -
            }
         213  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         214  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
  158    215   
        }
         216  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
  159    217   
    })
         218  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
  160    219   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_pokemon_species_input.rs

@@ -1,1 +12,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:1292 */
    2      3   
pub fn de_name(
    3      4   
    value: &str,
    4      5   
) -> std::result::Result<
    5      6   
    ::std::string::String,
    6      7   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    7      8   
> {
           9  +
    /* ServerHttpBoundProtocolGenerator.kt:1302 */
    8     10   
    let value = ::percent_encoding::percent_decode_str(value)
    9     11   
        .decode_utf8()?
   10     12   
        .into_owned();
          13  +
    /* ServerHttpBoundProtocolGenerator.kt:1357 */
   11     14   
    Ok(value)
          15  +
    /* ServerHttpBoundProtocolGenerator.kt:1292 */
   12     16   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_pokemon_species_output.rs

@@ -1,1 +35,58 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_get_pokemon_species_output_output_output(
    3      4   
    value: &crate::output::GetPokemonSpeciesOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_get_pokemon_species_output::ser_get_pokemon_species_output_output(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_get_pokemon_species_output_output(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::output::GetPokemonSpeciesOutput,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* SerializerUtil.kt:42 */
   19     26   
    {
          27  +
        /* JsonSerializerGenerator.kt:484 */
   20     28   
        let mut array_1 = object.key("flavorTextEntries").start_array();
          29  +
        /* JsonSerializerGenerator.kt:524 */
   21     30   
        for item_2 in &input.flavor_text_entries {
          31  +
            /* SerializerUtil.kt:42 */
   22     32   
            {
          33  +
                /* JsonSerializerGenerator.kt:495 */
   23     34   
                #[allow(unused_mut)]
          35  +
                /* JsonSerializerGenerator.kt:496 */
   24     36   
                let mut object_3 = array_1.value().start_object();
          37  +
                /* JsonSerializerGenerator.kt:375 */
   25     38   
                crate::protocol_serde::shape_flavor_text::ser_flavor_text(&mut object_3, item_2)?;
          39  +
                /* JsonSerializerGenerator.kt:515 */
   26     40   
                object_3.finish();
          41  +
                /* SerializerUtil.kt:42 */
   27     42   
            }
          43  +
            /* JsonSerializerGenerator.kt:524 */
   28     44   
        }
          45  +
        /* JsonSerializerGenerator.kt:486 */
   29     46   
        array_1.finish();
          47  +
        /* SerializerUtil.kt:42 */
   30     48   
    }
          49  +
    /* SerializerUtil.kt:42 */
   31     50   
    {
          51  +
        /* JsonSerializerGenerator.kt:423 */
   32     52   
        object.key("name").string(input.name.as_str());
          53  +
        /* SerializerUtil.kt:42 */
   33     54   
    }
          55  +
    /* JsonSerializerGenerator.kt:372 */
   34     56   
    Ok(())
          57  +
    /* JsonSerializerGenerator.kt:358 */
   35     58   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_server_statistics.rs

@@ -1,1 +92,130 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_get_server_statistics_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::GetServerStatisticsInput,
    7      9   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::get_server_statistics_input_internal::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   22     30   
        input.build()
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   23     32   
    })
          33  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   24     34   
}
   25     35   
          36  +
/* RustType.kt:516 */
   26     37   
#[allow(clippy::unnecessary_wraps)]
          38  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   27     39   
pub fn ser_get_server_statistics_http_response(
   28     40   
    #[allow(unused_variables)] output: crate::output::GetServerStatisticsOutput,
   29     41   
) -> std::result::Result<
   30     42   
    ::aws_smithy_http_server::response::Response,
   31     43   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   32     44   
> {
          45  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   33     46   
    Ok({
          47  +
        /* RustType.kt:516 */
   34     48   
        #[allow(unused_mut)]
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   35     50   
        let mut builder = ::http::Response::builder();
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   36     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     53   
            builder,
   38     54   
            ::http::header::CONTENT_TYPE,
   39     55   
            "application/json",
   40     56   
        );
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   41     58   
        let http_status: u16 = 200;
   42     59   
        builder = builder.status(http_status);
          60  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
   43     61   
        let payload =
   44         -
            crate::protocol_serde::shape_get_server_statistics_output::ser_get_server_statistics_output_output_output(&output)?
   45         -
        ;
          62  +
            /* HttpBoundProtocolPayloadGenerator.kt:237 */crate::protocol_serde::shape_get_server_statistics_output::ser_get_server_statistics_output_output_output(&output)?
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   46     65   
        let content_length = payload.len();
   47     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   48     67   
            builder,
   49     68   
            ::http::header::CONTENT_LENGTH,
   50     69   
            content_length,
   51     70   
        );
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   52     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   53     74   
        builder.body(body)?
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   54     76   
    })
          77  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   55     78   
}
   56     79   
          80  +
/* RustType.kt:516 */
   57     81   
#[allow(clippy::unnecessary_wraps)]
          82  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   58     83   
pub fn ser_get_server_statistics_http_error(
   59     84   
    error: &crate::error::GetServerStatisticsError,
   60     85   
) -> std::result::Result<
   61     86   
    ::aws_smithy_http_server::response::Response,
   62     87   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
   63     88   
> {
          89  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   64     90   
    Ok({
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   65     92   
        match error {
          93  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   66     94   
            crate::error::GetServerStatisticsError::InternalServerError(output) => {
          95  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   67     96   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
          97  +
                /* RustType.kt:516 */
   68     98   
                #[allow(unused_mut)]
          99  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   69    100   
                let mut builder = ::http::Response::builder();
         101  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   70    102   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   71    103   
                    builder,
   72    104   
                    ::http::header::CONTENT_TYPE,
   73    105   
                    "application/json",
   74    106   
                );
         107  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   75    108   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   76    109   
                    builder,
   77    110   
                    ::http::header::HeaderName::from_static("x-amzn-errortype"),
   78    111   
                    "InternalServerError",
   79    112   
                );
         113  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   80    114   
                let content_length = payload.len();
   81    115   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   82    116   
                    builder,
   83    117   
                    ::http::header::CONTENT_LENGTH,
   84    118   
                    content_length,
   85    119   
                );
         120  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   86    121   
                builder
   87    122   
                    .status(500)
   88    123   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
   89         -
            }
         124  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         125  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
   90    126   
        }
         127  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   91    128   
    })
         129  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   92    130   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_get_server_statistics_output.rs

@@ -1,1 +23,34 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_get_server_statistics_output_output_output(
    3      4   
    value: &crate::output::GetServerStatisticsOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_get_server_statistics_output::ser_get_server_statistics_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_get_server_statistics_output_output(
   13     19   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    input: &crate::output::GetServerStatisticsOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* SerializerUtil.kt:42 */
   16     23   
    {
          24  +
        /* JsonSerializerGenerator.kt:432 */
   17     25   
        object.key("calls_count").number(
   18     26   
            #[allow(clippy::useless_conversion)]
   19     27   
            ::aws_smithy_types::Number::NegInt((input.calls_count).into()),
   20     28   
        );
          29  +
        /* SerializerUtil.kt:42 */
   21     30   
    }
          31  +
    /* JsonSerializerGenerator.kt:372 */
   22     32   
    Ok(())
          33  +
    /* JsonSerializerGenerator.kt:358 */
   23     34   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_internal_server_error.rs

@@ -1,1 +23,34 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_internal_server_error_error(
    3      4   
    value: &crate::error::InternalServerError,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_internal_server_error::ser_internal_server_error(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_internal_server_error(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::error::InternalServerError,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* SerializerUtil.kt:42 */
   19     26   
    {
          27  +
        /* JsonSerializerGenerator.kt:423 */
   20     28   
        object.key("message").string(input.message.as_str());
          29  +
        /* SerializerUtil.kt:42 */
   21     30   
    }
          31  +
    /* JsonSerializerGenerator.kt:372 */
   22     32   
    Ok(())
          33  +
    /* JsonSerializerGenerator.kt:358 */
   23     34   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_resource_not_found_exception.rs

@@ -1,1 +23,34 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_resource_not_found_exception_error(
    3      4   
    value: &crate::error::ResourceNotFoundException,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_resource_not_found_exception::ser_resource_not_found_exception(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_resource_not_found_exception(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::error::ResourceNotFoundException,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* SerializerUtil.kt:42 */
   19     26   
    {
          27  +
        /* JsonSerializerGenerator.kt:423 */
   20     28   
        object.key("message").string(input.message.as_str());
          29  +
        /* SerializerUtil.kt:42 */
   21     30   
    }
          31  +
    /* JsonSerializerGenerator.kt:372 */
   22     32   
    Ok(())
          33  +
    /* JsonSerializerGenerator.kt:358 */
   23     34   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_validation_exception.rs

@@ -1,1 +35,58 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_validation_exception_error(
    3      4   
    value: &crate::error::ValidationException,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_validation_exception::ser_validation_exception(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* JsonSerializerGenerator.kt:227 */
   11     15   
    object.finish();
   12     16   
    Ok(out)
          17  +
    /* JsonSerializerGenerator.kt:213 */
   13     18   
}
   14     19   
          20  +
/* JsonSerializerGenerator.kt:358 */
   15     21   
pub fn ser_validation_exception(
   16     22   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   17     23   
    input: &crate::error::ValidationException,
   18     24   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          25  +
    /* JsonSerializerGenerator.kt:382 */
   19     26   
    if let Some(var_1) = &input.field_list {
          27  +
        /* JsonSerializerGenerator.kt:484 */
   20     28   
        let mut array_2 = object.key("fieldList").start_array();
          29  +
        /* JsonSerializerGenerator.kt:524 */
   21     30   
        for item_3 in var_1 {
          31  +
            /* SerializerUtil.kt:42 */
   22     32   
            {
          33  +
                /* JsonSerializerGenerator.kt:495 */
   23     34   
                #[allow(unused_mut)]
          35  +
                /* JsonSerializerGenerator.kt:496 */
   24     36   
                let mut object_4 = array_2.value().start_object();
          37  +
                /* JsonSerializerGenerator.kt:375 */
   25     38   
                crate::protocol_serde::shape_validation_exception_field::ser_validation_exception_field(&mut object_4, item_3)?;
          39  +
                /* JsonSerializerGenerator.kt:515 */
   26     40   
                object_4.finish();
          41  +
                /* SerializerUtil.kt:42 */
   27     42   
            }
          43  +
            /* JsonSerializerGenerator.kt:524 */
   28     44   
        }
          45  +
        /* JsonSerializerGenerator.kt:486 */
   29     46   
        array_2.finish();
          47  +
        /* JsonSerializerGenerator.kt:382 */
   30     48   
    }
          49  +
    /* SerializerUtil.kt:42 */
   31     50   
    {
          51  +
        /* JsonSerializerGenerator.kt:423 */
   32     52   
        object.key("message").string(input.message.as_str());
          53  +
        /* SerializerUtil.kt:42 */
   33     54   
    }
          55  +
    /* JsonSerializerGenerator.kt:372 */
   34     56   
    Ok(())
          57  +
    /* JsonSerializerGenerator.kt:358 */
   35     58   
}

tmp-codegen-diff/codegen-server-test-typescript/pokemon-service-server-sdk/rust-server-codegen-typescript/src/protocol_serde/shape_validation_exception_field.rs

@@ -1,1 +13,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_validation_exception_field(
    3      4   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    input: &crate::model::ValidationExceptionField,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* SerializerUtil.kt:42 */
    6      8   
    {
           9  +
        /* JsonSerializerGenerator.kt:423 */
    7     10   
        object.key("path").string(input.path.as_str());
          11  +
        /* SerializerUtil.kt:42 */
    8     12   
    }
          13  +
    /* SerializerUtil.kt:42 */
    9     14   
    {
          15  +
        /* JsonSerializerGenerator.kt:423 */
   10     16   
        object.key("message").string(input.message.as_str());
          17  +
        /* SerializerUtil.kt:42 */
   11     18   
    }
          19  +
    /* JsonSerializerGenerator.kt:372 */
   12     20   
    Ok(())
          21  +
    /* JsonSerializerGenerator.kt:358 */
   13     22   
}