Server Test

Server Test

rev. 03e6e47f15dfd569240d570d98975ebba692c405 (ignoring whitespace)

Files changed:

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

@@ -1,1 +202,227 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* EventStreamErrorMarshallerGenerator.kt:79 */
    2      3   
#[non_exhaustive]
    3      4   
#[derive(Debug)]
    4      5   
pub struct CapturePokemonEventsErrorMarshaller;
    5      6   
    6      7   
impl CapturePokemonEventsErrorMarshaller {
    7      8   
    pub fn new() -> Self {
    8      9   
        CapturePokemonEventsErrorMarshaller
    9     10   
    }
   10     11   
}
          12  +
/* EventStreamErrorMarshallerGenerator.kt:93 */
   11     13   
impl ::aws_smithy_eventstream::frame::MarshallMessage for CapturePokemonEventsErrorMarshaller {
          14  +
    /* EventStreamErrorMarshallerGenerator.kt:97 */
   12     15   
    type Input = crate::error::CapturePokemonEventsError;
          16  +
    /* EventStreamErrorMarshallerGenerator.kt:99 */
   13     17   
    fn marshall(
   14     18   
        &self,
   15     19   
        _input: Self::Input,
   16     20   
    ) -> std::result::Result<
   17     21   
        ::aws_smithy_types::event_stream::Message,
   18     22   
        ::aws_smithy_eventstream::error::Error,
   19     23   
    > {
          24  +
        /* EventStreamErrorMarshallerGenerator.kt:103 */
   20     25   
        let mut headers = Vec::new();
          26  +
        /* EventStreamMarshallerGenerator.kt:343 */
   21     27   
        headers.push(::aws_smithy_types::event_stream::Header::new(
   22     28   
            ":message-type",
   23     29   
            ::aws_smithy_types::event_stream::HeaderValue::String("exception".into()),
   24     30   
        ));
          31  +
        /* EventStreamErrorMarshallerGenerator.kt:108 */
   25     32   
        let payload = match _input {
   26         -
            crate::error::CapturePokemonEventsError::InvalidPokeballError(inner) => {
   27         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
   28         -
                    ":exception-type",
   29         -
                    ::aws_smithy_types::event_stream::HeaderValue::String(
   30         -
                        "invalid_pokeball".into(),
   31         -
                    ),
   32         -
                ));
   33         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
   34         -
                    ":content-type",
   35         -
                    ::aws_smithy_types::event_stream::HeaderValue::String(
   36         -
                        "application/json".into(),
   37         -
                    ),
   38         -
                ));
   39         -
                crate::protocol_serde::shape_invalid_pokeball_error::ser_invalid_pokeball_error_error(&inner)
          33  +
            /* EventStreamErrorMarshallerGenerator.kt:113 */crate::error::CapturePokemonEventsError::InvalidPokeballError(inner) =>  {
          34  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":exception-type", ::aws_smithy_types::event_stream::HeaderValue::String("invalid_pokeball".into())));
          35  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
          36  +
                /* EventStreamMarshallerGenerator.kt:304 */crate::protocol_serde::shape_invalid_pokeball_error::ser_invalid_pokeball_error_error(&inner)
   40     37   
                                            .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
   41         -
            }
   42         -
            crate::error::CapturePokemonEventsError::ThrottlingError(inner) => {
   43         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
   44         -
                    ":exception-type",
   45         -
                    ::aws_smithy_types::event_stream::HeaderValue::String("throttlingError".into()),
   46         -
                ));
   47         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
   48         -
                    ":content-type",
   49         -
                    ::aws_smithy_types::event_stream::HeaderValue::String(
   50         -
                        "application/json".into(),
   51         -
                    ),
   52         -
                ));
   53         -
                crate::protocol_serde::shape_throttling_error::ser_throttling_error_error(&inner)
   54         -
                    .map_err(|err| {
   55         -
                        ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}"))
   56         -
                    })?
   57         -
            }
   58         -
        };
          38  +
            /* EventStreamErrorMarshallerGenerator.kt:113 */}
          39  +
            /* EventStreamErrorMarshallerGenerator.kt:113 */crate::error::CapturePokemonEventsError::ThrottlingError(inner) =>  {
          40  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":exception-type", ::aws_smithy_types::event_stream::HeaderValue::String("throttlingError".into())));
          41  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
          42  +
                /* EventStreamMarshallerGenerator.kt:304 */crate::protocol_serde::shape_throttling_error::ser_throttling_error_error(&inner)
          43  +
                                            .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
          44  +
            /* EventStreamErrorMarshallerGenerator.kt:113 */}
          45  +
        /* EventStreamErrorMarshallerGenerator.kt:108 */}
          46  +
        /* EventStreamErrorMarshallerGenerator.kt:131 */;
   59     47   
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(
   60     48   
            headers, payload,
   61     49   
        ))
          50  +
        /* EventStreamErrorMarshallerGenerator.kt:99 */
   62     51   
    }
          52  +
    /* EventStreamErrorMarshallerGenerator.kt:93 */
   63     53   
}
   64     54   
          55  +
/* EventStreamMarshallerGenerator.kt:135 */
   65     56   
#[non_exhaustive]
   66     57   
#[derive(Debug)]
   67     58   
pub struct CapturePokemonEventsMarshaller;
   68     59   
   69     60   
impl CapturePokemonEventsMarshaller {
   70     61   
    pub fn new() -> Self {
   71     62   
        CapturePokemonEventsMarshaller
   72     63   
    }
   73     64   
}
          65  +
/* EventStreamMarshallerGenerator.kt:149 */
   74     66   
impl ::aws_smithy_eventstream::frame::MarshallMessage for CapturePokemonEventsMarshaller {
          67  +
    /* EventStreamMarshallerGenerator.kt:153 */
   75     68   
    type Input = crate::model::CapturePokemonEvents;
          69  +
    /* EventStreamMarshallerGenerator.kt:155 */
   76     70   
    fn marshall(
   77     71   
        &self,
   78     72   
        input: Self::Input,
   79     73   
    ) -> std::result::Result<
   80     74   
        ::aws_smithy_types::event_stream::Message,
   81     75   
        ::aws_smithy_eventstream::error::Error,
   82     76   
    > {
          77  +
        /* EventStreamMarshallerGenerator.kt:159 */
   83     78   
        let mut headers = Vec::new();
          79  +
        /* EventStreamMarshallerGenerator.kt:343 */
   84     80   
        headers.push(::aws_smithy_types::event_stream::Header::new(
   85     81   
            ":message-type",
   86     82   
            ::aws_smithy_types::event_stream::HeaderValue::String("event".into()),
   87     83   
        ));
          84  +
        /* EventStreamMarshallerGenerator.kt:161 */
   88     85   
        let payload = match input {
   89         -
            Self::Input::Event(inner) => {
   90         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
   91         -
                    ":event-type",
   92         -
                    ::aws_smithy_types::event_stream::HeaderValue::String("event".into()),
   93         -
                ));
   94         -
                if let Some(value) = inner.name {
   95         -
                    headers.push(::aws_smithy_types::event_stream::Header::new(
   96         -
                        "name",
   97         -
                        ::aws_smithy_types::event_stream::HeaderValue::String(value.into()),
   98         -
                    ));
   99         -
                }
  100         -
                if let Some(value) = inner.captured {
  101         -
                    headers.push(::aws_smithy_types::event_stream::Header::new(
  102         -
                        "captured",
  103         -
                        ::aws_smithy_types::event_stream::HeaderValue::Bool(value),
  104         -
                    ));
  105         -
                }
  106         -
                if let Some(value) = inner.shiny {
  107         -
                    headers.push(::aws_smithy_types::event_stream::Header::new(
  108         -
                        "shiny",
  109         -
                        ::aws_smithy_types::event_stream::HeaderValue::Bool(value),
  110         -
                    ));
  111         -
                }
  112         -
                headers.push(::aws_smithy_types::event_stream::Header::new(
  113         -
                    ":content-type",
  114         -
                    ::aws_smithy_types::event_stream::HeaderValue::String(
  115         -
                        "application/octet-stream".into(),
  116         -
                    ),
  117         -
                ));
  118         -
                if let Some(inner_payload) = inner.pokedex_update {
  119         -
                    inner_payload.into_inner()
  120         -
                } else {
  121         -
                    Vec::new()
  122         -
                }
  123         -
            }
  124         -
        };
          86  +
            /* EventStreamMarshallerGenerator.kt:172 */Self::Input::Event(inner) =>  {
          87  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("event".into())));
          88  +
                /* EventStreamMarshallerGenerator.kt:326 */if let Some(value) = inner.name {
          89  +
                    /* EventStreamMarshallerGenerator.kt:245 */headers.push(
          90  +
                        /* EventStreamMarshallerGenerator.kt:246 */::aws_smithy_types::event_stream::Header::new("name", ::aws_smithy_types::event_stream::HeaderValue::String(value.into()))
          91  +
                    /* EventStreamMarshallerGenerator.kt:245 */);
          92  +
                /* EventStreamMarshallerGenerator.kt:326 */}
          93  +
                /* EventStreamMarshallerGenerator.kt:326 */if let Some(value) = inner.captured {
          94  +
                    /* EventStreamMarshallerGenerator.kt:245 */headers.push(
          95  +
                        /* EventStreamMarshallerGenerator.kt:246 */::aws_smithy_types::event_stream::Header::new("captured", ::aws_smithy_types::event_stream::HeaderValue::Bool(value))
          96  +
                    /* EventStreamMarshallerGenerator.kt:245 */);
          97  +
                /* EventStreamMarshallerGenerator.kt:326 */}
          98  +
                /* EventStreamMarshallerGenerator.kt:326 */if let Some(value) = inner.shiny {
          99  +
                    /* EventStreamMarshallerGenerator.kt:245 */headers.push(
         100  +
                        /* EventStreamMarshallerGenerator.kt:246 */::aws_smithy_types::event_stream::Header::new("shiny", ::aws_smithy_types::event_stream::HeaderValue::Bool(value))
         101  +
                    /* EventStreamMarshallerGenerator.kt:245 */);
         102  +
                /* EventStreamMarshallerGenerator.kt:326 */}
         103  +
                /* EventStreamMarshallerGenerator.kt:343 */headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/octet-stream".into())));
         104  +
                /* EventStreamMarshallerGenerator.kt:326 */if let Some(inner_payload) = inner.pokedex_update {
         105  +
                    /* EventStreamMarshallerGenerator.kt:293 */inner_payload.into_inner()
         106  +
                /* EventStreamMarshallerGenerator.kt:326 */}
         107  +
                /* EventStreamMarshallerGenerator.kt:330 */ else  {
         108  +
                    /* EventStreamMarshallerGenerator.kt:294 */Vec::new()
         109  +
                /* EventStreamMarshallerGenerator.kt:330 */}
         110  +
            /* EventStreamMarshallerGenerator.kt:172 */}
         111  +
        /* EventStreamMarshallerGenerator.kt:161 */}
         112  +
        /* EventStreamMarshallerGenerator.kt:189 */;
  125    113   
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(
  126    114   
            headers, payload,
  127    115   
        ))
         116  +
        /* EventStreamMarshallerGenerator.kt:155 */
  128    117   
    }
         118  +
    /* EventStreamMarshallerGenerator.kt:149 */
  129    119   
}
  130    120   
         121  +
/* EventStreamUnmarshallerGenerator.kt:99 */
  131    122   
#[non_exhaustive]
  132    123   
#[derive(Debug)]
  133    124   
pub struct AttemptCapturingPokemonEventUnmarshaller;
  134    125   
  135    126   
impl AttemptCapturingPokemonEventUnmarshaller {
  136    127   
    pub fn new() -> Self {
  137    128   
        AttemptCapturingPokemonEventUnmarshaller
  138    129   
    }
  139    130   
}
         131  +
/* EventStreamUnmarshallerGenerator.kt:113 */
  140    132   
impl ::aws_smithy_eventstream::frame::UnmarshallMessage
  141    133   
    for AttemptCapturingPokemonEventUnmarshaller
  142    134   
{
         135  +
    /* EventStreamUnmarshallerGenerator.kt:117 */
  143    136   
    type Output = crate::model::AttemptCapturingPokemonEvent;
         137  +
    /* EventStreamUnmarshallerGenerator.kt:118 */
  144    138   
    type Error = crate::error::AttemptCapturingPokemonEventError;
         139  +
    /* EventStreamUnmarshallerGenerator.kt:120 */
  145    140   
    fn unmarshall(
  146    141   
        &self,
  147    142   
        message: &::aws_smithy_types::event_stream::Message,
  148    143   
    ) -> std::result::Result<
  149    144   
        ::aws_smithy_eventstream::frame::UnmarshalledMessage<Self::Output, Self::Error>,
  150    145   
        ::aws_smithy_eventstream::error::Error,
  151    146   
    > {
         147  +
        /* EventStreamUnmarshallerGenerator.kt:129 */
  152    148   
        let response_headers = ::aws_smithy_eventstream::smithy::parse_response_headers(message)?;
         149  +
        /* EventStreamUnmarshallerGenerator.kt:130 */
  153    150   
        match response_headers.message_type.as_str() {
  154         -
            "event" => match response_headers.smithy_type.as_str() {
         151  +
            /* EventStreamUnmarshallerGenerator.kt:131 */
         152  +
            "event" => {
         153  +
                /* EventStreamUnmarshallerGenerator.kt:156 */
         154  +
                match response_headers.smithy_type.as_str() {
         155  +
                    /* EventStreamUnmarshallerGenerator.kt:159 */
  155    156   
                    "event" => {
         157  +
                        /* EventStreamUnmarshallerGenerator.kt:222 */
  156    158   
                        let mut builder = crate::model::capturing_event::Builder::default();
         159  +
                        /* EventStreamUnmarshallerGenerator.kt:289 */
  157    160   
                        builder = builder.set_payload(
  158         -
                            Some(
  159         -
                                crate::protocol_serde::shape_capturing_payload::de_capturing_payload_payload(&message.payload()[..])
         161  +
                            /* EventStreamUnmarshallerGenerator.kt:290 */Some(
         162  +
                                /* EventStreamUnmarshallerGenerator.kt:318 */crate::protocol_serde::shape_capturing_payload::de_capturing_payload_payload(&message.payload()[..])
  160    163   
                                                .map_err(|err| {
  161    164   
                                                    ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall payload: {err}"))
  162    165   
                                                })?
  163         -
                            )
  164         -
                        );
         166  +
                            /* EventStreamUnmarshallerGenerator.kt:290 */)
         167  +
                        /* EventStreamUnmarshallerGenerator.kt:289 */);
         168  +
                        /* EventStreamUnmarshallerGenerator.kt:246 */
  165    169   
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
  166    170   
                            crate::model::AttemptCapturingPokemonEvent::Event(builder.build()),
  167    171   
                        ))
         172  +
                        /* EventStreamUnmarshallerGenerator.kt:159 */
  168    173   
                    }
         174  +
                    /* EventStreamUnmarshallerGenerator.kt:163 */
  169    175   
                    _unknown_variant => {
         176  +
                        /* EventStreamUnmarshallerGenerator.kt:173 */
  170    177   
                        return Err(::aws_smithy_eventstream::error::Error::unmarshalling(
  171    178   
                            format!("unrecognized :event-type: {_unknown_variant}"),
  172    179   
                        ));
         180  +
                        /* EventStreamUnmarshallerGenerator.kt:163 */
         181  +
                    } /* EventStreamUnmarshallerGenerator.kt:156 */
  173    182   
                }
  174         -
            },
         183  +
                /* EventStreamUnmarshallerGenerator.kt:131 */
         184  +
            }
         185  +
            /* EventStreamUnmarshallerGenerator.kt:134 */
  175    186   
            "exception" => {
  176         -
                if response_headers.smithy_type.as_str() == "masterball_unsuccessful" {
         187  +
                /* EventStreamUnmarshallerGenerator.kt:357 */
         188  +
                if response_headers.smithy_type.as_str() ==
         189  +
                /* EventStreamUnmarshallerGenerator.kt:359 */"masterball_unsuccessful"
         190  +
                {
         191  +
                    /* EventStreamUnmarshallerGenerator.kt:407 */
  177    192   
                    let mut builder = crate::error::master_ball_unsuccessful::Builder::default();
         193  +
                    /* EventStreamUnmarshallerGenerator.kt:409 */
  178    194   
                    builder = crate::protocol_serde::shape_master_ball_unsuccessful::de_master_ball_unsuccessful_json_err(&message.payload()[..], builder)
  179    195   
                                                            .map_err(|err| {
  180    196   
                                                                ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall masterball_unsuccessful: {err}"))
  181    197   
                                                            })?;
         198  +
                    /* EventStreamUnmarshallerGenerator.kt:420 */
  182    199   
                    return Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
  183    200   
                        crate::error::AttemptCapturingPokemonEventError::MasterBallUnsuccessful(
  184    201   
                            builder.build(),
  185    202   
                        ),
  186    203   
                    ));
         204  +
                    /* EventStreamUnmarshallerGenerator.kt:359 */
  187    205   
                }
         206  +
                /* EventStreamUnmarshallerGenerator.kt:446 */
  188    207   
                return Err(aws_smithy_eventstream::error::Error::unmarshalling(
  189    208   
                    format!(
  190    209   
                        "unrecognized exception: {}",
  191    210   
                        response_headers.smithy_type.as_str()
  192    211   
                    ),
  193    212   
                ));
         213  +
                /* EventStreamUnmarshallerGenerator.kt:134 */
  194    214   
            }
         215  +
            /* EventStreamUnmarshallerGenerator.kt:137 */
  195    216   
            value => {
         217  +
                /* EventStreamUnmarshallerGenerator.kt:138 */
  196    218   
                return Err(::aws_smithy_eventstream::error::Error::unmarshalling(
  197    219   
                    format!("unrecognized :message-type: {value}"),
  198    220   
                ));
         221  +
                /* EventStreamUnmarshallerGenerator.kt:137 */
         222  +
            } /* EventStreamUnmarshallerGenerator.kt:130 */
  199    223   
        }
         224  +
        /* EventStreamUnmarshallerGenerator.kt:120 */
  200    225   
    }
  201         -
    }
         226  +
    /* EventStreamUnmarshallerGenerator.kt:113 */
  202    227   
}

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

@@ -1,1 +618,948 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// A request to access Pokémon storage.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */A request to access Pokémon storage.
           4  +
/* RustType.kt:534 */
    4      5   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::hash::Hash)]
    5         -
pub struct GetStorageInput {
           6  +
pub /* StructureGenerator.kt:201 */ struct GetStorageInput {
           7  +
    /* StructureGenerator.kt:231 */
    6      8   
    #[allow(missing_docs)] // documentation missing in model
    7      9   
    pub user: ::std::string::String,
          10  +
    /* StructureGenerator.kt:231 */
    8     11   
    #[allow(missing_docs)] // documentation missing in model
    9     12   
    pub passcode: ::std::string::String,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* StructureGenerator.kt:135 */
   11     16   
impl GetStorageInput {
          17  +
    /* StructureGenerator.kt:231 */
   12     18   
    #[allow(missing_docs)] // documentation missing in model
          19  +
                           /* StructureGenerator.kt:166 */
   13     20   
    pub fn user(&self) -> &str {
          21  +
        /* StructureGenerator.kt:171 */
   14     22   
        use std::ops::Deref;
   15     23   
        self.user.deref()
          24  +
        /* StructureGenerator.kt:166 */
   16     25   
    }
          26  +
    /* StructureGenerator.kt:231 */
   17     27   
    #[allow(missing_docs)] // documentation missing in model
          28  +
                           /* StructureGenerator.kt:166 */
   18     29   
    pub fn passcode(&self) -> &str {
          30  +
        /* StructureGenerator.kt:171 */
   19     31   
        use std::ops::Deref;
   20     32   
        self.passcode.deref()
          33  +
        /* StructureGenerator.kt:166 */
   21     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   22     36   
}
          37  +
/* StructureGenerator.kt:101 */
   23     38   
impl ::std::fmt::Debug for GetStorageInput {
          39  +
    /* StructureGenerator.kt:105 */
   24     40   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          41  +
        /* StructureGenerator.kt:106 */
   25     42   
        let mut formatter = f.debug_struct("GetStorageInput");
          43  +
        /* StructureGenerator.kt:121 */
   26     44   
        formatter.field("user", &"*** Sensitive Data Redacted ***");
          45  +
        /* StructureGenerator.kt:121 */
   27     46   
        formatter.field("passcode", &"*** Sensitive Data Redacted ***");
          47  +
        /* StructureGenerator.kt:126 */
   28     48   
        formatter.finish()
          49  +
        /* StructureGenerator.kt:105 */
   29     50   
    }
          51  +
    /* StructureGenerator.kt:101 */
   30     52   
}
          53  +
/* ServerCodegenVisitor.kt:356 */
   31     54   
impl GetStorageInput {
   32         -
    /// Creates a new builder-style object to manufacture [`GetStorageInput`](crate::input::GetStorageInput).
          55  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetStorageInput`](crate::input::GetStorageInput).
          56  +
    /* ServerBuilderGenerator.kt:295 */
   33     57   
    pub fn builder() -> crate::input::get_storage_input::Builder {
          58  +
        /* ServerBuilderGenerator.kt:296 */
   34     59   
        crate::input::get_storage_input::Builder::default()
          60  +
        /* ServerBuilderGenerator.kt:295 */
   35     61   
    }
          62  +
    /* ServerCodegenVisitor.kt:356 */
   36     63   
}
          64  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   37     65   
impl crate::constrained::Constrained for crate::input::GetStorageInput {
   38     66   
    type Unconstrained = crate::input::get_storage_input::Builder;
   39     67   
}
   40     68   
          69  +
/* StructureGenerator.kt:197 */
   41     70   
#[allow(missing_docs)] // documentation missing in model
          71  +
/* RustType.kt:534 */
   42     72   
#[derive(
   43     73   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   44     74   
)]
   45         -
pub struct GetPokemonSpeciesInput {
          75  +
pub /* StructureGenerator.kt:201 */ struct GetPokemonSpeciesInput {
          76  +
    /* StructureGenerator.kt:231 */
   46     77   
    #[allow(missing_docs)] // documentation missing in model
   47     78   
    pub name: ::std::string::String,
          79  +
    /* StructureGenerator.kt:201 */
   48     80   
}
          81  +
/* StructureGenerator.kt:135 */
   49     82   
impl GetPokemonSpeciesInput {
          83  +
    /* StructureGenerator.kt:231 */
   50     84   
    #[allow(missing_docs)] // documentation missing in model
          85  +
                           /* StructureGenerator.kt:166 */
   51     86   
    pub fn name(&self) -> &str {
          87  +
        /* StructureGenerator.kt:171 */
   52     88   
        use std::ops::Deref;
   53     89   
        self.name.deref()
          90  +
        /* StructureGenerator.kt:166 */
   54     91   
    }
          92  +
    /* StructureGenerator.kt:135 */
   55     93   
}
          94  +
/* ServerCodegenVisitor.kt:356 */
   56     95   
impl GetPokemonSpeciesInput {
   57         -
    /// Creates a new builder-style object to manufacture [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
          96  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
          97  +
    /* ServerBuilderGenerator.kt:295 */
   58     98   
    pub fn builder() -> crate::input::get_pokemon_species_input::Builder {
          99  +
        /* ServerBuilderGenerator.kt:296 */
   59    100   
        crate::input::get_pokemon_species_input::Builder::default()
         101  +
        /* ServerBuilderGenerator.kt:295 */
   60    102   
    }
         103  +
    /* ServerCodegenVisitor.kt:356 */
   61    104   
}
         105  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   62    106   
impl crate::constrained::Constrained for crate::input::GetPokemonSpeciesInput {
   63    107   
    type Unconstrained = crate::input::get_pokemon_species_input::Builder;
   64    108   
}
   65    109   
         110  +
/* StructureGenerator.kt:197 */
   66    111   
#[allow(missing_docs)] // documentation missing in model
         112  +
/* RustType.kt:534 */
   67    113   
#[derive(
   68    114   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   69    115   
)]
   70         -
pub struct StreamPokemonRadioInput {}
         116  +
pub /* StructureGenerator.kt:201 */ struct StreamPokemonRadioInput {/* StructureGenerator.kt:201 */}
         117  +
/* ServerCodegenVisitor.kt:356 */
   71    118   
impl StreamPokemonRadioInput {
   72         -
    /// Creates a new builder-style object to manufacture [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         119  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         120  +
    /* ServerBuilderGenerator.kt:295 */
   73    121   
    pub fn builder() -> crate::input::stream_pokemon_radio_input::Builder {
         122  +
        /* ServerBuilderGenerator.kt:296 */
   74    123   
        crate::input::stream_pokemon_radio_input::Builder::default()
         124  +
        /* ServerBuilderGenerator.kt:295 */
   75    125   
    }
         126  +
    /* ServerCodegenVisitor.kt:356 */
   76    127   
}
         128  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   77    129   
impl crate::constrained::Constrained for crate::input::StreamPokemonRadioInput {
   78    130   
    type Unconstrained = crate::input::stream_pokemon_radio_input::Builder;
   79    131   
}
   80    132   
         133  +
/* StructureGenerator.kt:197 */
   81    134   
#[allow(missing_docs)] // documentation missing in model
         135  +
/* RustType.kt:534 */
   82    136   
#[derive(
   83    137   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   84    138   
)]
   85         -
pub struct CheckHealthInput {}
         139  +
pub /* StructureGenerator.kt:201 */ struct CheckHealthInput {/* StructureGenerator.kt:201 */}
         140  +
/* ServerCodegenVisitor.kt:356 */
   86    141   
impl CheckHealthInput {
   87         -
    /// Creates a new builder-style object to manufacture [`CheckHealthInput`](crate::input::CheckHealthInput).
         142  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CheckHealthInput`](crate::input::CheckHealthInput).
         143  +
    /* ServerBuilderGenerator.kt:295 */
   88    144   
    pub fn builder() -> crate::input::check_health_input::Builder {
         145  +
        /* ServerBuilderGenerator.kt:296 */
   89    146   
        crate::input::check_health_input::Builder::default()
         147  +
        /* ServerBuilderGenerator.kt:295 */
   90    148   
    }
         149  +
    /* ServerCodegenVisitor.kt:356 */
   91    150   
}
         151  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   92    152   
impl crate::constrained::Constrained for crate::input::CheckHealthInput {
   93    153   
    type Unconstrained = crate::input::check_health_input::Builder;
   94    154   
}
   95    155   
         156  +
/* StructureGenerator.kt:197 */
   96    157   
#[allow(missing_docs)] // documentation missing in model
         158  +
/* RustType.kt:534 */
   97    159   
#[derive(::std::fmt::Debug)]
   98         -
pub struct CapturePokemonInput {
         160  +
pub /* StructureGenerator.kt:201 */ struct CapturePokemonInput {
         161  +
    /* StructureGenerator.kt:231 */
   99    162   
    #[allow(missing_docs)] // documentation missing in model
  100    163   
    pub events: ::aws_smithy_http::event_stream::Receiver<
  101    164   
        crate::model::AttemptCapturingPokemonEvent,
  102    165   
        crate::error::AttemptCapturingPokemonEventError,
  103    166   
    >,
         167  +
    /* StructureGenerator.kt:231 */
  104    168   
    #[allow(missing_docs)] // documentation missing in model
  105    169   
    pub region: ::std::string::String,
         170  +
    /* StructureGenerator.kt:201 */
  106    171   
}
         172  +
/* StructureGenerator.kt:135 */
  107    173   
impl CapturePokemonInput {
         174  +
    /* StructureGenerator.kt:231 */
  108    175   
    #[allow(missing_docs)] // documentation missing in model
         176  +
                           /* StructureGenerator.kt:166 */
  109    177   
    pub fn events(
  110    178   
        &self,
  111    179   
    ) -> &::aws_smithy_http::event_stream::Receiver<
  112    180   
        crate::model::AttemptCapturingPokemonEvent,
  113    181   
        crate::error::AttemptCapturingPokemonEventError,
  114    182   
    > {
         183  +
        /* StructureGenerator.kt:172 */
  115    184   
        &self.events
         185  +
        /* StructureGenerator.kt:166 */
  116    186   
    }
         187  +
    /* StructureGenerator.kt:231 */
  117    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* StructureGenerator.kt:166 */
  118    190   
    pub fn region(&self) -> &str {
         191  +
        /* StructureGenerator.kt:171 */
  119    192   
        use std::ops::Deref;
  120    193   
        self.region.deref()
         194  +
        /* StructureGenerator.kt:166 */
  121    195   
    }
         196  +
    /* StructureGenerator.kt:135 */
  122    197   
}
         198  +
/* ServerCodegenVisitor.kt:356 */
  123    199   
impl CapturePokemonInput {
  124         -
    /// Creates a new builder-style object to manufacture [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         200  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         201  +
    /* ServerBuilderGenerator.kt:295 */
  125    202   
    pub fn builder() -> crate::input::capture_pokemon_input::Builder {
         203  +
        /* ServerBuilderGenerator.kt:296 */
  126    204   
        crate::input::capture_pokemon_input::Builder::default()
         205  +
        /* ServerBuilderGenerator.kt:295 */
  127    206   
    }
         207  +
    /* ServerCodegenVisitor.kt:356 */
  128    208   
}
         209  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  129    210   
impl crate::constrained::Constrained for crate::input::CapturePokemonInput {
  130    211   
    type Unconstrained = crate::input::capture_pokemon_input::Builder;
  131    212   
}
  132    213   
         214  +
/* StructureGenerator.kt:197 */
  133    215   
#[allow(missing_docs)] // documentation missing in model
         216  +
/* RustType.kt:534 */
  134    217   
#[derive(
  135    218   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  136    219   
)]
  137         -
pub struct DoNothingInput {}
         220  +
pub /* StructureGenerator.kt:201 */ struct DoNothingInput {/* StructureGenerator.kt:201 */}
         221  +
/* ServerCodegenVisitor.kt:356 */
  138    222   
impl DoNothingInput {
  139         -
    /// Creates a new builder-style object to manufacture [`DoNothingInput`](crate::input::DoNothingInput).
         223  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`DoNothingInput`](crate::input::DoNothingInput).
         224  +
    /* ServerBuilderGenerator.kt:295 */
  140    225   
    pub fn builder() -> crate::input::do_nothing_input::Builder {
         226  +
        /* ServerBuilderGenerator.kt:296 */
  141    227   
        crate::input::do_nothing_input::Builder::default()
         228  +
        /* ServerBuilderGenerator.kt:295 */
  142    229   
    }
         230  +
    /* ServerCodegenVisitor.kt:356 */
  143    231   
}
         232  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  144    233   
impl crate::constrained::Constrained for crate::input::DoNothingInput {
  145    234   
    type Unconstrained = crate::input::do_nothing_input::Builder;
  146    235   
}
  147    236   
         237  +
/* StructureGenerator.kt:197 */
  148    238   
#[allow(missing_docs)] // documentation missing in model
         239  +
/* RustType.kt:534 */
  149    240   
#[derive(
  150    241   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  151    242   
)]
  152         -
pub struct GetServerStatisticsInput {}
         243  +
pub /* StructureGenerator.kt:201 */ struct GetServerStatisticsInput {/* StructureGenerator.kt:201 */}
         244  +
/* ServerCodegenVisitor.kt:356 */
  153    245   
impl GetServerStatisticsInput {
  154         -
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         246  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         247  +
    /* ServerBuilderGenerator.kt:295 */
  155    248   
    pub fn builder() -> crate::input::get_server_statistics_input::Builder {
         249  +
        /* ServerBuilderGenerator.kt:296 */
  156    250   
        crate::input::get_server_statistics_input::Builder::default()
         251  +
        /* ServerBuilderGenerator.kt:295 */
  157    252   
    }
         253  +
    /* ServerCodegenVisitor.kt:356 */
  158    254   
}
         255  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  159    256   
impl crate::constrained::Constrained for crate::input::GetServerStatisticsInput {
  160    257   
    type Unconstrained = crate::input::get_server_statistics_input::Builder;
  161    258   
}
  162         -
/// See [`GetStorageInput`](crate::input::GetStorageInput).
         259  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetStorageInput`](crate::input::GetStorageInput).
  163    260   
pub mod get_storage_input {
  164    261   
         262  +
    /* RustType.kt:534 */
  165    263   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  166         -
    /// Holds one variant for each of the ways the builder can fail.
         264  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         265  +
    /* RustType.kt:534 */
  167    266   
    #[non_exhaustive]
         267  +
    /* ServerBuilderConstraintViolations.kt:75 */
  168    268   
    #[allow(clippy::enum_variant_names)]
  169    269   
    pub enum ConstraintViolation {
  170         -
        /// `user` was not provided but it is required when building `GetStorageInput`.
         270  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`user` was not provided but it is required when building `GetStorageInput`.
         271  +
        /* ServerBuilderConstraintViolations.kt:144 */
  171    272   
        MissingUser,
  172         -
        /// `passcode` was not provided but it is required when building `GetStorageInput`.
         273  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`passcode` was not provided but it is required when building `GetStorageInput`.
         274  +
        /* ServerBuilderConstraintViolations.kt:144 */
  173    275   
        MissingPasscode,
         276  +
        /* ServerBuilderConstraintViolations.kt:75 */
  174    277   
    }
         278  +
    /* ServerBuilderConstraintViolations.kt:116 */
  175    279   
    impl ::std::fmt::Display for ConstraintViolation {
         280  +
        /* ServerBuilderConstraintViolations.kt:117 */
  176    281   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         282  +
            /* ServerBuilderConstraintViolations.kt:118 */
  177    283   
            match self {
  178         -
                ConstraintViolation::MissingUser => write!(f, "`user` was not provided but it is required when building `GetStorageInput`"),
  179         -
                ConstraintViolation::MissingPasscode => write!(f, "`passcode` was not provided but it is required when building `GetStorageInput`"),
  180         -
            }
         284  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingUser => write!(f, "`user` was not provided but it is required when building `GetStorageInput`"),
         285  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPasscode => write!(f, "`passcode` was not provided but it is required when building `GetStorageInput`"),
         286  +
            /* ServerBuilderConstraintViolations.kt:118 */}
         287  +
            /* ServerBuilderConstraintViolations.kt:117 */
  181    288   
        }
         289  +
        /* ServerBuilderConstraintViolations.kt:116 */
  182    290   
    }
         291  +
    /* ServerBuilderConstraintViolations.kt:83 */
  183    292   
    impl ::std::error::Error for ConstraintViolation {}
         293  +
    /* ServerBuilderConstraintViolations.kt:172 */
  184    294   
    impl ConstraintViolation {
  185    295   
        pub(crate) fn as_validation_exception_field(
  186    296   
            self,
  187    297   
            path: ::std::string::String,
  188    298   
        ) -> crate::model::ValidationExceptionField {
  189    299   
            match self {
  190    300   
            ConstraintViolation::MissingUser => crate::model::ValidationExceptionField {
  191    301   
                                                message: format!("Value at '{}/user' failed to satisfy constraint: Member must not be null", path),
  192    302   
                                                path: path + "/user",
  193    303   
                                            },
  194    304   
            ConstraintViolation::MissingPasscode => crate::model::ValidationExceptionField {
  195    305   
                                                message: format!("Value at '{}/passcode' failed to satisfy constraint: Member must not be null", path),
  196    306   
                                                path: path + "/passcode",
  197    307   
                                            },
  198    308   
        }
  199    309   
        }
  200    310   
    }
         311  +
    /* ServerBuilderGenerator.kt:234 */
  201    312   
    impl ::std::convert::From<ConstraintViolation>
  202    313   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  203    314   
    {
  204    315   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  205    316   
            let first_validation_exception_field =
  206    317   
                constraint_violation.as_validation_exception_field("".to_owned());
  207    318   
            let validation_exception = crate::error::ValidationException {
  208    319   
                message: format!(
  209    320   
                    "1 validation error detected. {}",
  210    321   
                    &first_validation_exception_field.message
  211    322   
                ),
  212    323   
                field_list: Some(vec![first_validation_exception_field]),
  213    324   
            };
  214    325   
            Self::ConstraintViolation(
  215    326   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  216    327   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  217    328   
                            )
  218    329   
        }
  219    330   
    }
         331  +
    /* ServerBuilderGenerator.kt:244 */
  220    332   
    impl ::std::convert::From<Builder>
  221    333   
        for crate::constrained::MaybeConstrained<crate::input::GetStorageInput>
  222    334   
    {
  223    335   
        fn from(builder: Builder) -> Self {
  224    336   
            Self::Unconstrained(builder)
  225    337   
        }
  226    338   
    }
         339  +
    /* ServerBuilderGenerator.kt:446 */
  227    340   
    impl ::std::convert::TryFrom<Builder> for crate::input::GetStorageInput {
  228    341   
        type Error = ConstraintViolation;
  229    342   
  230    343   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  231    344   
            builder.build()
  232    345   
        }
  233    346   
    }
  234         -
    /// A builder for [`GetStorageInput`](crate::input::GetStorageInput).
         347  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetStorageInput`](crate::input::GetStorageInput).
         348  +
    /* RustType.kt:534 */
  235    349   
    #[derive(::std::clone::Clone, ::std::default::Default)]
         350  +
    /* ServerBuilderGenerator.kt:211 */
  236    351   
    pub struct Builder {
         352  +
        /* ServerBuilderGenerator.kt:308 */
  237    353   
        pub(crate) user: ::std::option::Option<::std::string::String>,
         354  +
        /* ServerBuilderGenerator.kt:308 */
  238    355   
        pub(crate) passcode: ::std::option::Option<::std::string::String>,
         356  +
        /* ServerBuilderGenerator.kt:211 */
  239    357   
    }
         358  +
    /* ServerBuilderGenerator.kt:215 */
  240    359   
    impl Builder {
         360  +
        /* ServerBuilderGenerator.kt:331 */
  241    361   
        #[allow(missing_docs)] // documentation missing in model
         362  +
                               /* ServerBuilderGenerator.kt:343 */
  242    363   
        pub fn user(mut self, input: ::std::string::String) -> Self {
  243         -
            self.user = Some(input);
         364  +
            /* ServerBuilderGenerator.kt:344 */
         365  +
            self.user =
         366  +
                /* ServerBuilderGenerator.kt:345 */Some(
         367  +
                    /* ServerBuilderGenerator.kt:376 */input
         368  +
                /* ServerBuilderGenerator.kt:345 */)
         369  +
            /* ServerBuilderGenerator.kt:344 */;
  244    370   
            self
         371  +
            /* ServerBuilderGenerator.kt:343 */
  245    372   
        }
         373  +
        /* ServerBuilderGenerator.kt:426 */
  246    374   
        #[allow(missing_docs)] // documentation missing in model
         375  +
                               /* ServerBuilderGenerator.kt:428 */
  247    376   
        pub(crate) fn set_user(
  248    377   
            mut self,
  249    378   
            input: impl ::std::convert::Into<::std::string::String>,
  250    379   
        ) -> Self {
         380  +
            /* ServerBuilderGenerator.kt:429 */
  251    381   
            self.user = Some(input.into());
  252    382   
            self
         383  +
            /* ServerBuilderGenerator.kt:428 */
  253    384   
        }
         385  +
        /* ServerBuilderGenerator.kt:331 */
  254    386   
        #[allow(missing_docs)] // documentation missing in model
         387  +
                               /* ServerBuilderGenerator.kt:343 */
  255    388   
        pub fn passcode(mut self, input: ::std::string::String) -> Self {
  256         -
            self.passcode = Some(input);
         389  +
            /* ServerBuilderGenerator.kt:344 */
         390  +
            self.passcode =
         391  +
                /* ServerBuilderGenerator.kt:345 */Some(
         392  +
                    /* ServerBuilderGenerator.kt:376 */input
         393  +
                /* ServerBuilderGenerator.kt:345 */)
         394  +
            /* ServerBuilderGenerator.kt:344 */;
  257    395   
            self
         396  +
            /* ServerBuilderGenerator.kt:343 */
  258    397   
        }
         398  +
        /* ServerBuilderGenerator.kt:426 */
  259    399   
        #[allow(missing_docs)] // documentation missing in model
         400  +
                               /* ServerBuilderGenerator.kt:428 */
  260    401   
        pub(crate) fn set_passcode(
  261    402   
            mut self,
  262    403   
            input: impl ::std::convert::Into<::std::string::String>,
  263    404   
        ) -> Self {
         405  +
            /* ServerBuilderGenerator.kt:429 */
  264    406   
            self.passcode = Some(input.into());
  265    407   
            self
         408  +
            /* ServerBuilderGenerator.kt:428 */
  266    409   
        }
  267         -
        /// Consumes the builder and constructs a [`GetStorageInput`](crate::input::GetStorageInput).
  268         -
        ///
         410  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetStorageInput`](crate::input::GetStorageInput).
         411  +
        /// /* ServerBuilderGenerator.kt:260 */
  269    412   
        /// The builder fails to construct a [`GetStorageInput`](crate::input::GetStorageInput) if a [`ConstraintViolation`] occurs.
  270    413   
        ///
  271         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         414  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         415  +
        /* ServerBuilderGenerator.kt:271 */
  272    416   
        pub fn build(self) -> Result<crate::input::GetStorageInput, ConstraintViolation> {
  273    417   
            self.build_enforcing_all_constraints()
  274    418   
        }
         419  +
        /* ServerBuilderGenerator.kt:283 */
  275    420   
        fn build_enforcing_all_constraints(
  276    421   
            self,
  277    422   
        ) -> Result<crate::input::GetStorageInput, ConstraintViolation> {
  278         -
            Ok(crate::input::GetStorageInput {
  279         -
                user: self.user.ok_or(ConstraintViolation::MissingUser)?,
  280         -
                passcode: self.passcode.ok_or(ConstraintViolation::MissingPasscode)?,
  281         -
            })
         423  +
            /* ServerBuilderGenerator.kt:287 */
         424  +
            Ok(
         425  +
                /* ServerBuilderGenerator.kt:542 */
         426  +
                crate::input::GetStorageInput {
         427  +
                    /* ServerBuilderGenerator.kt:546 */
         428  +
                    user: self
         429  +
                        .user
         430  +
                        /* ServerBuilderGenerator.kt:569 */
         431  +
                        .ok_or(ConstraintViolation::MissingUser)?,
         432  +
                    /* ServerBuilderGenerator.kt:546 */
         433  +
                    passcode: self
         434  +
                        .passcode
         435  +
                        /* ServerBuilderGenerator.kt:569 */
         436  +
                        .ok_or(ConstraintViolation::MissingPasscode)?,
         437  +
                    /* ServerBuilderGenerator.kt:542 */
         438  +
                }, /* ServerBuilderGenerator.kt:287 */
         439  +
            )
         440  +
            /* ServerBuilderGenerator.kt:283 */
  282    441   
        }
         442  +
        /* ServerBuilderGenerator.kt:215 */
  283    443   
    }
         444  +
    /* ServerBuilderGenerator.kt:474 */
  284    445   
    impl ::std::fmt::Debug for Builder {
         446  +
        /* ServerBuilderGenerator.kt:475 */
  285    447   
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         448  +
            /* ServerBuilderGenerator.kt:476 */
  286    449   
            let mut formatter = f.debug_struct("Builder");
         450  +
            /* ServerBuilderGenerator.kt:481 */
  287    451   
            formatter.field("user", &self.user);
         452  +
            /* ServerBuilderGenerator.kt:481 */
  288    453   
            formatter.field("passcode", &self.passcode);
         454  +
            /* ServerBuilderGenerator.kt:485 */
  289    455   
            formatter.finish()
         456  +
            /* ServerBuilderGenerator.kt:475 */
  290    457   
        }
         458  +
        /* ServerBuilderGenerator.kt:474 */
  291    459   
    }
         460  +
         461  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  292    462   
}
  293         -
/// See [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
         463  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
  294    464   
pub mod get_pokemon_species_input {
  295    465   
         466  +
    /* RustType.kt:534 */
  296    467   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  297         -
    /// Holds one variant for each of the ways the builder can fail.
         468  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         469  +
    /* RustType.kt:534 */
  298    470   
    #[non_exhaustive]
         471  +
    /* ServerBuilderConstraintViolations.kt:75 */
  299    472   
    #[allow(clippy::enum_variant_names)]
  300    473   
    pub enum ConstraintViolation {
  301         -
        /// `name` was not provided but it is required when building `GetPokemonSpeciesInput`.
         474  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`name` was not provided but it is required when building `GetPokemonSpeciesInput`.
         475  +
        /* ServerBuilderConstraintViolations.kt:144 */
  302    476   
        MissingName,
         477  +
        /* ServerBuilderConstraintViolations.kt:75 */
  303    478   
    }
         479  +
    /* ServerBuilderConstraintViolations.kt:116 */
  304    480   
    impl ::std::fmt::Display for ConstraintViolation {
         481  +
        /* ServerBuilderConstraintViolations.kt:117 */
  305    482   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         483  +
            /* ServerBuilderConstraintViolations.kt:118 */
  306    484   
            match self {
  307         -
                ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesInput`"),
  308         -
            }
         485  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesInput`"),
         486  +
            /* ServerBuilderConstraintViolations.kt:118 */}
         487  +
            /* ServerBuilderConstraintViolations.kt:117 */
  309    488   
        }
         489  +
        /* ServerBuilderConstraintViolations.kt:116 */
  310    490   
    }
         491  +
    /* ServerBuilderConstraintViolations.kt:83 */
  311    492   
    impl ::std::error::Error for ConstraintViolation {}
         493  +
    /* ServerBuilderConstraintViolations.kt:172 */
  312    494   
    impl ConstraintViolation {
  313    495   
        pub(crate) fn as_validation_exception_field(
  314    496   
            self,
  315    497   
            path: ::std::string::String,
  316    498   
        ) -> crate::model::ValidationExceptionField {
  317    499   
            match self {
  318    500   
                ConstraintViolation::MissingName => crate::model::ValidationExceptionField {
  319    501   
                    message: format!(
  320    502   
                        "Value at '{}/name' failed to satisfy constraint: Member must not be null",
  321    503   
                        path
  322    504   
                    ),
  323    505   
                    path: path + "/name",
  324    506   
                },
  325    507   
            }
  326    508   
        }
  327    509   
    }
         510  +
    /* ServerBuilderGenerator.kt:234 */
  328    511   
    impl ::std::convert::From<ConstraintViolation>
  329    512   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  330    513   
    {
  331    514   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  332    515   
            let first_validation_exception_field =
  333    516   
                constraint_violation.as_validation_exception_field("".to_owned());
  334    517   
            let validation_exception = crate::error::ValidationException {
  335    518   
                message: format!(
  336    519   
                    "1 validation error detected. {}",
  337    520   
                    &first_validation_exception_field.message
  338    521   
                ),
  339    522   
                field_list: Some(vec![first_validation_exception_field]),
  340    523   
            };
  341    524   
            Self::ConstraintViolation(
  342    525   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  343    526   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  344    527   
                            )
  345    528   
        }
  346    529   
    }
         530  +
    /* ServerBuilderGenerator.kt:244 */
  347    531   
    impl ::std::convert::From<Builder>
  348    532   
        for crate::constrained::MaybeConstrained<crate::input::GetPokemonSpeciesInput>
  349    533   
    {
  350    534   
        fn from(builder: Builder) -> Self {
  351    535   
            Self::Unconstrained(builder)
  352    536   
        }
  353    537   
    }
         538  +
    /* ServerBuilderGenerator.kt:446 */
  354    539   
    impl ::std::convert::TryFrom<Builder> for crate::input::GetPokemonSpeciesInput {
  355    540   
        type Error = ConstraintViolation;
  356    541   
  357    542   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  358    543   
            builder.build()
  359    544   
        }
  360    545   
    }
  361         -
    /// A builder for [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
         546  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
         547  +
    /* RustType.kt:534 */
  362    548   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         549  +
    /* ServerBuilderGenerator.kt:211 */
  363    550   
    pub struct Builder {
         551  +
        /* ServerBuilderGenerator.kt:308 */
  364    552   
        pub(crate) name: ::std::option::Option<::std::string::String>,
         553  +
        /* ServerBuilderGenerator.kt:211 */
  365    554   
    }
         555  +
    /* ServerBuilderGenerator.kt:215 */
  366    556   
    impl Builder {
         557  +
        /* ServerBuilderGenerator.kt:331 */
  367    558   
        #[allow(missing_docs)] // documentation missing in model
         559  +
                               /* ServerBuilderGenerator.kt:343 */
  368    560   
        pub fn name(mut self, input: ::std::string::String) -> Self {
  369         -
            self.name = Some(input);
         561  +
            /* ServerBuilderGenerator.kt:344 */
         562  +
            self.name =
         563  +
                /* ServerBuilderGenerator.kt:345 */Some(
         564  +
                    /* ServerBuilderGenerator.kt:376 */input
         565  +
                /* ServerBuilderGenerator.kt:345 */)
         566  +
            /* ServerBuilderGenerator.kt:344 */;
  370    567   
            self
         568  +
            /* ServerBuilderGenerator.kt:343 */
  371    569   
        }
         570  +
        /* ServerBuilderGenerator.kt:426 */
  372    571   
        #[allow(missing_docs)] // documentation missing in model
         572  +
                               /* ServerBuilderGenerator.kt:428 */
  373    573   
        pub(crate) fn set_name(
  374    574   
            mut self,
  375    575   
            input: impl ::std::convert::Into<::std::string::String>,
  376    576   
        ) -> Self {
         577  +
            /* ServerBuilderGenerator.kt:429 */
  377    578   
            self.name = Some(input.into());
  378    579   
            self
         580  +
            /* ServerBuilderGenerator.kt:428 */
  379    581   
        }
  380         -
        /// Consumes the builder and constructs a [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
  381         -
        ///
         582  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput).
         583  +
        /// /* ServerBuilderGenerator.kt:260 */
  382    584   
        /// The builder fails to construct a [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) if a [`ConstraintViolation`] occurs.
  383    585   
        ///
         586  +
        /* ServerBuilderGenerator.kt:271 */
  384    587   
        pub fn build(self) -> Result<crate::input::GetPokemonSpeciesInput, ConstraintViolation> {
  385    588   
            self.build_enforcing_all_constraints()
  386    589   
        }
         590  +
        /* ServerBuilderGenerator.kt:283 */
  387    591   
        fn build_enforcing_all_constraints(
  388    592   
            self,
  389    593   
        ) -> Result<crate::input::GetPokemonSpeciesInput, ConstraintViolation> {
  390         -
            Ok(crate::input::GetPokemonSpeciesInput {
  391         -
                name: self.name.ok_or(ConstraintViolation::MissingName)?,
  392         -
            })
         594  +
            /* ServerBuilderGenerator.kt:287 */
         595  +
            Ok(
         596  +
                /* ServerBuilderGenerator.kt:542 */
         597  +
                crate::input::GetPokemonSpeciesInput {
         598  +
                    /* ServerBuilderGenerator.kt:546 */
         599  +
                    name: self
         600  +
                        .name
         601  +
                        /* ServerBuilderGenerator.kt:569 */
         602  +
                        .ok_or(ConstraintViolation::MissingName)?,
         603  +
                    /* ServerBuilderGenerator.kt:542 */
         604  +
                }, /* ServerBuilderGenerator.kt:287 */
         605  +
            )
         606  +
            /* ServerBuilderGenerator.kt:283 */
  393    607   
        }
         608  +
        /* ServerBuilderGenerator.kt:215 */
  394    609   
    }
         610  +
         611  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  395    612   
}
  396         -
/// See [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         613  +
/// /* ServerBuilderGenerator.kt:171 */See [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
  397    614   
pub mod stream_pokemon_radio_input {
  398    615   
         616  +
    /* ServerBuilderGenerator.kt:461 */
  399    617   
    impl ::std::convert::From<Builder> for crate::input::StreamPokemonRadioInput {
  400    618   
        fn from(builder: Builder) -> Self {
  401    619   
            builder.build()
  402    620   
        }
  403    621   
    }
  404         -
    /// A builder for [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         622  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         623  +
    /* RustType.kt:534 */
  405    624   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  406         -
    pub struct Builder {}
         625  +
    /* ServerBuilderGenerator.kt:211 */
         626  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         627  +
    /* ServerBuilderGenerator.kt:215 */
  407    628   
    impl Builder {
  408         -
        /// Consumes the builder and constructs a [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         629  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput).
         630  +
        /* ServerBuilderGenerator.kt:271 */
  409    631   
        pub fn build(self) -> crate::input::StreamPokemonRadioInput {
  410    632   
            self.build_enforcing_all_constraints()
  411    633   
        }
         634  +
        /* ServerBuilderGenerator.kt:283 */
  412    635   
        fn build_enforcing_all_constraints(self) -> crate::input::StreamPokemonRadioInput {
  413         -
            crate::input::StreamPokemonRadioInput {}
         636  +
            /* ServerBuilderGenerator.kt:542 */
         637  +
            crate::input::StreamPokemonRadioInput {
         638  +
            /* ServerBuilderGenerator.kt:542 */}
         639  +
            /* ServerBuilderGenerator.kt:283 */
  414    640   
        }
         641  +
        /* ServerBuilderGenerator.kt:215 */
  415    642   
    }
         643  +
         644  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  416    645   
}
  417         -
/// See [`CheckHealthInput`](crate::input::CheckHealthInput).
         646  +
/// /* ServerBuilderGenerator.kt:171 */See [`CheckHealthInput`](crate::input::CheckHealthInput).
  418    647   
pub mod check_health_input {
  419    648   
         649  +
    /* ServerBuilderGenerator.kt:461 */
  420    650   
    impl ::std::convert::From<Builder> for crate::input::CheckHealthInput {
  421    651   
        fn from(builder: Builder) -> Self {
  422    652   
            builder.build()
  423    653   
        }
  424    654   
    }
  425         -
    /// A builder for [`CheckHealthInput`](crate::input::CheckHealthInput).
         655  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CheckHealthInput`](crate::input::CheckHealthInput).
         656  +
    /* RustType.kt:534 */
  426    657   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  427         -
    pub struct Builder {}
         658  +
    /* ServerBuilderGenerator.kt:211 */
         659  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         660  +
    /* ServerBuilderGenerator.kt:215 */
  428    661   
    impl Builder {
  429         -
        /// Consumes the builder and constructs a [`CheckHealthInput`](crate::input::CheckHealthInput).
         662  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CheckHealthInput`](crate::input::CheckHealthInput).
         663  +
        /* ServerBuilderGenerator.kt:271 */
  430    664   
        pub fn build(self) -> crate::input::CheckHealthInput {
  431    665   
            self.build_enforcing_all_constraints()
  432    666   
        }
         667  +
        /* ServerBuilderGenerator.kt:283 */
  433    668   
        fn build_enforcing_all_constraints(self) -> crate::input::CheckHealthInput {
  434         -
            crate::input::CheckHealthInput {}
         669  +
            /* ServerBuilderGenerator.kt:542 */
         670  +
            crate::input::CheckHealthInput {
         671  +
            /* ServerBuilderGenerator.kt:542 */}
         672  +
            /* ServerBuilderGenerator.kt:283 */
  435    673   
        }
         674  +
        /* ServerBuilderGenerator.kt:215 */
  436    675   
    }
         676  +
         677  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  437    678   
}
  438         -
/// See [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         679  +
/// /* ServerBuilderGenerator.kt:171 */See [`CapturePokemonInput`](crate::input::CapturePokemonInput).
  439    680   
pub mod capture_pokemon_input {
  440    681   
         682  +
    /* RustType.kt:534 */
  441    683   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  442         -
    /// Holds one variant for each of the ways the builder can fail.
         684  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         685  +
    /* RustType.kt:534 */
  443    686   
    #[non_exhaustive]
         687  +
    /* ServerBuilderConstraintViolations.kt:75 */
  444    688   
    #[allow(clippy::enum_variant_names)]
  445    689   
    pub enum ConstraintViolation {
  446         -
        /// `events` was not provided but it is required when building `CapturePokemonInput`.
         690  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`events` was not provided but it is required when building `CapturePokemonInput`.
         691  +
        /* ServerBuilderConstraintViolations.kt:144 */
  447    692   
        MissingEvents,
  448         -
        /// `region` was not provided but it is required when building `CapturePokemonInput`.
         693  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`region` was not provided but it is required when building `CapturePokemonInput`.
         694  +
        /* ServerBuilderConstraintViolations.kt:144 */
  449    695   
        MissingRegion,
         696  +
        /* ServerBuilderConstraintViolations.kt:75 */
  450    697   
    }
         698  +
    /* ServerBuilderConstraintViolations.kt:116 */
  451    699   
    impl ::std::fmt::Display for ConstraintViolation {
         700  +
        /* ServerBuilderConstraintViolations.kt:117 */
  452    701   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         702  +
            /* ServerBuilderConstraintViolations.kt:118 */
  453    703   
            match self {
  454         -
                ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `CapturePokemonInput`"),
  455         -
                ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `CapturePokemonInput`"),
  456         -
            }
         704  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `CapturePokemonInput`"),
         705  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingRegion => write!(f, "`region` was not provided but it is required when building `CapturePokemonInput`"),
         706  +
            /* ServerBuilderConstraintViolations.kt:118 */}
         707  +
            /* ServerBuilderConstraintViolations.kt:117 */
  457    708   
        }
         709  +
        /* ServerBuilderConstraintViolations.kt:116 */
  458    710   
    }
         711  +
    /* ServerBuilderConstraintViolations.kt:83 */
  459    712   
    impl ::std::error::Error for ConstraintViolation {}
         713  +
    /* ServerBuilderConstraintViolations.kt:172 */
  460    714   
    impl ConstraintViolation {
  461    715   
        pub(crate) fn as_validation_exception_field(
  462    716   
            self,
  463    717   
            path: ::std::string::String,
  464    718   
        ) -> crate::model::ValidationExceptionField {
  465    719   
            match self {
  466    720   
            ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
  467    721   
                                                message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
  468    722   
                                                path: path + "/events",
  469    723   
                                            },
  470    724   
            ConstraintViolation::MissingRegion => crate::model::ValidationExceptionField {
  471    725   
                                                message: format!("Value at '{}/region' failed to satisfy constraint: Member must not be null", path),
  472    726   
                                                path: path + "/region",
  473    727   
                                            },
  474    728   
        }
  475    729   
        }
  476    730   
    }
         731  +
    /* ServerBuilderGenerator.kt:234 */
  477    732   
    impl ::std::convert::From<ConstraintViolation>
  478    733   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  479    734   
    {
  480    735   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  481    736   
            let first_validation_exception_field =
  482    737   
                constraint_violation.as_validation_exception_field("".to_owned());
  483    738   
            let validation_exception = crate::error::ValidationException {
  484    739   
                message: format!(
  485    740   
                    "1 validation error detected. {}",
  486    741   
                    &first_validation_exception_field.message
  487    742   
                ),
  488    743   
                field_list: Some(vec![first_validation_exception_field]),
  489    744   
            };
  490    745   
            Self::ConstraintViolation(
  491    746   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  492    747   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  493    748   
                            )
  494    749   
        }
  495    750   
    }
         751  +
    /* ServerBuilderGenerator.kt:244 */
  496    752   
    impl ::std::convert::From<Builder>
  497    753   
        for crate::constrained::MaybeConstrained<crate::input::CapturePokemonInput>
  498    754   
    {
  499    755   
        fn from(builder: Builder) -> Self {
  500    756   
            Self::Unconstrained(builder)
  501    757   
        }
  502    758   
    }
         759  +
    /* ServerBuilderGenerator.kt:446 */
  503    760   
    impl ::std::convert::TryFrom<Builder> for crate::input::CapturePokemonInput {
  504    761   
        type Error = ConstraintViolation;
  505    762   
  506    763   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  507    764   
            builder.build()
  508    765   
        }
  509    766   
    }
  510         -
    /// A builder for [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         767  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         768  +
    /* RustType.kt:534 */
  511    769   
    #[derive(::std::default::Default, ::std::fmt::Debug)]
         770  +
    /* ServerBuilderGenerator.kt:211 */
  512    771   
    pub struct Builder {
         772  +
        /* ServerBuilderGenerator.kt:308 */
  513    773   
        pub(crate) events: ::std::option::Option<
  514    774   
            ::aws_smithy_http::event_stream::Receiver<
  515    775   
                crate::model::AttemptCapturingPokemonEvent,
  516    776   
                crate::error::AttemptCapturingPokemonEventError,
  517    777   
            >,
  518    778   
        >,
         779  +
        /* ServerBuilderGenerator.kt:308 */
  519    780   
        pub(crate) region: ::std::option::Option<::std::string::String>,
         781  +
        /* ServerBuilderGenerator.kt:211 */
  520    782   
    }
         783  +
    /* ServerBuilderGenerator.kt:215 */
  521    784   
    impl Builder {
         785  +
        /* ServerBuilderGenerator.kt:331 */
  522    786   
        #[allow(missing_docs)] // documentation missing in model
         787  +
                               /* ServerBuilderGenerator.kt:343 */
  523    788   
        pub fn events(
  524    789   
            mut self,
  525    790   
            input: ::aws_smithy_http::event_stream::Receiver<
  526    791   
                crate::model::AttemptCapturingPokemonEvent,
  527    792   
                crate::error::AttemptCapturingPokemonEventError,
  528    793   
            >,
  529    794   
        ) -> Self {
  530         -
            self.events = Some(input);
         795  +
            /* ServerBuilderGenerator.kt:344 */
         796  +
            self.events =
         797  +
                /* ServerBuilderGenerator.kt:345 */Some(
         798  +
                    /* ServerBuilderGenerator.kt:376 */input
         799  +
                /* ServerBuilderGenerator.kt:345 */)
         800  +
            /* ServerBuilderGenerator.kt:344 */;
  531    801   
            self
         802  +
            /* ServerBuilderGenerator.kt:343 */
  532    803   
        }
         804  +
        /* ServerBuilderGenerator.kt:426 */
  533    805   
        #[allow(missing_docs)] // documentation missing in model
         806  +
                               /* ServerBuilderGenerator.kt:428 */
  534    807   
        pub(crate) fn set_events(
  535    808   
            mut self,
  536    809   
            input: impl ::std::convert::Into<
  537    810   
                ::aws_smithy_http::event_stream::Receiver<
  538    811   
                    crate::model::AttemptCapturingPokemonEvent,
  539    812   
                    crate::error::AttemptCapturingPokemonEventError,
  540    813   
                >,
  541    814   
            >,
  542    815   
        ) -> Self {
         816  +
            /* ServerBuilderGenerator.kt:429 */
  543    817   
            self.events = Some(input.into());
  544    818   
            self
         819  +
            /* ServerBuilderGenerator.kt:428 */
  545    820   
        }
         821  +
        /* ServerBuilderGenerator.kt:331 */
  546    822   
        #[allow(missing_docs)] // documentation missing in model
         823  +
                               /* ServerBuilderGenerator.kt:343 */
  547    824   
        pub fn region(mut self, input: ::std::string::String) -> Self {
  548         -
            self.region = Some(input);
         825  +
            /* ServerBuilderGenerator.kt:344 */
         826  +
            self.region =
         827  +
                /* ServerBuilderGenerator.kt:345 */Some(
         828  +
                    /* ServerBuilderGenerator.kt:376 */input
         829  +
                /* ServerBuilderGenerator.kt:345 */)
         830  +
            /* ServerBuilderGenerator.kt:344 */;
  549    831   
            self
         832  +
            /* ServerBuilderGenerator.kt:343 */
  550    833   
        }
         834  +
        /* ServerBuilderGenerator.kt:426 */
  551    835   
        #[allow(missing_docs)] // documentation missing in model
         836  +
                               /* ServerBuilderGenerator.kt:428 */
  552    837   
        pub(crate) fn set_region(
  553    838   
            mut self,
  554    839   
            input: impl ::std::convert::Into<::std::string::String>,
  555    840   
        ) -> Self {
         841  +
            /* ServerBuilderGenerator.kt:429 */
  556    842   
            self.region = Some(input.into());
  557    843   
            self
         844  +
            /* ServerBuilderGenerator.kt:428 */
  558    845   
        }
  559         -
        /// Consumes the builder and constructs a [`CapturePokemonInput`](crate::input::CapturePokemonInput).
  560         -
        ///
         846  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturePokemonInput`](crate::input::CapturePokemonInput).
         847  +
        /// /* ServerBuilderGenerator.kt:260 */
  561    848   
        /// The builder fails to construct a [`CapturePokemonInput`](crate::input::CapturePokemonInput) if a [`ConstraintViolation`] occurs.
  562    849   
        ///
  563         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         850  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         851  +
        /* ServerBuilderGenerator.kt:271 */
  564    852   
        pub fn build(self) -> Result<crate::input::CapturePokemonInput, ConstraintViolation> {
  565    853   
            self.build_enforcing_all_constraints()
  566    854   
        }
         855  +
        /* ServerBuilderGenerator.kt:283 */
  567    856   
        fn build_enforcing_all_constraints(
  568    857   
            self,
  569    858   
        ) -> Result<crate::input::CapturePokemonInput, ConstraintViolation> {
  570         -
            Ok(crate::input::CapturePokemonInput {
  571         -
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
  572         -
                region: self.region.ok_or(ConstraintViolation::MissingRegion)?,
  573         -
            })
         859  +
            /* ServerBuilderGenerator.kt:287 */
         860  +
            Ok(
         861  +
                /* ServerBuilderGenerator.kt:542 */
         862  +
                crate::input::CapturePokemonInput {
         863  +
                    /* ServerBuilderGenerator.kt:546 */
         864  +
                    events: self
         865  +
                        .events
         866  +
                        /* ServerBuilderGenerator.kt:569 */
         867  +
                        .ok_or(ConstraintViolation::MissingEvents)?,
         868  +
                    /* ServerBuilderGenerator.kt:546 */
         869  +
                    region: self
         870  +
                        .region
         871  +
                        /* ServerBuilderGenerator.kt:569 */
         872  +
                        .ok_or(ConstraintViolation::MissingRegion)?,
         873  +
                    /* ServerBuilderGenerator.kt:542 */
         874  +
                }, /* ServerBuilderGenerator.kt:287 */
         875  +
            )
         876  +
            /* ServerBuilderGenerator.kt:283 */
  574    877   
        }
         878  +
        /* ServerBuilderGenerator.kt:215 */
  575    879   
    }
         880  +
         881  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  576    882   
}
  577         -
/// See [`DoNothingInput`](crate::input::DoNothingInput).
         883  +
/// /* ServerBuilderGenerator.kt:171 */See [`DoNothingInput`](crate::input::DoNothingInput).
  578    884   
pub mod do_nothing_input {
  579    885   
         886  +
    /* ServerBuilderGenerator.kt:461 */
  580    887   
    impl ::std::convert::From<Builder> for crate::input::DoNothingInput {
  581    888   
        fn from(builder: Builder) -> Self {
  582    889   
            builder.build()
  583    890   
        }
  584    891   
    }
  585         -
    /// A builder for [`DoNothingInput`](crate::input::DoNothingInput).
         892  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`DoNothingInput`](crate::input::DoNothingInput).
         893  +
    /* RustType.kt:534 */
  586    894   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  587         -
    pub struct Builder {}
         895  +
    /* ServerBuilderGenerator.kt:211 */
         896  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         897  +
    /* ServerBuilderGenerator.kt:215 */
  588    898   
    impl Builder {
  589         -
        /// Consumes the builder and constructs a [`DoNothingInput`](crate::input::DoNothingInput).
         899  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`DoNothingInput`](crate::input::DoNothingInput).
         900  +
        /* ServerBuilderGenerator.kt:271 */
  590    901   
        pub fn build(self) -> crate::input::DoNothingInput {
  591    902   
            self.build_enforcing_all_constraints()
  592    903   
        }
         904  +
        /* ServerBuilderGenerator.kt:283 */
  593    905   
        fn build_enforcing_all_constraints(self) -> crate::input::DoNothingInput {
  594         -
            crate::input::DoNothingInput {}
         906  +
            /* ServerBuilderGenerator.kt:542 */
         907  +
            crate::input::DoNothingInput {
         908  +
            /* ServerBuilderGenerator.kt:542 */}
         909  +
            /* ServerBuilderGenerator.kt:283 */
  595    910   
        }
         911  +
        /* ServerBuilderGenerator.kt:215 */
  596    912   
    }
         913  +
         914  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  597    915   
}
  598         -
/// See [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         916  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
  599    917   
pub mod get_server_statistics_input {
  600    918   
         919  +
    /* ServerBuilderGenerator.kt:461 */
  601    920   
    impl ::std::convert::From<Builder> for crate::input::GetServerStatisticsInput {
  602    921   
        fn from(builder: Builder) -> Self {
  603    922   
            builder.build()
  604    923   
        }
  605    924   
    }
  606         -
    /// A builder for [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         925  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         926  +
    /* RustType.kt:534 */
  607    927   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  608         -
    pub struct Builder {}
         928  +
    /* ServerBuilderGenerator.kt:211 */
         929  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         930  +
    /* ServerBuilderGenerator.kt:215 */
  609    931   
    impl Builder {
  610         -
        /// Consumes the builder and constructs a [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         932  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         933  +
        /* ServerBuilderGenerator.kt:271 */
  611    934   
        pub fn build(self) -> crate::input::GetServerStatisticsInput {
  612    935   
            self.build_enforcing_all_constraints()
  613    936   
        }
         937  +
        /* ServerBuilderGenerator.kt:283 */
  614    938   
        fn build_enforcing_all_constraints(self) -> crate::input::GetServerStatisticsInput {
  615         -
            crate::input::GetServerStatisticsInput {}
         939  +
            /* ServerBuilderGenerator.kt:542 */
         940  +
            crate::input::GetServerStatisticsInput {
         941  +
            /* ServerBuilderGenerator.kt:542 */}
         942  +
            /* ServerBuilderGenerator.kt:283 */
  616    943   
        }
         944  +
        /* ServerBuilderGenerator.kt:215 */
  617    945   
    }
         946  +
         947  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  618    948   
}

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

@@ -1,1 +128,132 @@
   15     15   
#![allow(clippy::deprecated_semver)]
   16     16   
#![allow(clippy::uninlined_format_args)]
   17     17   
#![allow(rustdoc::bare_urls)]
   18     18   
#![allow(rustdoc::redundant_explicit_links)]
   19     19   
#![allow(rustdoc::invalid_html_tags)]
   20     20   
#![forbid(unsafe_code)]
   21     21   
#![cfg_attr(docsrs, feature(doc_cfg))]
   22     22   
//! The Pokémon Service allows you to retrieve information about Pokémon species.
   23     23   
   24     24   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          25  +
/* ServerRootGenerator.kt:207 */
   25     26   
//! A fast and customizable Rust implementation of the PokemonService Smithy service.
   26     27   
//!
   27     28   
//! # Using PokemonService
   28     29   
//!
   29     30   
//! The primary entrypoint is [`PokemonService`]: it satisfies the [`Service<http::Request, Response = http::Response>`](::tower::Service)
   30     31   
//! trait and therefore can be handed to a [`hyper` server](https://github.com/hyperium/hyper) via [`PokemonService::into_make_service`]
   31     32   
//! or used in AWS Lambda
   32     33   
#![cfg_attr(
   33     34   
    feature = "aws-lambda",
   34     35   
    doc = " via [`LambdaHandler`](crate::server::routing::LambdaHandler)."
   35     36   
)]
   36     37   
#![cfg_attr(
   37     38   
    not(feature = "aws-lambda"),
   38     39   
    doc = " by enabling the `aws-lambda` feature flag and utilizing the `LambdaHandler`."
   39     40   
)]
   40     41   
//! The [`crate::input`], [`crate::output`], and [`crate::error`]
   41     42   
//! modules provide the types used in each operation.
   42     43   
//!
   43     44   
//! ### Running on Hyper
   44     45   
//!
   45     46   
//! ```rust,no_run
   46     47   
//! # use std::net::SocketAddr;
   47     48   
//! # async fn dummy() {
   48     49   
//! use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
          50  +
//! use pokemon_service_server_sdk::serve;
          51  +
//! use ::tokio::net::TcpListener;
   49     52   
//!
   50     53   
//! # let app = PokemonService::builder(
   51     54   
//! #     PokemonServiceConfig::builder()
   52     55   
//! #         .build()
   53     56   
//! # ).build_unchecked();
   54         -
//! let server = app.into_make_service();
   55     57   
//! let bind: SocketAddr = "127.0.0.1:6969".parse()
   56     58   
//!     .expect("unable to parse the server bind address and port");
   57         -
//! ::hyper::Server::bind(&bind).serve(server).await.unwrap();
          59  +
//! let listener = TcpListener::bind(bind).await
          60  +
//!     .expect("failed to bind TCP listener");
          61  +
//! serve(listener, app.into_make_service()).await.unwrap();
   58     62   
//! # }
   59     63   
//! ```
   60     64   
//!
   61     65   
//! ### Running on Lambda
   62     66   
//!
   63     67   
//! ```rust,ignore
   64     68   
//! use pokemon_service_server_sdk::server::routing::LambdaHandler;
   65     69   
//! use pokemon_service_server_sdk::PokemonService;
   66     70   
//!
   67     71   
//! # async fn dummy() {
   68     72   
//! # let app = PokemonService::builder(
   69     73   
//! #     PokemonServiceConfig::builder()
   70     74   
//! #         .build()
   71     75   
//! # ).build_unchecked();
   72     76   
//! let handler = LambdaHandler::new(app);
   73     77   
//! lambda_http::run(handler).await.unwrap();
   74     78   
//! # }
   75     79   
//! ```
   76     80   
//!
   77     81   
//! # Building the PokemonService
   78     82   
//!
   79     83   
//! To construct [`PokemonService`] we use [`PokemonServiceBuilder`] returned by [`PokemonService::builder`].
   80     84   
//!
   81     85   
//! ## Plugins
   82     86   
//!
   83     87   
//! The [`PokemonService::builder`] method, returning [`PokemonServiceBuilder`],
   84     88   
//! accepts a config object on which plugins can be registered.
   85     89   
//! Plugins allow you to build middleware which is aware of the operation it is being applied to.
   86     90   
//!
   87     91   
//! ```rust,no_run
   88     92   
//! # use pokemon_service_server_sdk::server::plugin::IdentityPlugin as LoggingPlugin;
   89     93   
//! # use pokemon_service_server_sdk::server::plugin::IdentityPlugin as MetricsPlugin;
   90         -
//! # use ::hyper::Body;
          94  +
//! # use ::hyper::body::Incoming;
   91     95   
//! use pokemon_service_server_sdk::server::plugin::HttpPlugins;
   92     96   
//! use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig, PokemonServiceBuilder};
   93     97   
//!
   94     98   
//! let http_plugins = HttpPlugins::new()
   95     99   
//!         .push(LoggingPlugin)
   96    100   
//!         .push(MetricsPlugin);
   97    101   
//! let config = PokemonServiceConfig::builder().build();
   98         -
//! let builder: PokemonServiceBuilder<Body, _, _, _> = PokemonService::builder(config);
         102  +
//! let builder: PokemonServiceBuilder<::hyper::body::Incoming, _, _, _> = PokemonService::builder(config);
   99    103   
//! ```
  100    104   
//!
  101    105   
//! Check out [`crate::server::plugin`] to learn more about plugins.
  102    106   
//!
  103    107   
//! ## Handlers
  104    108   
//!
  105    109   
//! [`PokemonServiceBuilder`] provides a setter method for each operation in your Smithy model. The setter methods expect an async function as input, matching the signature for the corresponding operation in your Smithy model.
  106    110   
//! We call these async functions **handlers**. This is where your application business logic lives.
  107    111   
//!
  108    112   
//! Every handler must take an `Input`, and optional [`extractor arguments`](crate::server::request), while returning:
@@ -135,139 +279,296 @@
  155    159   
//! [`PokemonServiceBuilder::build`] requires you to provide a handler for every single operation in your Smithy model. It will return an error if that is not the case.
  156    160   
//!
  157    161   
//! [`PokemonServiceBuilder::build_unchecked`], instead, does not require exhaustiveness. The server will automatically return 500 Internal Server Error to all requests for operations that do not have a registered handler.
  158    162   
//! [`PokemonServiceBuilder::build_unchecked`] is particularly useful if you are deploying your Smithy service as a collection of Lambda functions, where each Lambda is only responsible for a subset of the operations in the Smithy service (or even a single one!).
  159    163   
//!
  160    164   
//! # Example
  161    165   
//!
  162    166   
//! ```rust,no_run
  163    167   
//! # use std::net::SocketAddr;
  164    168   
//! use pokemon_service_server_sdk::{PokemonService, PokemonServiceConfig};
         169  +
//! use pokemon_service_server_sdk::serve;
         170  +
//! use ::tokio::net::TcpListener;
  165    171   
//!
  166    172   
//! #[::tokio::main]
  167    173   
//! pub async fn main() {
  168    174   
//!    let config = PokemonServiceConfig::builder().build();
  169    175   
//!    let app = PokemonService::builder(config)
  170    176   
//!        .capture_pokemon(capture_pokemon)
  171    177   
//!        .check_health(check_health)
  172    178   
//!        .do_nothing(do_nothing)
  173    179   
//!        .get_pokemon_species(get_pokemon_species)
  174    180   
//!        .get_server_statistics(get_server_statistics)
  175    181   
//!        .get_storage(get_storage)
  176    182   
//!        .stream_pokemon_radio(stream_pokemon_radio)
  177    183   
//!        .build()
  178    184   
//!        .expect("failed to build an instance of PokemonService");
  179    185   
//!
  180    186   
//!    let bind: SocketAddr = "127.0.0.1:6969".parse()
  181    187   
//!        .expect("unable to parse the server bind address and port");
  182         -
//!    let server = ::hyper::Server::bind(&bind).serve(app.into_make_service());
         188  +
//!    let listener = TcpListener::bind(bind).await
         189  +
//!        .expect("failed to bind TCP listener");
  183    190   
//!    # let server = async { Ok::<_, ()>(()) };
  184    191   
//!
  185    192   
//!    // Run your service!
  186         -
//!    if let Err(err) = server.await {
         193  +
//!    if let Err(err) = serve(listener, app.into_make_service()).await {
  187    194   
//!        eprintln!("server error: {:?}", err);
  188    195   
//!    }
  189    196   
//! }
  190    197   
//!
  191    198   
//! use pokemon_service_server_sdk::{input, output, error};
  192    199   
//!
  193    200   
//! async fn capture_pokemon(input: input::CapturePokemonInput) -> Result<output::CapturePokemonOutput, error::CapturePokemonError> {
  194    201   
//!     todo!()
  195    202   
//! }
  196    203   
//!
  197    204   
//! async fn check_health(input: input::CheckHealthInput) -> output::CheckHealthOutput {
  198    205   
//!     todo!()
  199    206   
//! }
  200    207   
//!
  201    208   
//! async fn do_nothing(input: input::DoNothingInput) -> output::DoNothingOutput {
  202    209   
//!     todo!()
  203    210   
//! }
  204    211   
//!
  205    212   
//! async fn get_pokemon_species(input: input::GetPokemonSpeciesInput) -> Result<output::GetPokemonSpeciesOutput, error::GetPokemonSpeciesError> {
  206    213   
//!     todo!()
  207    214   
//! }
  208    215   
//!
  209    216   
//! async fn get_server_statistics(input: input::GetServerStatisticsInput) -> output::GetServerStatisticsOutput {
  210    217   
//!     todo!()
  211    218   
//! }
  212    219   
//!
  213    220   
//! async fn get_storage(input: input::GetStorageInput) -> Result<output::GetStorageOutput, error::GetStorageError> {
  214    221   
//!     todo!()
  215    222   
//! }
  216    223   
//!
  217    224   
//! async fn stream_pokemon_radio(input: input::StreamPokemonRadioInput) -> output::StreamPokemonRadioOutput {
  218    225   
//!     todo!()
  219    226   
//! }
  220    227   
//!
  221    228   
//! ```
  222    229   
//!
  223         -
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
         230  +
//! [`serve`]: crate::serve
         231  +
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  224    232   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  225    233   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  226    234   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  227         -
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  228    235   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
         236  +
/* ServerRootGenerator.kt:403 */
         237  +
/* ServerRootGenerator.kt:418 */ pub use crate::server::serve::serve;
  229    238   
pub use crate::service::{
  230    239   
    MissingOperationsError, PokemonService, PokemonServiceBuilder, PokemonServiceConfig,
  231    240   
    PokemonServiceConfigBuilder,
  232    241   
};
  233    242   
  234         -
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
         243  +
/// /* ServerRustModule.kt:55 */Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  235    244   
pub mod server {
  236    245   
    // Re-export all types from the `aws-smithy-http-server` crate.
  237    246   
    pub use ::aws_smithy_http_server::*;
         247  +
         248  +
    /* CodegenDelegator.kt:203 */
  238    249   
}
  239    250   
         251  +
/* CrateVersionCustomization.kt:23 */
  240    252   
/// Crate version number.
  241    253   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  242    254   
  243         -
/// All error types that operations can return. Documentation on these types is copied from the model.
         255  +
/// /* ServerRustModule.kt:55 */All error types that operations can return. Documentation on these types is copied from the model.
  244    256   
pub mod error;
  245    257   
  246         -
/// Input structures for operations. Documentation on these types is copied from the model.
         258  +
/// /* ServerRustModule.kt:55 */Input structures for operations. Documentation on these types is copied from the model.
  247    259   
pub mod input;
  248    260   
  249         -
/// Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
         261  +
/// /* ServerRustModule.kt:55 */Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
  250    262   
pub mod model;
  251    263   
  252         -
/// All operations that this crate can perform.
         264  +
/// /* ServerRustModule.kt:55 */All operations that this crate can perform.
  253    265   
pub mod operation;
  254    266   
         267  +
/* ServerRustModule.kt:79 */
  255    268   
/// A collection of types representing each operation defined in the service closure.
  256    269   
///
  257    270   
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
  258    271   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  259    272   
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  260    273   
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
  261    274   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  262    275   
pub mod operation_shape;
  263    276   
  264         -
/// Output structures for operations. Documentation on these types is copied from the model.
         277  +
/// /* ServerRustModule.kt:55 */Output structures for operations. Documentation on these types is copied from the model.
  265    278   
pub mod output;
  266    279   
         280  +
/* RustModule.kt:172 */
  267    281   
mod service;
  268    282   
  269         -
/// Data primitives referenced by other data types.
         283  +
/// /* ServerRustModule.kt:55 */Data primitives referenced by other data types.
  270    284   
pub mod types;
  271    285   
  272         -
/// Constrained types for constrained shapes.
         286  +
/// /* ServerRustModule.kt:55 */Constrained types for constrained shapes.
         287  +
/* RustModule.kt:172 */
  273    288   
mod constrained;
  274    289   
         290  +
/* RustModule.kt:172 */
  275    291   
mod mimes;
  276    292   
         293  +
/* RustModule.kt:172 */
  277    294   
mod event_stream_serde;
  278    295   
  279    296   
pub(crate) mod protocol_serde;

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

@@ -1,1 +22,25 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:390 */
    2      3   
pub(crate) static CONTENT_TYPE_APPLICATION_JSON: std::sync::LazyLock<::mime::Mime> =
    3      4   
    std::sync::LazyLock::new(|| {
    4      5   
        "application/json"
    5      6   
            .parse::<::mime::Mime>()
    6      7   
            .expect("BUG: MIME parsing failed, content_type is not valid")
    7      8   
    });
    8      9   
          10  +
/* ServerHttpBoundProtocolGenerator.kt:390 */
    9     11   
pub(crate) static CONTENT_TYPE_APPLICATION_OCTET_STREAM: std::sync::LazyLock<::mime::Mime> =
   10     12   
    std::sync::LazyLock::new(|| {
   11     13   
        "application/octet-stream"
   12     14   
            .parse::<::mime::Mime>()
   13     15   
            .expect("BUG: MIME parsing failed, content_type is not valid")
   14     16   
    });
   15     17   
          18  +
/* ServerHttpBoundProtocolGenerator.kt:390 */
   16     19   
pub(crate) static CONTENT_TYPE_APPLICATION_VND_AMAZON_EVENTSTREAM: std::sync::LazyLock<
   17     20   
    ::mime::Mime,
   18     21   
> = std::sync::LazyLock::new(|| {
   19     22   
    "application/vnd.amazon.eventstream"
   20     23   
        .parse::<::mime::Mime>()
   21     24   
        .expect("BUG: MIME parsing failed, content_type is not valid")
   22     25   
});

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

@@ -1,1 +578,933 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Describes one specific validation failure for an input member.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
           4  +
/* RustType.kt:534 */
    4      5   
#[derive(
    5      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6      7   
)]
    7         -
pub struct ValidationExceptionField {
    8         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
           8  +
pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
           9  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    9     10   
    pub path: ::std::string::String,
   10         -
    /// A detailed description of the validation failure.
          11  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   11     12   
    pub message: ::std::string::String,
          13  +
    /* StructureGenerator.kt:201 */
   12     14   
}
          15  +
/* StructureGenerator.kt:135 */
   13     16   
impl ValidationExceptionField {
   14         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          17  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          18  +
    /* StructureGenerator.kt:166 */
   15     19   
    pub fn path(&self) -> &str {
          20  +
        /* StructureGenerator.kt:171 */
   16     21   
        use std::ops::Deref;
   17     22   
        self.path.deref()
          23  +
        /* StructureGenerator.kt:166 */
   18     24   
    }
   19         -
    /// A detailed description of the validation failure.
          25  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
          26  +
    /* StructureGenerator.kt:166 */
   20     27   
    pub fn message(&self) -> &str {
          28  +
        /* StructureGenerator.kt:171 */
   21     29   
        use std::ops::Deref;
   22     30   
        self.message.deref()
          31  +
        /* StructureGenerator.kt:166 */
   23     32   
    }
          33  +
    /* StructureGenerator.kt:135 */
   24     34   
}
          35  +
/* ServerCodegenVisitor.kt:356 */
   25     36   
impl ValidationExceptionField {
   26         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          37  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          38  +
    /* ServerBuilderGenerator.kt:295 */
   27     39   
    pub fn builder() -> crate::model::validation_exception_field::Builder {
          40  +
        /* ServerBuilderGenerator.kt:296 */
   28     41   
        crate::model::validation_exception_field::Builder::default()
          42  +
        /* ServerBuilderGenerator.kt:295 */
   29     43   
    }
          44  +
    /* ServerCodegenVisitor.kt:356 */
   30     45   
}
   31     46   
          47  +
/* StructureGenerator.kt:197 */
   32     48   
#[allow(missing_docs)] // documentation missing in model
          49  +
/* RustType.kt:534 */
   33     50   
#[derive(
   34     51   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   35     52   
)]
   36         -
pub struct FlavorText {
   37         -
    /// The localized flavor text for an API resource in a specific language.
          53  +
pub /* StructureGenerator.kt:201 */ struct FlavorText {
          54  +
    /// /* StructureGenerator.kt:231 */The localized flavor text for an API resource in a specific language.
   38     55   
    pub flavor_text: ::std::string::String,
   39         -
    /// The language this name is in.
          56  +
    /// /* StructureGenerator.kt:231 */The language this name is in.
   40     57   
    pub language: crate::model::Language,
          58  +
    /* StructureGenerator.kt:201 */
   41     59   
}
          60  +
/* StructureGenerator.kt:135 */
   42     61   
impl FlavorText {
   43         -
    /// The localized flavor text for an API resource in a specific language.
          62  +
    /// /* StructureGenerator.kt:231 */The localized flavor text for an API resource in a specific language.
          63  +
    /* StructureGenerator.kt:166 */
   44     64   
    pub fn flavor_text(&self) -> &str {
          65  +
        /* StructureGenerator.kt:171 */
   45     66   
        use std::ops::Deref;
   46     67   
        self.flavor_text.deref()
          68  +
        /* StructureGenerator.kt:166 */
   47     69   
    }
   48         -
    /// The language this name is in.
          70  +
    /// /* StructureGenerator.kt:231 */The language this name is in.
          71  +
    /* StructureGenerator.kt:166 */
   49     72   
    pub fn language(&self) -> &crate::model::Language {
          73  +
        /* StructureGenerator.kt:172 */
   50     74   
        &self.language
          75  +
        /* StructureGenerator.kt:166 */
   51     76   
    }
          77  +
    /* StructureGenerator.kt:135 */
   52     78   
}
          79  +
/* ServerCodegenVisitor.kt:356 */
   53     80   
impl FlavorText {
   54         -
    /// Creates a new builder-style object to manufacture [`FlavorText`](crate::model::FlavorText).
          81  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`FlavorText`](crate::model::FlavorText).
          82  +
    /* ServerBuilderGenerator.kt:295 */
   55     83   
    pub fn builder() -> crate::model::flavor_text::Builder {
          84  +
        /* ServerBuilderGenerator.kt:296 */
   56     85   
        crate::model::flavor_text::Builder::default()
          86  +
        /* ServerBuilderGenerator.kt:295 */
   57     87   
    }
          88  +
    /* ServerCodegenVisitor.kt:356 */
   58     89   
}
   59     90   
   60         -
/// Supported languages for FlavorText entries.
          91  +
/// /* EnumGenerator.kt:183 */Supported languages for FlavorText entries.
          92  +
/* RustType.kt:534 */
   61     93   
#[derive(
   62     94   
    ::std::clone::Clone,
   63     95   
    ::std::cmp::Eq,
   64     96   
    ::std::cmp::Ord,
   65     97   
    ::std::cmp::PartialEq,
   66     98   
    ::std::cmp::PartialOrd,
   67     99   
    ::std::fmt::Debug,
   68    100   
    ::std::hash::Hash,
   69    101   
)]
   70         -
pub enum Language {
   71         -
    /// American English.
         102  +
pub /* EnumGenerator.kt:298 */ enum Language {
         103  +
    /// /* EnumGenerator.kt:183 */American English.
         104  +
    /* EnumGenerator.kt:170 */
   72    105   
    English,
   73         -
    /// Español.
         106  +
    /// /* EnumGenerator.kt:183 */Español.
         107  +
    /* EnumGenerator.kt:170 */
   74    108   
    Spanish,
   75         -
    /// Italiano.
         109  +
    /// /* EnumGenerator.kt:183 */Italiano.
         110  +
    /* EnumGenerator.kt:170 */
   76    111   
    Italian,
   77         -
    /// 日本語。
         112  +
    /// /* EnumGenerator.kt:183 */日本語。
         113  +
    /* EnumGenerator.kt:170 */
   78    114   
    Japanese,
         115  +
    /* EnumGenerator.kt:298 */
   79    116   
}
   80         -
/// See [`Language`](crate::model::Language).
         117  +
/// /* CodegenDelegator.kt:52 */See [`Language`](crate::model::Language).
   81    118   
pub mod language {
   82    119   
    #[derive(Debug, PartialEq)]
   83    120   
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
   84    121   
   85    122   
    impl ::std::fmt::Display for ConstraintViolation {
   86    123   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   87    124   
            write!(
   88    125   
                f,
   89    126   
                r#"Value provided for 'com.aws.example#Language' failed to satisfy constraint: Member must satisfy enum value set: [en, es, it, jp]"#
   90    127   
            )
   91    128   
        }
   92    129   
    }
   93    130   
   94    131   
    impl ::std::error::Error for ConstraintViolation {}
         132  +
         133  +
    /* ServerEnumGenerator.kt:47 */
   95    134   
}
         135  +
/* ServerEnumGenerator.kt:88 */
   96    136   
impl ::std::convert::TryFrom<&str> for Language {
   97    137   
    type Error = crate::model::language::ConstraintViolation;
   98    138   
    fn try_from(
   99    139   
        s: &str,
  100    140   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
  101    141   
        match s {
  102    142   
            "en" => Ok(Language::English),
  103    143   
            "es" => Ok(Language::Spanish),
  104    144   
            "it" => Ok(Language::Italian),
  105    145   
            "jp" => Ok(Language::Japanese),
  106    146   
            _ => Err(crate::model::language::ConstraintViolation(s.to_owned())),
  107    147   
        }
  108    148   
    }
  109    149   
}
  110    150   
impl ::std::convert::TryFrom<::std::string::String> for Language {
  111    151   
    type Error = crate::model::language::ConstraintViolation;
  112    152   
    fn try_from(
  113    153   
        s: ::std::string::String,
  114    154   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
  115    155   
    {
  116    156   
        s.as_str().try_into()
  117    157   
    }
  118    158   
}
         159  +
/* ServerEnumGenerator.kt:148 */
  119    160   
impl std::str::FromStr for Language {
  120    161   
    type Err = crate::model::language::ConstraintViolation;
  121    162   
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
  122    163   
        Self::try_from(s)
  123    164   
    }
  124    165   
}
         166  +
/* EnumGenerator.kt:309 */
  125    167   
impl Language {
  126    168   
    /// Returns the `&str` value of the enum member.
  127    169   
    pub fn as_str(&self) -> &str {
  128    170   
        match self {
  129    171   
            Language::English => "en",
  130    172   
            Language::Spanish => "es",
  131    173   
            Language::Italian => "it",
  132    174   
            Language::Japanese => "jp",
  133    175   
        }
  134    176   
    }
  135    177   
    /// Returns all the `&str` representations of the enum members.
  136    178   
    pub const fn values() -> &'static [&'static str] {
  137    179   
        &["en", "es", "it", "jp"]
  138    180   
    }
  139    181   
}
         182  +
/* EnumGenerator.kt:254 */
  140    183   
impl ::std::convert::AsRef<str> for Language {
  141    184   
    fn as_ref(&self) -> &str {
  142    185   
        self.as_str()
  143    186   
    }
  144    187   
}
         188  +
/* ConstrainedTraitForEnumGenerator.kt:36 */
  145    189   
impl crate::constrained::Constrained for Language {
  146    190   
    type Unconstrained = ::std::string::String;
  147    191   
}
  148    192   
  149    193   
impl ::std::convert::From<::std::string::String>
  150    194   
    for crate::constrained::MaybeConstrained<crate::model::Language>
  151    195   
{
  152    196   
    fn from(value: ::std::string::String) -> Self {
  153    197   
        Self::Unconstrained(value)
  154    198   
    }
  155    199   
}
  156    200   
         201  +
/* UnionGenerator.kt:67 */
  157    202   
#[allow(missing_docs)] // documentation missing in model
         203  +
/* RustType.kt:534 */
  158    204   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  159         -
pub enum CapturePokemonEvents {
         205  +
pub /* UnionGenerator.kt:85 */ enum CapturePokemonEvents {
         206  +
    /* UnionGenerator.kt:90 */
  160    207   
    #[allow(missing_docs)] // documentation missing in model
         208  +
    /* UnionGenerator.kt:190 */
  161    209   
    Event(crate::model::CaptureEvent),
         210  +
    /* UnionGenerator.kt:85 */
  162    211   
}
         212  +
/* UnionGenerator.kt:111 */
  163    213   
impl CapturePokemonEvents {
         214  +
    /* RustType.kt:534 */
  164    215   
    #[allow(irrefutable_let_patterns)]
         216  +
    /* UnionGenerator.kt:217 */
  165    217   
    /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
         218  +
    /* UnionGenerator.kt:222 */
  166    219   
    /// Returns `Err(&Self)` if it can't be converted.
         220  +
    /* UnionGenerator.kt:223 */
  167    221   
    pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
         222  +
        /* UnionGenerator.kt:227 */
  168    223   
        if let CapturePokemonEvents::Event(val) = &self {
  169    224   
            ::std::result::Result::Ok(val)
  170    225   
        } else {
  171    226   
            ::std::result::Result::Err(self)
  172    227   
        }
         228  +
        /* UnionGenerator.kt:223 */
  173    229   
    }
         230  +
    /* UnionGenerator.kt:121 */
  174    231   
    /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
         232  +
    /* UnionGenerator.kt:122 */
  175    233   
    pub fn is_event(&self) -> bool {
         234  +
        /* UnionGenerator.kt:123 */
  176    235   
        self.as_event().is_ok()
         236  +
        /* UnionGenerator.kt:122 */
  177    237   
    }
         238  +
    /* UnionGenerator.kt:111 */
  178    239   
}
  179    240   
         241  +
/* StructureGenerator.kt:197 */
  180    242   
#[allow(missing_docs)] // documentation missing in model
         243  +
/* RustType.kt:534 */
  181    244   
#[derive(
  182    245   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  183    246   
)]
  184         -
pub struct CaptureEvent {
         247  +
pub /* StructureGenerator.kt:201 */ struct CaptureEvent {
         248  +
    /* StructureGenerator.kt:231 */
  185    249   
    #[allow(missing_docs)] // documentation missing in model
  186    250   
    pub name: ::std::option::Option<::std::string::String>,
         251  +
    /* StructureGenerator.kt:231 */
  187    252   
    #[allow(missing_docs)] // documentation missing in model
  188    253   
    pub captured: ::std::option::Option<bool>,
         254  +
    /* StructureGenerator.kt:231 */
  189    255   
    #[allow(missing_docs)] // documentation missing in model
  190    256   
    pub shiny: ::std::option::Option<bool>,
         257  +
    /* StructureGenerator.kt:231 */
  191    258   
    #[allow(missing_docs)] // documentation missing in model
  192    259   
    pub pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
         260  +
    /* StructureGenerator.kt:201 */
  193    261   
}
         262  +
/* StructureGenerator.kt:135 */
  194    263   
impl CaptureEvent {
         264  +
    /* StructureGenerator.kt:231 */
  195    265   
    #[allow(missing_docs)] // documentation missing in model
         266  +
                           /* StructureGenerator.kt:166 */
  196    267   
    pub fn name(&self) -> ::std::option::Option<&str> {
         268  +
        /* StructureGenerator.kt:169 */
  197    269   
        self.name.as_deref()
         270  +
        /* StructureGenerator.kt:166 */
  198    271   
    }
         272  +
    /* StructureGenerator.kt:231 */
  199    273   
    #[allow(missing_docs)] // documentation missing in model
         274  +
                           /* StructureGenerator.kt:166 */
  200    275   
    pub fn captured(&self) -> ::std::option::Option<bool> {
         276  +
        /* StructureGenerator.kt:168 */
  201    277   
        self.captured
         278  +
        /* StructureGenerator.kt:166 */
  202    279   
    }
         280  +
    /* StructureGenerator.kt:231 */
  203    281   
    #[allow(missing_docs)] // documentation missing in model
         282  +
                           /* StructureGenerator.kt:166 */
  204    283   
    pub fn shiny(&self) -> ::std::option::Option<bool> {
         284  +
        /* StructureGenerator.kt:168 */
  205    285   
        self.shiny
         286  +
        /* StructureGenerator.kt:166 */
  206    287   
    }
         288  +
    /* StructureGenerator.kt:231 */
  207    289   
    #[allow(missing_docs)] // documentation missing in model
         290  +
                           /* StructureGenerator.kt:166 */
  208    291   
    pub fn pokedex_update(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
         292  +
        /* StructureGenerator.kt:170 */
  209    293   
        self.pokedex_update.as_ref()
         294  +
        /* StructureGenerator.kt:166 */
  210    295   
    }
         296  +
    /* StructureGenerator.kt:135 */
  211    297   
}
         298  +
/* ServerCodegenVisitor.kt:356 */
  212    299   
impl CaptureEvent {
  213         -
    /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
         300  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
         301  +
    /* ServerBuilderGenerator.kt:295 */
  214    302   
    pub fn builder() -> crate::model::capture_event::Builder {
         303  +
        /* ServerBuilderGenerator.kt:296 */
  215    304   
        crate::model::capture_event::Builder::default()
         305  +
        /* ServerBuilderGenerator.kt:295 */
  216    306   
    }
         307  +
    /* ServerCodegenVisitor.kt:356 */
  217    308   
}
  218    309   
         310  +
/* UnionGenerator.kt:67 */
  219    311   
#[allow(missing_docs)] // documentation missing in model
         312  +
/* RustType.kt:534 */
  220    313   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  221         -
pub enum AttemptCapturingPokemonEvent {
         314  +
pub /* UnionGenerator.kt:85 */ enum AttemptCapturingPokemonEvent {
         315  +
    /* UnionGenerator.kt:90 */
  222    316   
    #[allow(missing_docs)] // documentation missing in model
         317  +
    /* UnionGenerator.kt:190 */
  223    318   
    Event(crate::model::CapturingEvent),
         319  +
    /* UnionGenerator.kt:85 */
  224    320   
}
         321  +
/* UnionGenerator.kt:111 */
  225    322   
impl AttemptCapturingPokemonEvent {
         323  +
    /* RustType.kt:534 */
  226    324   
    #[allow(irrefutable_let_patterns)]
         325  +
    /* UnionGenerator.kt:217 */
  227    326   
    /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
         327  +
    /* UnionGenerator.kt:222 */
  228    328   
    /// Returns `Err(&Self)` if it can't be converted.
         329  +
    /* UnionGenerator.kt:223 */
  229    330   
    pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
         331  +
        /* UnionGenerator.kt:227 */
  230    332   
        if let AttemptCapturingPokemonEvent::Event(val) = &self {
  231    333   
            ::std::result::Result::Ok(val)
  232    334   
        } else {
  233    335   
            ::std::result::Result::Err(self)
  234    336   
        }
         337  +
        /* UnionGenerator.kt:223 */
  235    338   
    }
         339  +
    /* UnionGenerator.kt:121 */
  236    340   
    /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
         341  +
    /* UnionGenerator.kt:122 */
  237    342   
    pub fn is_event(&self) -> bool {
         343  +
        /* UnionGenerator.kt:123 */
  238    344   
        self.as_event().is_ok()
         345  +
        /* UnionGenerator.kt:122 */
  239    346   
    }
         347  +
    /* UnionGenerator.kt:111 */
  240    348   
}
  241    349   
         350  +
/* StructureGenerator.kt:197 */
  242    351   
#[allow(missing_docs)] // documentation missing in model
         352  +
/* RustType.kt:534 */
  243    353   
#[derive(
  244    354   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  245    355   
)]
  246         -
pub struct CapturingEvent {
         356  +
pub /* StructureGenerator.kt:201 */ struct CapturingEvent {
         357  +
    /* StructureGenerator.kt:231 */
  247    358   
    #[allow(missing_docs)] // documentation missing in model
  248    359   
    pub payload: ::std::option::Option<crate::model::CapturingPayload>,
         360  +
    /* StructureGenerator.kt:201 */
  249    361   
}
         362  +
/* StructureGenerator.kt:135 */
  250    363   
impl CapturingEvent {
         364  +
    /* StructureGenerator.kt:231 */
  251    365   
    #[allow(missing_docs)] // documentation missing in model
         366  +
                           /* StructureGenerator.kt:166 */
  252    367   
    pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
         368  +
        /* StructureGenerator.kt:170 */
  253    369   
        self.payload.as_ref()
         370  +
        /* StructureGenerator.kt:166 */
  254    371   
    }
         372  +
    /* StructureGenerator.kt:135 */
  255    373   
}
         374  +
/* ServerCodegenVisitor.kt:356 */
  256    375   
impl CapturingEvent {
  257         -
    /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
         376  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
         377  +
    /* ServerBuilderGenerator.kt:295 */
  258    378   
    pub fn builder() -> crate::model::capturing_event::Builder {
         379  +
        /* ServerBuilderGenerator.kt:296 */
  259    380   
        crate::model::capturing_event::Builder::default()
         381  +
        /* ServerBuilderGenerator.kt:295 */
  260    382   
    }
         383  +
    /* ServerCodegenVisitor.kt:356 */
  261    384   
}
         385  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  262    386   
impl crate::constrained::Constrained for crate::model::CapturingEvent {
  263    387   
    type Unconstrained = crate::model::capturing_event::Builder;
  264    388   
}
  265    389   
         390  +
/* StructureGenerator.kt:197 */
  266    391   
#[allow(missing_docs)] // documentation missing in model
         392  +
/* RustType.kt:534 */
  267    393   
#[derive(
  268    394   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  269    395   
)]
  270         -
pub struct CapturingPayload {
         396  +
pub /* StructureGenerator.kt:201 */ struct CapturingPayload {
         397  +
    /* StructureGenerator.kt:231 */
  271    398   
    #[allow(missing_docs)] // documentation missing in model
  272    399   
    pub name: ::std::option::Option<::std::string::String>,
         400  +
    /* StructureGenerator.kt:231 */
  273    401   
    #[allow(missing_docs)] // documentation missing in model
  274    402   
    pub pokeball: ::std::option::Option<::std::string::String>,
         403  +
    /* StructureGenerator.kt:201 */
  275    404   
}
         405  +
/* StructureGenerator.kt:135 */
  276    406   
impl CapturingPayload {
         407  +
    /* StructureGenerator.kt:231 */
  277    408   
    #[allow(missing_docs)] // documentation missing in model
         409  +
                           /* StructureGenerator.kt:166 */
  278    410   
    pub fn name(&self) -> ::std::option::Option<&str> {
         411  +
        /* StructureGenerator.kt:169 */
  279    412   
        self.name.as_deref()
         413  +
        /* StructureGenerator.kt:166 */
  280    414   
    }
         415  +
    /* StructureGenerator.kt:231 */
  281    416   
    #[allow(missing_docs)] // documentation missing in model
         417  +
                           /* StructureGenerator.kt:166 */
  282    418   
    pub fn pokeball(&self) -> ::std::option::Option<&str> {
         419  +
        /* StructureGenerator.kt:169 */
  283    420   
        self.pokeball.as_deref()
         421  +
        /* StructureGenerator.kt:166 */
  284    422   
    }
         423  +
    /* StructureGenerator.kt:135 */
  285    424   
}
         425  +
/* ServerCodegenVisitor.kt:356 */
  286    426   
impl CapturingPayload {
  287         -
    /// Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
         427  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
         428  +
    /* ServerBuilderGenerator.kt:295 */
  288    429   
    pub fn builder() -> crate::model::capturing_payload::Builder {
         430  +
        /* ServerBuilderGenerator.kt:296 */
  289    431   
        crate::model::capturing_payload::Builder::default()
         432  +
        /* ServerBuilderGenerator.kt:295 */
  290    433   
    }
         434  +
    /* ServerCodegenVisitor.kt:356 */
  291    435   
}
         436  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  292    437   
impl crate::constrained::Constrained for crate::model::CapturingPayload {
  293    438   
    type Unconstrained = crate::model::capturing_payload::Builder;
  294    439   
}
  295         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         440  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  296    441   
pub mod validation_exception_field {
  297    442   
         443  +
    /* RustType.kt:534 */
  298    444   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  299         -
    /// Holds one variant for each of the ways the builder can fail.
         445  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         446  +
    /* RustType.kt:534 */
  300    447   
    #[non_exhaustive]
         448  +
    /* ServerBuilderConstraintViolations.kt:75 */
  301    449   
    #[allow(clippy::enum_variant_names)]
  302    450   
    pub enum ConstraintViolation {
  303         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
         451  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
         452  +
        /* ServerBuilderConstraintViolations.kt:144 */
  304    453   
        MissingPath,
  305         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
         454  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
         455  +
        /* ServerBuilderConstraintViolations.kt:144 */
  306    456   
        MissingMessage,
         457  +
        /* ServerBuilderConstraintViolations.kt:75 */
  307    458   
    }
         459  +
    /* ServerBuilderConstraintViolations.kt:116 */
  308    460   
    impl ::std::fmt::Display for ConstraintViolation {
         461  +
        /* ServerBuilderConstraintViolations.kt:117 */
  309    462   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         463  +
            /* ServerBuilderConstraintViolations.kt:118 */
  310    464   
            match self {
  311         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
  312         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
  313         -
            }
         465  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
         466  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
         467  +
            /* ServerBuilderConstraintViolations.kt:118 */}
         468  +
            /* ServerBuilderConstraintViolations.kt:117 */
  314    469   
        }
         470  +
        /* ServerBuilderConstraintViolations.kt:116 */
  315    471   
    }
         472  +
    /* ServerBuilderConstraintViolations.kt:83 */
  316    473   
    impl ::std::error::Error for ConstraintViolation {}
         474  +
    /* ServerBuilderGenerator.kt:446 */
  317    475   
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
  318    476   
        type Error = ConstraintViolation;
  319    477   
  320    478   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  321    479   
            builder.build()
  322    480   
        }
  323    481   
    }
  324         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         482  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         483  +
    /* RustType.kt:534 */
  325    484   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         485  +
    /* ServerBuilderGenerator.kt:211 */
  326    486   
    pub struct Builder {
         487  +
        /* ServerBuilderGenerator.kt:308 */
  327    488   
        pub(crate) path: ::std::option::Option<::std::string::String>,
         489  +
        /* ServerBuilderGenerator.kt:308 */
  328    490   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         491  +
        /* ServerBuilderGenerator.kt:211 */
  329    492   
    }
         493  +
    /* ServerBuilderGenerator.kt:215 */
  330    494   
    impl Builder {
  331         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         495  +
        /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         496  +
        /* ServerBuilderGenerator.kt:343 */
  332    497   
        pub fn path(mut self, input: ::std::string::String) -> Self {
  333         -
            self.path = Some(input);
         498  +
            /* ServerBuilderGenerator.kt:344 */
         499  +
            self.path =
         500  +
                /* ServerBuilderGenerator.kt:345 */Some(
         501  +
                    /* ServerBuilderGenerator.kt:376 */input
         502  +
                /* ServerBuilderGenerator.kt:345 */)
         503  +
            /* ServerBuilderGenerator.kt:344 */;
  334    504   
            self
         505  +
            /* ServerBuilderGenerator.kt:343 */
  335    506   
        }
  336         -
        /// A detailed description of the validation failure.
         507  +
        /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
         508  +
        /* ServerBuilderGenerator.kt:343 */
  337    509   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  338         -
            self.message = Some(input);
         510  +
            /* ServerBuilderGenerator.kt:344 */
         511  +
            self.message =
         512  +
                /* ServerBuilderGenerator.kt:345 */Some(
         513  +
                    /* ServerBuilderGenerator.kt:376 */input
         514  +
                /* ServerBuilderGenerator.kt:345 */)
         515  +
            /* ServerBuilderGenerator.kt:344 */;
  339    516   
            self
         517  +
            /* ServerBuilderGenerator.kt:343 */
  340    518   
        }
  341         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  342         -
        ///
         519  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         520  +
        /// /* ServerBuilderGenerator.kt:260 */
  343    521   
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
  344    522   
        ///
  345         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         523  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         524  +
        /* ServerBuilderGenerator.kt:271 */
  346    525   
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  347    526   
            self.build_enforcing_all_constraints()
  348    527   
        }
         528  +
        /* ServerBuilderGenerator.kt:283 */
  349    529   
        fn build_enforcing_all_constraints(
  350    530   
            self,
  351    531   
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  352         -
            Ok(crate::model::ValidationExceptionField {
  353         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  354         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  355         -
            })
         532  +
            /* ServerBuilderGenerator.kt:287 */
         533  +
            Ok(
         534  +
                /* ServerBuilderGenerator.kt:542 */
         535  +
                crate::model::ValidationExceptionField {
         536  +
                    /* ServerBuilderGenerator.kt:546 */
         537  +
                    path: self
         538  +
                        .path
         539  +
                        /* ServerBuilderGenerator.kt:569 */
         540  +
                        .ok_or(ConstraintViolation::MissingPath)?,
         541  +
                    /* ServerBuilderGenerator.kt:546 */
         542  +
                    message: self
         543  +
                        .message
         544  +
                        /* ServerBuilderGenerator.kt:569 */
         545  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
         546  +
                    /* ServerBuilderGenerator.kt:542 */
         547  +
                }, /* ServerBuilderGenerator.kt:287 */
         548  +
            )
         549  +
            /* ServerBuilderGenerator.kt:283 */
  356    550   
        }
         551  +
        /* ServerBuilderGenerator.kt:215 */
  357    552   
    }
         553  +
         554  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  358    555   
}
  359         -
/// See [`FlavorText`](crate::model::FlavorText).
         556  +
/// /* ServerBuilderGenerator.kt:171 */See [`FlavorText`](crate::model::FlavorText).
  360    557   
pub mod flavor_text {
  361    558   
         559  +
    /* RustType.kt:534 */
  362    560   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  363         -
    /// Holds one variant for each of the ways the builder can fail.
         561  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         562  +
    /* RustType.kt:534 */
  364    563   
    #[non_exhaustive]
         564  +
    /* ServerBuilderConstraintViolations.kt:75 */
  365    565   
    #[allow(clippy::enum_variant_names)]
  366    566   
    pub enum ConstraintViolation {
  367         -
        /// `flavor_text` was not provided but it is required when building `FlavorText`.
         567  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`flavor_text` was not provided but it is required when building `FlavorText`.
         568  +
        /* ServerBuilderConstraintViolations.kt:144 */
  368    569   
        MissingFlavorText,
  369         -
        /// `language` was not provided but it is required when building `FlavorText`.
         570  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`language` was not provided but it is required when building `FlavorText`.
         571  +
        /* ServerBuilderConstraintViolations.kt:144 */
  370    572   
        MissingLanguage,
         573  +
        /* ServerBuilderConstraintViolations.kt:75 */
  371    574   
    }
         575  +
    /* ServerBuilderConstraintViolations.kt:116 */
  372    576   
    impl ::std::fmt::Display for ConstraintViolation {
         577  +
        /* ServerBuilderConstraintViolations.kt:117 */
  373    578   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         579  +
            /* ServerBuilderConstraintViolations.kt:118 */
  374    580   
            match self {
         581  +
                /* ServerBuilderConstraintViolations.kt:126 */
  375    582   
                ConstraintViolation::MissingFlavorText => write!(
  376    583   
                    f,
  377    584   
                    "`flavor_text` was not provided but it is required when building `FlavorText`"
  378    585   
                ),
         586  +
                /* ServerBuilderConstraintViolations.kt:126 */
  379    587   
                ConstraintViolation::MissingLanguage => write!(
  380    588   
                    f,
  381    589   
                    "`language` was not provided but it is required when building `FlavorText`"
  382    590   
                ),
         591  +
                /* ServerBuilderConstraintViolations.kt:118 */
  383    592   
            }
         593  +
            /* ServerBuilderConstraintViolations.kt:117 */
  384    594   
        }
         595  +
        /* ServerBuilderConstraintViolations.kt:116 */
  385    596   
    }
         597  +
    /* ServerBuilderConstraintViolations.kt:83 */
  386    598   
    impl ::std::error::Error for ConstraintViolation {}
         599  +
    /* ServerBuilderGenerator.kt:446 */
  387    600   
    impl ::std::convert::TryFrom<Builder> for crate::model::FlavorText {
  388    601   
        type Error = ConstraintViolation;
  389    602   
  390    603   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  391    604   
            builder.build()
  392    605   
        }
  393    606   
    }
  394         -
    /// A builder for [`FlavorText`](crate::model::FlavorText).
         607  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`FlavorText`](crate::model::FlavorText).
         608  +
    /* RustType.kt:534 */
  395    609   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         610  +
    /* ServerBuilderGenerator.kt:211 */
  396    611   
    pub struct Builder {
         612  +
        /* ServerBuilderGenerator.kt:308 */
  397    613   
        pub(crate) flavor_text: ::std::option::Option<::std::string::String>,
         614  +
        /* ServerBuilderGenerator.kt:308 */
  398    615   
        pub(crate) language: ::std::option::Option<crate::model::Language>,
         616  +
        /* ServerBuilderGenerator.kt:211 */
  399    617   
    }
         618  +
    /* ServerBuilderGenerator.kt:215 */
  400    619   
    impl Builder {
  401         -
        /// The localized flavor text for an API resource in a specific language.
         620  +
        /// /* ServerBuilderGenerator.kt:331 */The localized flavor text for an API resource in a specific language.
         621  +
        /* ServerBuilderGenerator.kt:343 */
  402    622   
        pub fn flavor_text(mut self, input: ::std::string::String) -> Self {
  403         -
            self.flavor_text = Some(input);
         623  +
            /* ServerBuilderGenerator.kt:344 */
         624  +
            self.flavor_text =
         625  +
                /* ServerBuilderGenerator.kt:345 */Some(
         626  +
                    /* ServerBuilderGenerator.kt:376 */input
         627  +
                /* ServerBuilderGenerator.kt:345 */)
         628  +
            /* ServerBuilderGenerator.kt:344 */;
  404    629   
            self
         630  +
            /* ServerBuilderGenerator.kt:343 */
  405    631   
        }
  406         -
        /// The language this name is in.
         632  +
        /// /* ServerBuilderGenerator.kt:331 */The language this name is in.
         633  +
        /* ServerBuilderGenerator.kt:343 */
  407    634   
        pub fn language(mut self, input: crate::model::Language) -> Self {
  408         -
            self.language = Some(input);
         635  +
            /* ServerBuilderGenerator.kt:344 */
         636  +
            self.language =
         637  +
                /* ServerBuilderGenerator.kt:345 */Some(
         638  +
                    /* ServerBuilderGenerator.kt:376 */input
         639  +
                /* ServerBuilderGenerator.kt:345 */)
         640  +
            /* ServerBuilderGenerator.kt:344 */;
  409    641   
            self
         642  +
            /* ServerBuilderGenerator.kt:343 */
  410    643   
        }
  411         -
        /// Consumes the builder and constructs a [`FlavorText`](crate::model::FlavorText).
  412         -
        ///
         644  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`FlavorText`](crate::model::FlavorText).
         645  +
        /// /* ServerBuilderGenerator.kt:260 */
  413    646   
        /// The builder fails to construct a [`FlavorText`](crate::model::FlavorText) if a [`ConstraintViolation`] occurs.
  414    647   
        ///
  415         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         648  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         649  +
        /* ServerBuilderGenerator.kt:271 */
  416    650   
        pub fn build(self) -> Result<crate::model::FlavorText, ConstraintViolation> {
  417    651   
            self.build_enforcing_all_constraints()
  418    652   
        }
         653  +
        /* ServerBuilderGenerator.kt:283 */
  419    654   
        fn build_enforcing_all_constraints(
  420    655   
            self,
  421    656   
        ) -> Result<crate::model::FlavorText, ConstraintViolation> {
  422         -
            Ok(crate::model::FlavorText {
         657  +
            /* ServerBuilderGenerator.kt:287 */
         658  +
            Ok(
         659  +
                /* ServerBuilderGenerator.kt:542 */
         660  +
                crate::model::FlavorText {
         661  +
                    /* ServerBuilderGenerator.kt:546 */
  423    662   
                    flavor_text: self
  424    663   
                        .flavor_text
         664  +
                        /* ServerBuilderGenerator.kt:569 */
  425    665   
                        .ok_or(ConstraintViolation::MissingFlavorText)?,
  426         -
                language: self.language.ok_or(ConstraintViolation::MissingLanguage)?,
  427         -
            })
         666  +
                    /* ServerBuilderGenerator.kt:546 */
         667  +
                    language: self
         668  +
                        .language
         669  +
                        /* ServerBuilderGenerator.kt:569 */
         670  +
                        .ok_or(ConstraintViolation::MissingLanguage)?,
         671  +
                    /* ServerBuilderGenerator.kt:542 */
         672  +
                }, /* ServerBuilderGenerator.kt:287 */
         673  +
            )
         674  +
            /* ServerBuilderGenerator.kt:283 */
  428    675   
        }
         676  +
        /* ServerBuilderGenerator.kt:215 */
  429    677   
    }
         678  +
         679  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  430    680   
}
  431         -
/// See [`CaptureEvent`](crate::model::CaptureEvent).
         681  +
/// /* ServerBuilderGenerator.kt:171 */See [`CaptureEvent`](crate::model::CaptureEvent).
  432    682   
pub mod capture_event {
  433    683   
         684  +
    /* ServerBuilderGenerator.kt:461 */
  434    685   
    impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
  435    686   
        fn from(builder: Builder) -> Self {
  436    687   
            builder.build()
  437    688   
        }
  438    689   
    }
  439         -
    /// A builder for [`CaptureEvent`](crate::model::CaptureEvent).
         690  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CaptureEvent`](crate::model::CaptureEvent).
         691  +
    /* RustType.kt:534 */
  440    692   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         693  +
    /* ServerBuilderGenerator.kt:211 */
  441    694   
    pub struct Builder {
         695  +
        /* ServerBuilderGenerator.kt:308 */
  442    696   
        pub(crate) name: ::std::option::Option<::std::string::String>,
  443         -
        pub(crate) captured: ::std::option::Option<bool>,
  444         -
        pub(crate) shiny: ::std::option::Option<bool>,
         697  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) captured: ::std::option::Option<bool>,
         698  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) shiny: ::std::option::Option<bool>,
         699  +
        /* ServerBuilderGenerator.kt:308 */
  445    700   
        pub(crate) pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
         701  +
        /* ServerBuilderGenerator.kt:211 */
  446    702   
    }
         703  +
    /* ServerBuilderGenerator.kt:215 */
  447    704   
    impl Builder {
         705  +
        /* ServerBuilderGenerator.kt:331 */
  448    706   
        #[allow(missing_docs)] // documentation missing in model
         707  +
                               /* ServerBuilderGenerator.kt:343 */
  449    708   
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  450         -
            self.name = input;
         709  +
            /* ServerBuilderGenerator.kt:344 */
         710  +
            self.name =
         711  +
                /* ServerBuilderGenerator.kt:376 */input
         712  +
            /* ServerBuilderGenerator.kt:344 */;
  451    713   
            self
         714  +
            /* ServerBuilderGenerator.kt:343 */
  452    715   
        }
         716  +
        /* ServerBuilderGenerator.kt:331 */
  453    717   
        #[allow(missing_docs)] // documentation missing in model
         718  +
                               /* ServerBuilderGenerator.kt:343 */
  454    719   
        pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
  455         -
            self.captured = input;
         720  +
            /* ServerBuilderGenerator.kt:344 */
         721  +
            self.captured =
         722  +
                /* ServerBuilderGenerator.kt:376 */input
         723  +
            /* ServerBuilderGenerator.kt:344 */;
  456    724   
            self
         725  +
            /* ServerBuilderGenerator.kt:343 */
  457    726   
        }
         727  +
        /* ServerBuilderGenerator.kt:331 */
  458    728   
        #[allow(missing_docs)] // documentation missing in model
         729  +
                               /* ServerBuilderGenerator.kt:343 */
  459    730   
        pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
  460         -
            self.shiny = input;
         731  +
            /* ServerBuilderGenerator.kt:344 */
         732  +
            self.shiny =
         733  +
                /* ServerBuilderGenerator.kt:376 */input
         734  +
            /* ServerBuilderGenerator.kt:344 */;
  461    735   
            self
         736  +
            /* ServerBuilderGenerator.kt:343 */
  462    737   
        }
         738  +
        /* ServerBuilderGenerator.kt:331 */
  463    739   
        #[allow(missing_docs)] // documentation missing in model
         740  +
                               /* ServerBuilderGenerator.kt:343 */
  464    741   
        pub fn pokedex_update(
  465    742   
            mut self,
  466    743   
            input: ::std::option::Option<::aws_smithy_types::Blob>,
  467    744   
        ) -> Self {
  468         -
            self.pokedex_update = input;
         745  +
            /* ServerBuilderGenerator.kt:344 */
         746  +
            self.pokedex_update =
         747  +
                /* ServerBuilderGenerator.kt:376 */input
         748  +
            /* ServerBuilderGenerator.kt:344 */;
  469    749   
            self
         750  +
            /* ServerBuilderGenerator.kt:343 */
  470    751   
        }
  471         -
        /// Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
         752  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
         753  +
        /* ServerBuilderGenerator.kt:271 */
  472    754   
        pub fn build(self) -> crate::model::CaptureEvent {
  473    755   
            self.build_enforcing_all_constraints()
  474    756   
        }
         757  +
        /* ServerBuilderGenerator.kt:283 */
  475    758   
        fn build_enforcing_all_constraints(self) -> crate::model::CaptureEvent {
         759  +
            /* ServerBuilderGenerator.kt:542 */
  476    760   
            crate::model::CaptureEvent {
         761  +
                /* ServerBuilderGenerator.kt:546 */
  477    762   
                name: self.name,
         763  +
                /* ServerBuilderGenerator.kt:546 */
  478    764   
                captured: self.captured,
         765  +
                /* ServerBuilderGenerator.kt:546 */
  479    766   
                shiny: self.shiny,
         767  +
                /* ServerBuilderGenerator.kt:546 */
  480    768   
                pokedex_update: self.pokedex_update,
         769  +
                /* ServerBuilderGenerator.kt:542 */
  481    770   
            }
         771  +
            /* ServerBuilderGenerator.kt:283 */
  482    772   
        }
         773  +
        /* ServerBuilderGenerator.kt:215 */
  483    774   
    }
         775  +
         776  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  484    777   
}
  485         -
/// See [`CapturingEvent`](crate::model::CapturingEvent).
         778  +
/// /* ServerBuilderGenerator.kt:171 */See [`CapturingEvent`](crate::model::CapturingEvent).
  486    779   
pub mod capturing_event {
  487    780   
         781  +
    /* ServerBuilderGenerator.kt:461 */
  488    782   
    impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
  489    783   
        fn from(builder: Builder) -> Self {
  490    784   
            builder.build()
  491    785   
        }
  492    786   
    }
  493         -
    /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
         787  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingEvent`](crate::model::CapturingEvent).
         788  +
    /* RustType.kt:534 */
  494    789   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         790  +
    /* ServerBuilderGenerator.kt:211 */
  495    791   
    pub struct Builder {
         792  +
        /* ServerBuilderGenerator.kt:308 */
  496    793   
        pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
         794  +
        /* ServerBuilderGenerator.kt:211 */
  497    795   
    }
         796  +
    /* ServerBuilderGenerator.kt:215 */
  498    797   
    impl Builder {
         798  +
        /* ServerBuilderGenerator.kt:331 */
  499    799   
        #[allow(missing_docs)] // documentation missing in model
         800  +
                               /* ServerBuilderGenerator.kt:343 */
  500    801   
        pub fn payload(
  501    802   
            mut self,
  502    803   
            input: ::std::option::Option<crate::model::CapturingPayload>,
  503    804   
        ) -> Self {
  504         -
            self.payload = input;
         805  +
            /* ServerBuilderGenerator.kt:344 */
         806  +
            self.payload =
         807  +
                /* ServerBuilderGenerator.kt:376 */input
         808  +
            /* ServerBuilderGenerator.kt:344 */;
  505    809   
            self
         810  +
            /* ServerBuilderGenerator.kt:343 */
  506    811   
        }
         812  +
        /* ServerBuilderGenerator.kt:426 */
  507    813   
        #[allow(missing_docs)] // documentation missing in model
         814  +
                               /* ServerBuilderGenerator.kt:428 */
  508    815   
        pub(crate) fn set_payload(
  509    816   
            mut self,
  510    817   
            input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
  511    818   
        ) -> Self {
         819  +
            /* ServerBuilderGenerator.kt:429 */
  512    820   
            self.payload = input.map(|v| v.into());
  513    821   
            self
         822  +
            /* ServerBuilderGenerator.kt:428 */
  514    823   
        }
  515         -
        /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
         824  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
         825  +
        /* ServerBuilderGenerator.kt:271 */
  516    826   
        pub fn build(self) -> crate::model::CapturingEvent {
  517    827   
            self.build_enforcing_all_constraints()
  518    828   
        }
         829  +
        /* ServerBuilderGenerator.kt:283 */
  519    830   
        fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
         831  +
            /* ServerBuilderGenerator.kt:542 */
  520    832   
            crate::model::CapturingEvent {
         833  +
                /* ServerBuilderGenerator.kt:546 */
  521    834   
                payload: self.payload,
         835  +
                /* ServerBuilderGenerator.kt:542 */
  522    836   
            }
         837  +
            /* ServerBuilderGenerator.kt:283 */
  523    838   
        }
         839  +
        /* ServerBuilderGenerator.kt:215 */
  524    840   
    }
         841  +
         842  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  525    843   
}
  526         -
/// See [`CapturingPayload`](crate::model::CapturingPayload).
         844  +
/// /* ServerBuilderGenerator.kt:171 */See [`CapturingPayload`](crate::model::CapturingPayload).
  527    845   
pub mod capturing_payload {
  528    846   
         847  +
    /* ServerBuilderGenerator.kt:461 */
  529    848   
    impl ::std::convert::From<Builder> for crate::model::CapturingPayload {
  530    849   
        fn from(builder: Builder) -> Self {
  531    850   
            builder.build()
  532    851   
        }
  533    852   
    }
  534         -
    /// A builder for [`CapturingPayload`](crate::model::CapturingPayload).
         853  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CapturingPayload`](crate::model::CapturingPayload).
         854  +
    /* RustType.kt:534 */
  535    855   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         856  +
    /* ServerBuilderGenerator.kt:211 */
  536    857   
    pub struct Builder {
         858  +
        /* ServerBuilderGenerator.kt:308 */
  537    859   
        pub(crate) name: ::std::option::Option<::std::string::String>,
         860  +
        /* ServerBuilderGenerator.kt:308 */
  538    861   
        pub(crate) pokeball: ::std::option::Option<::std::string::String>,
         862  +
        /* ServerBuilderGenerator.kt:211 */
  539    863   
    }
         864  +
    /* ServerBuilderGenerator.kt:215 */
  540    865   
    impl Builder {
         866  +
        /* ServerBuilderGenerator.kt:331 */
  541    867   
        #[allow(missing_docs)] // documentation missing in model
         868  +
                               /* ServerBuilderGenerator.kt:343 */
  542    869   
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  543         -
            self.name = input;
         870  +
            /* ServerBuilderGenerator.kt:344 */
         871  +
            self.name =
         872  +
                /* ServerBuilderGenerator.kt:376 */input
         873  +
            /* ServerBuilderGenerator.kt:344 */;
  544    874   
            self
         875  +
            /* ServerBuilderGenerator.kt:343 */
  545    876   
        }
         877  +
        /* ServerBuilderGenerator.kt:426 */
  546    878   
        #[allow(missing_docs)] // documentation missing in model
         879  +
                               /* ServerBuilderGenerator.kt:428 */
  547    880   
        pub(crate) fn set_name(
  548    881   
            mut self,
  549    882   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  550    883   
        ) -> Self {
         884  +
            /* ServerBuilderGenerator.kt:429 */
  551    885   
            self.name = input.map(|v| v.into());
  552    886   
            self
         887  +
            /* ServerBuilderGenerator.kt:428 */
  553    888   
        }
         889  +
        /* ServerBuilderGenerator.kt:331 */
  554    890   
        #[allow(missing_docs)] // documentation missing in model
         891  +
                               /* ServerBuilderGenerator.kt:343 */
  555    892   
        pub fn pokeball(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  556         -
            self.pokeball = input;
         893  +
            /* ServerBuilderGenerator.kt:344 */
         894  +
            self.pokeball =
         895  +
                /* ServerBuilderGenerator.kt:376 */input
         896  +
            /* ServerBuilderGenerator.kt:344 */;
  557    897   
            self
         898  +
            /* ServerBuilderGenerator.kt:343 */
  558    899   
        }
         900  +
        /* ServerBuilderGenerator.kt:426 */
  559    901   
        #[allow(missing_docs)] // documentation missing in model
         902  +
                               /* ServerBuilderGenerator.kt:428 */
  560    903   
        pub(crate) fn set_pokeball(
  561    904   
            mut self,
  562    905   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  563    906   
        ) -> Self {
         907  +
            /* ServerBuilderGenerator.kt:429 */
  564    908   
            self.pokeball = input.map(|v| v.into());
  565    909   
            self
         910  +
            /* ServerBuilderGenerator.kt:428 */
  566    911   
        }
  567         -
        /// Consumes the builder and constructs a [`CapturingPayload`](crate::model::CapturingPayload).
         912  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CapturingPayload`](crate::model::CapturingPayload).
         913  +
        /* ServerBuilderGenerator.kt:271 */
  568    914   
        pub fn build(self) -> crate::model::CapturingPayload {
  569    915   
            self.build_enforcing_all_constraints()
  570    916   
        }
         917  +
        /* ServerBuilderGenerator.kt:283 */
  571    918   
        fn build_enforcing_all_constraints(self) -> crate::model::CapturingPayload {
         919  +
            /* ServerBuilderGenerator.kt:542 */
  572    920   
            crate::model::CapturingPayload {
         921  +
                /* ServerBuilderGenerator.kt:546 */
  573    922   
                name: self.name,
         923  +
                /* ServerBuilderGenerator.kt:546 */
  574    924   
                pokeball: self.pokeball,
         925  +
                /* ServerBuilderGenerator.kt:542 */
  575    926   
            }
         927  +
            /* ServerBuilderGenerator.kt:283 */
  576    928   
        }
         929  +
        /* ServerBuilderGenerator.kt:215 */
  577    930   
    }
         931  +
         932  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  578    933   
}