Client Test

Client Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_pokemon_species/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::get_pokemon_species::_get_pokemon_species_output::GetPokemonSpeciesOutputBuilder;
    3         -
    4      2   
pub use crate::operation::get_pokemon_species::_get_pokemon_species_input::GetPokemonSpeciesInputBuilder;
    5      3   
           4  +
pub use crate::operation::get_pokemon_species::_get_pokemon_species_output::GetPokemonSpeciesOutputBuilder;
           5  +
    6      6   
impl crate::operation::get_pokemon_species::builders::GetPokemonSpeciesInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::get_pokemon_species::GetPokemonSpeciesOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::get_pokemon_species::GetPokemonSpeciesError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics.rs

@@ -294,294 +333,333 @@
  314    314   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  315    315   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  316    316   
    ) -> Self {
  317    317   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  318    318   
            source,
  319    319   
            meta: meta.unwrap_or_default(),
  320    320   
        })
  321    321   
    }
  322    322   
}
  323    323   
  324         -
pub use crate::operation::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutput;
  325         -
  326    324   
pub use crate::operation::get_server_statistics::_get_server_statistics_input::GetServerStatisticsInput;
  327    325   
         326  +
pub use crate::operation::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutput;
         327  +
  328    328   
mod _get_server_statistics_input;
  329    329   
  330    330   
mod _get_server_statistics_output;
  331    331   
  332    332   
/// Builders
  333    333   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_server_statistics/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutputBuilder;
    3         -
    4      2   
pub use crate::operation::get_server_statistics::_get_server_statistics_input::GetServerStatisticsInputBuilder;
    5      3   
           4  +
pub use crate::operation::get_server_statistics::_get_server_statistics_output::GetServerStatisticsOutputBuilder;
           5  +
    6      6   
impl crate::operation::get_server_statistics::builders::GetServerStatisticsInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::get_server_statistics::GetServerStatisticsOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::get_server_statistics::GetServerStatisticsError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_storage.rs

@@ -328,328 +367,367 @@
  348    348   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  349    349   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  350    350   
    ) -> Self {
  351    351   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  352    352   
            source,
  353    353   
            meta: meta.unwrap_or_default(),
  354    354   
        })
  355    355   
    }
  356    356   
}
  357    357   
  358         -
pub use crate::operation::get_storage::_get_storage_output::GetStorageOutput;
  359         -
  360    358   
pub use crate::operation::get_storage::_get_storage_input::GetStorageInput;
  361    359   
         360  +
pub use crate::operation::get_storage::_get_storage_output::GetStorageOutput;
         361  +
  362    362   
mod _get_storage_input;
  363    363   
  364    364   
mod _get_storage_output;
  365    365   
  366    366   
/// Builders
  367    367   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/get_storage/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::get_storage::_get_storage_output::GetStorageOutputBuilder;
    3         -
    4      2   
pub use crate::operation::get_storage::_get_storage_input::GetStorageInputBuilder;
    5      3   
           4  +
pub use crate::operation::get_storage::_get_storage_output::GetStorageOutputBuilder;
           5  +
    6      6   
impl crate::operation::get_storage::builders::GetStorageInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::get_storage::GetStorageOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::get_storage::GetStorageError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/stream_pokemon_radio.rs

@@ -299,299 +338,338 @@
  319    319   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  320    320   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  321    321   
    ) -> Self {
  322    322   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  323    323   
            source,
  324    324   
            meta: meta.unwrap_or_default(),
  325    325   
        })
  326    326   
    }
  327    327   
}
  328    328   
  329         -
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_output::StreamPokemonRadioOutput;
  330         -
  331    329   
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_input::StreamPokemonRadioInput;
  332    330   
         331  +
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_output::StreamPokemonRadioOutput;
         332  +
  333    333   
mod _stream_pokemon_radio_input;
  334    334   
  335    335   
mod _stream_pokemon_radio_output;
  336    336   
  337    337   
/// Builders
  338    338   
pub mod builders;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/operation/stream_pokemon_radio/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_output::StreamPokemonRadioOutputBuilder;
    3         -
    4      2   
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_input::StreamPokemonRadioInputBuilder;
    5      3   
           4  +
pub use crate::operation::stream_pokemon_radio::_stream_pokemon_radio_output::StreamPokemonRadioOutputBuilder;
           5  +
    6      6   
impl crate::operation::stream_pokemon_radio::builders::StreamPokemonRadioInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::stream_pokemon_radio::StreamPokemonRadioOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::stream_pokemon_radio::StreamPokemonRadioError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/types.rs

@@ -1,1 +38,38 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_validation_exception_field::ValidationExceptionField;
    3         -
    4         -
pub use crate::types::_flavor_text::FlavorText;
    5         -
    6         -
pub use crate::types::_language::Language;
           2  +
pub use crate::types::_attempt_capturing_pokemon_event::AttemptCapturingPokemonEvent;
    7      3   
    8      4   
pub use crate::types::_capture_pokemon_events::CapturePokemonEvents;
    9      5   
           6  +
pub use crate::types::_capturing_event::CapturingEvent;
           7  +
   10      8   
pub use crate::types::_capture_event::CaptureEvent;
   11      9   
   12         -
pub use crate::types::_attempt_capturing_pokemon_event::AttemptCapturingPokemonEvent;
          10  +
pub use crate::types::_validation_exception_field::ValidationExceptionField;
   13     11   
   14         -
pub use crate::types::_capturing_event::CapturingEvent;
          12  +
pub use crate::types::_flavor_text::FlavorText;
   15     13   
   16     14   
pub use crate::types::_capturing_payload::CapturingPayload;
   17     15   
          16  +
pub use crate::types::_language::Language;
          17  +
   18     18   
mod _attempt_capturing_pokemon_event;
   19     19   
   20     20   
mod _capture_event;
   21     21   
   22     22   
mod _capture_pokemon_events;
   23     23   
   24     24   
mod _capturing_event;
   25     25   
   26     26   
mod _capturing_payload;
   27     27   

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/types/builders.rs

@@ -1,1 +10,10 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::_validation_exception_field::ValidationExceptionFieldBuilder;
    3         -
    4         -
pub use crate::types::_flavor_text::FlavorTextBuilder;
           2  +
pub use crate::types::_capturing_event::CapturingEventBuilder;
    5      3   
    6      4   
pub use crate::types::_capture_event::CaptureEventBuilder;
    7      5   
    8         -
pub use crate::types::_capturing_event::CapturingEventBuilder;
           6  +
pub use crate::types::_validation_exception_field::ValidationExceptionFieldBuilder;
           7  +
           8  +
pub use crate::types::_flavor_text::FlavorTextBuilder;
    9      9   
   10     10   
pub use crate::types::_capturing_payload::CapturingPayloadBuilder;

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/types/error.rs

@@ -1,1 +237,237 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_validation_exception::ValidationError;
    3         -
    4         -
pub use crate::types::error::_storage_access_not_authorized::StorageAccessNotAuthorized;
           2  +
pub use crate::types::error::_unsupported_region_error::UnsupportedRegionError;
    5      3   
    6         -
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundError;
           4  +
pub use crate::types::error::_throttling_error::ThrottlingError;
    7      5   
    8         -
pub use crate::types::error::_invalid_pokeball_error::InvalidPokeballError;
           6  +
pub use crate::types::error::_validation_exception::ValidationError;
    9      7   
   10      8   
pub use crate::types::error::_master_ball_unsuccessful::MasterBallUnsuccessful;
   11      9   
   12         -
pub use crate::types::error::_throttling_error::ThrottlingError;
          10  +
pub use crate::types::error::_invalid_pokeball_error::InvalidPokeballError;
   13     11   
   14         -
pub use crate::types::error::_unsupported_region_error::UnsupportedRegionError;
          12  +
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundError;
   15     13   
   16         -
/// Error type for the `CapturePokemonEventsError` operation.
          14  +
pub use crate::types::error::_storage_access_not_authorized::StorageAccessNotAuthorized;
          15  +
          16  +
/// Error type for the `AttemptCapturingPokemonEventError` operation.
   17     17   
#[non_exhaustive]
   18     18   
#[derive(::std::fmt::Debug)]
   19         -
pub enum CapturePokemonEventsError {
   20         -
    #[allow(missing_docs)] // documentation missing in model
   21         -
    InvalidPokeballError(crate::types::error::InvalidPokeballError),
          19  +
pub enum AttemptCapturingPokemonEventError {
   22     20   
    #[allow(missing_docs)] // documentation missing in model
   23         -
    ThrottlingError(crate::types::error::ThrottlingError),
          21  +
    MasterBallUnsuccessful(crate::types::error::MasterBallUnsuccessful),
   24     22   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
   25     23   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   26     24   
    variable wildcard pattern and check `.code()`:
   27     25   
     \
   28     26   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   29     27   
     \
   30         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CapturePokemonEventsError) for what information is available for the error.")]
          28  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AttemptCapturingPokemonEventError) for what information is available for the error.")]
   31     29   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
   32     30   
}
   33         -
impl CapturePokemonEventsError {
   34         -
    /// Creates the `CapturePokemonEventsError::Unhandled` variant from any error type.
          31  +
impl AttemptCapturingPokemonEventError {
          32  +
    /// Creates the `AttemptCapturingPokemonEventError::Unhandled` variant from any error type.
   35     33   
    pub fn unhandled(
   36     34   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
   37     35   
    ) -> Self {
   38     36   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
   39     37   
            source: err.into(),
   40     38   
            meta: ::std::default::Default::default(),
   41     39   
        })
   42     40   
    }
   43     41   
   44         -
    /// Creates the `CapturePokemonEventsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
          42  +
    /// Creates the `AttemptCapturingPokemonEventError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
   45     43   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   46     44   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
   47     45   
            source: err.clone().into(),
   48     46   
            meta: err,
   49     47   
        })
   50     48   
    }
   51     49   
    ///
   52     50   
    /// Returns error metadata, which includes the error code, message,
   53     51   
    /// request ID, and potentially additional information.
   54     52   
    ///
   55     53   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   56     54   
        match self {
   57         -
            Self::InvalidPokeballError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
   58         -
            Self::ThrottlingError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
          55  +
            Self::MasterBallUnsuccessful(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
   59     56   
            Self::Unhandled(e) => &e.meta,
   60     57   
        }
   61     58   
    }
   62         -
    /// Returns `true` if the error kind is `CapturePokemonEventsError::InvalidPokeballError`.
   63         -
    pub fn is_invalid_pokeball_error(&self) -> bool {
   64         -
        matches!(self, Self::InvalidPokeballError(_))
   65         -
    }
   66         -
    /// Returns `true` if the error kind is `CapturePokemonEventsError::ThrottlingError`.
   67         -
    pub fn is_throttling_error(&self) -> bool {
   68         -
        matches!(self, Self::ThrottlingError(_))
          59  +
    /// Returns `true` if the error kind is `AttemptCapturingPokemonEventError::MasterBallUnsuccessful`.
          60  +
    pub fn is_master_ball_unsuccessful(&self) -> bool {
          61  +
        matches!(self, Self::MasterBallUnsuccessful(_))
   69     62   
    }
   70     63   
}
   71         -
impl ::std::error::Error for CapturePokemonEventsError {
          64  +
impl ::std::error::Error for AttemptCapturingPokemonEventError {
   72     65   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
   73     66   
        match self {
   74         -
            Self::InvalidPokeballError(_inner) => ::std::option::Option::Some(_inner),
   75         -
            Self::ThrottlingError(_inner) => ::std::option::Option::Some(_inner),
          67  +
            Self::MasterBallUnsuccessful(_inner) => ::std::option::Option::Some(_inner),
   76     68   
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
   77     69   
        }
   78     70   
    }
   79     71   
}
   80         -
impl ::std::fmt::Display for CapturePokemonEventsError {
          72  +
impl ::std::fmt::Display for AttemptCapturingPokemonEventError {
   81     73   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
   82     74   
        match self {
   83         -
            Self::InvalidPokeballError(_inner) => _inner.fmt(f),
   84         -
            Self::ThrottlingError(_inner) => _inner.fmt(f),
          75  +
            Self::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
   85     76   
            Self::Unhandled(_inner) => {
   86     77   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   87     78   
                    write!(f, "unhandled error ({code})")
   88     79   
                } else {
   89     80   
                    f.write_str("unhandled error")
   90     81   
                }
   91     82   
            }
   92     83   
        }
   93     84   
    }
   94     85   
}
   95         -
impl ::aws_smithy_types::retry::ProvideErrorKind for CapturePokemonEventsError {
          86  +
impl ::aws_smithy_types::retry::ProvideErrorKind for AttemptCapturingPokemonEventError {
   96     87   
    fn code(&self) -> ::std::option::Option<&str> {
   97     88   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
   98     89   
    }
   99     90   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  100     91   
        ::std::option::Option::None
  101     92   
    }
  102     93   
}
  103         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CapturePokemonEventsError {
          94  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AttemptCapturingPokemonEventError {
  104     95   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  105     96   
        match self {
  106         -
            Self::InvalidPokeballError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  107         -
            Self::ThrottlingError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
          97  +
            Self::MasterBallUnsuccessful(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  108     98   
            Self::Unhandled(_inner) => &_inner.meta,
  109     99   
        }
  110    100   
    }
  111    101   
}
  112         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CapturePokemonEventsError {
         102  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AttemptCapturingPokemonEventError {
  113    103   
    fn create_unhandled_error(
  114    104   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  115    105   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  116    106   
    ) -> Self {
  117    107   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  118    108   
            source,
  119    109   
            meta: meta.unwrap_or_default(),
  120    110   
        })
  121    111   
    }
  122    112   
}
  123    113   
  124         -
/// Error type for the `AttemptCapturingPokemonEventError` operation.
         114  +
/// Error type for the `CapturePokemonEventsError` operation.
  125    115   
#[non_exhaustive]
  126    116   
#[derive(::std::fmt::Debug)]
  127         -
pub enum AttemptCapturingPokemonEventError {
         117  +
pub enum CapturePokemonEventsError {
  128    118   
    #[allow(missing_docs)] // documentation missing in model
  129         -
    MasterBallUnsuccessful(crate::types::error::MasterBallUnsuccessful),
         119  +
    InvalidPokeballError(crate::types::error::InvalidPokeballError),
         120  +
    #[allow(missing_docs)] // documentation missing in model
         121  +
    ThrottlingError(crate::types::error::ThrottlingError),
  130    122   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  131    123   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  132    124   
    variable wildcard pattern and check `.code()`:
  133    125   
     \
  134    126   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  135    127   
     \
  136         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AttemptCapturingPokemonEventError) for what information is available for the error.")]
         128  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CapturePokemonEventsError) for what information is available for the error.")]
  137    129   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  138    130   
}
  139         -
impl AttemptCapturingPokemonEventError {
  140         -
    /// Creates the `AttemptCapturingPokemonEventError::Unhandled` variant from any error type.
         131  +
impl CapturePokemonEventsError {
         132  +
    /// Creates the `CapturePokemonEventsError::Unhandled` variant from any error type.
  141    133   
    pub fn unhandled(
  142    134   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  143    135   
    ) -> Self {
  144    136   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  145    137   
            source: err.into(),
  146    138   
            meta: ::std::default::Default::default(),
  147    139   
        })
  148    140   
    }
  149    141   
  150         -
    /// Creates the `AttemptCapturingPokemonEventError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         142  +
    /// Creates the `CapturePokemonEventsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  151    143   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  152    144   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  153    145   
            source: err.clone().into(),
  154    146   
            meta: err,
  155    147   
        })
  156    148   
    }
  157    149   
    ///
  158    150   
    /// Returns error metadata, which includes the error code, message,
  159    151   
    /// request ID, and potentially additional information.
  160    152   
    ///
  161    153   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  162    154   
        match self {
  163         -
            Self::MasterBallUnsuccessful(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         155  +
            Self::InvalidPokeballError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         156  +
            Self::ThrottlingError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  164    157   
            Self::Unhandled(e) => &e.meta,
  165    158   
        }
  166    159   
    }
  167         -
    /// Returns `true` if the error kind is `AttemptCapturingPokemonEventError::MasterBallUnsuccessful`.
  168         -
    pub fn is_master_ball_unsuccessful(&self) -> bool {
  169         -
        matches!(self, Self::MasterBallUnsuccessful(_))
         160  +
    /// Returns `true` if the error kind is `CapturePokemonEventsError::InvalidPokeballError`.
         161  +
    pub fn is_invalid_pokeball_error(&self) -> bool {
         162  +
        matches!(self, Self::InvalidPokeballError(_))
         163  +
    }
         164  +
    /// Returns `true` if the error kind is `CapturePokemonEventsError::ThrottlingError`.
         165  +
    pub fn is_throttling_error(&self) -> bool {
         166  +
        matches!(self, Self::ThrottlingError(_))
  170    167   
    }
  171    168   
}
  172         -
impl ::std::error::Error for AttemptCapturingPokemonEventError {
         169  +
impl ::std::error::Error for CapturePokemonEventsError {
  173    170   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  174    171   
        match self {
  175         -
            Self::MasterBallUnsuccessful(_inner) => ::std::option::Option::Some(_inner),
         172  +
            Self::InvalidPokeballError(_inner) => ::std::option::Option::Some(_inner),
         173  +
            Self::ThrottlingError(_inner) => ::std::option::Option::Some(_inner),
  176    174   
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  177    175   
        }
  178    176   
    }
  179    177   
}
  180         -
impl ::std::fmt::Display for AttemptCapturingPokemonEventError {
         178  +
impl ::std::fmt::Display for CapturePokemonEventsError {
  181    179   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  182    180   
        match self {
  183         -
            Self::MasterBallUnsuccessful(_inner) => _inner.fmt(f),
         181  +
            Self::InvalidPokeballError(_inner) => _inner.fmt(f),
         182  +
            Self::ThrottlingError(_inner) => _inner.fmt(f),
  184    183   
            Self::Unhandled(_inner) => {
  185    184   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  186    185   
                    write!(f, "unhandled error ({code})")
  187    186   
                } else {
  188    187   
                    f.write_str("unhandled error")
  189    188   
                }
  190    189   
            }
  191    190   
        }
  192    191   
    }
  193    192   
}
  194         -
impl ::aws_smithy_types::retry::ProvideErrorKind for AttemptCapturingPokemonEventError {
         193  +
impl ::aws_smithy_types::retry::ProvideErrorKind for CapturePokemonEventsError {
  195    194   
    fn code(&self) -> ::std::option::Option<&str> {
  196    195   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  197    196   
    }
  198    197   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  199    198   
        ::std::option::Option::None
  200    199   
    }
  201    200   
}
  202         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AttemptCapturingPokemonEventError {
         201  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CapturePokemonEventsError {
  203    202   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  204    203   
        match self {
  205         -
            Self::MasterBallUnsuccessful(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         204  +
            Self::InvalidPokeballError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         205  +
            Self::ThrottlingError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  206    206   
            Self::Unhandled(_inner) => &_inner.meta,
  207    207   
        }
  208    208   
    }
  209    209   
}
  210         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AttemptCapturingPokemonEventError {
         210  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CapturePokemonEventsError {
  211    211   
    fn create_unhandled_error(
  212    212   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  213    213   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  214    214   
    ) -> Self {
  215    215   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  216    216   
            source,
  217    217   
            meta: meta.unwrap_or_default(),
  218    218   
        })
  219    219   
    }
  220    220   
}

tmp-codegen-diff/codegen-client-test/pokemon-service-client/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +0,14 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::types::error::_validation_exception::ValidationErrorBuilder;
    3         -
    4         -
pub use crate::types::error::_storage_access_not_authorized::StorageAccessNotAuthorizedBuilder;
           2  +
pub use crate::types::error::_unsupported_region_error::UnsupportedRegionErrorBuilder;
    5      3   
    6         -
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder;
           4  +
pub use crate::types::error::_throttling_error::ThrottlingErrorBuilder;
    7      5   
    8         -
pub use crate::types::error::_invalid_pokeball_error::InvalidPokeballErrorBuilder;
           6  +
pub use crate::types::error::_validation_exception::ValidationErrorBuilder;
    9      7   
   10      8   
pub use crate::types::error::_master_ball_unsuccessful::MasterBallUnsuccessfulBuilder;
   11      9   
   12         -
pub use crate::types::error::_throttling_error::ThrottlingErrorBuilder;
          10  +
pub use crate::types::error::_invalid_pokeball_error::InvalidPokeballErrorBuilder;
   13     11   
   14         -
pub use crate::types::error::_unsupported_region_error::UnsupportedRegionErrorBuilder;
          12  +
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder;
          13  +
          14  +
pub use crate::types::error::_storage_access_not_authorized::StorageAccessNotAuthorizedBuilder;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation.rs

@@ -332,332 +371,371 @@
  352    352   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  353    353   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  354    354   
    ) -> Self {
  355    355   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  356    356   
            source,
  357    357   
            meta: meta.unwrap_or_default(),
  358    358   
        })
  359    359   
    }
  360    360   
}
  361    361   
  362         -
pub use crate::operation::operation::_operation_output::OperationOutput;
  363         -
  364    362   
pub use crate::operation::operation::_operation_input::OperationInput;
  365    363   
         364  +
pub use crate::operation::operation::_operation_output::OperationOutput;
         365  +
  366    366   
mod _operation_input;
  367    367   
  368    368   
mod _operation_output;
  369    369   
  370    370   
/// Builders
  371    371   
pub mod builders;

tmp-codegen-diff/codegen-client-test/query-compat-test/rust-client-codegen/src/operation/operation/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::operation::_operation_output::OperationOutputBuilder;
    3         -
    4      2   
pub use crate::operation::operation::_operation_input::OperationInputBuilder;
    5      3   
           4  +
pub use crate::operation::operation::_operation_output::OperationOutputBuilder;
           5  +
    6      6   
impl crate::operation::operation::builders::OperationInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::operation::OperationOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::operation::OperationError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/Cargo.toml

@@ -1,1 +47,50 @@
    6      6   
description = "test"
    7      7   
edition = "2021"
    8      8   
    9      9   
[package.metadata.smithy]
   10     10   
codegen-version = "ci"
   11     11   
protocol = "aws.protocols#restJson1"
   12     12   
[dependencies.aws-smithy-async]
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-async"
   14     14   
[dependencies.aws-smithy-compression]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-compression"
          16  +
[dependencies.aws-smithy-eventstream]
          17  +
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-eventstream"
   16     18   
[dependencies.aws-smithy-http]
   17     19   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
          20  +
features = ["event-stream"]
   18     21   
[dependencies.aws-smithy-json]
   19     22   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   20     23   
[dependencies.aws-smithy-runtime]
   21     24   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime"
   22     25   
features = ["client"]
   23     26   
[dependencies.aws-smithy-runtime-api]
   24     27   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
   25     28   
features = ["client", "http-1x"]
   26     29   
[dependencies.aws-smithy-types]
   27     30   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/client.rs

@@ -120,120 +227,239 @@
  140    140   
pub mod customize;
  141    141   
  142    142   
mod datetime_offsets;
  143    143   
  144    144   
mod document_type;
  145    145   
  146    146   
mod document_type_as_map_value;
  147    147   
  148    148   
mod document_type_as_payload;
  149    149   
         150  +
mod duplex_stream;
         151  +
         152  +
mod duplex_stream_with_distinct_streams;
         153  +
         154  +
mod duplex_stream_with_initial_messages;
         155  +
  150    156   
mod empty_input_and_empty_output;
  151    157   
  152    158   
mod endpoint_operation;
  153    159   
  154    160   
mod endpoint_with_host_label_operation;
  155    161   
  156    162   
mod fractional_seconds;
  157    163   
  158    164   
mod greeting_with_errors;
  159    165   
  160    166   
mod host_with_path_operation;
  161    167   
  162    168   
mod http_checksum_required;
  163    169   
  164    170   
mod http_empty_prefix_headers;
  165    171   
  166    172   
mod http_enum_payload;
  167    173   
  168    174   
mod http_payload_traits;
  169    175   
  170    176   
mod http_payload_traits_with_media_type;
  171    177   
  172    178   
mod http_payload_with_structure;
  173    179   
  174    180   
mod http_payload_with_union;
  175    181   
  176    182   
mod http_prefix_headers;
  177    183   
  178    184   
mod http_prefix_headers_in_response;
  179    185   
         186  +
mod http_query_params_only_operation;
         187  +
  180    188   
mod http_request_with_float_labels;
  181    189   
  182    190   
mod http_request_with_greedy_label_in_path;
  183    191   
  184    192   
mod http_request_with_labels;
  185    193   
  186    194   
mod http_request_with_labels_and_timestamp_format;
  187    195   
  188    196   
mod http_request_with_regex_literal;
  189    197   
  190    198   
mod http_response_code;
  191    199   
  192    200   
mod http_string_payload;
  193    201   
  194    202   
mod ignore_query_params_in_response;
  195    203   
  196    204   
mod input_and_output_with_headers;
  197    205   
         206  +
mod input_stream;
         207  +
         208  +
mod input_stream_with_initial_request;
         209  +
  198    210   
mod json_blobs;
  199    211   
  200    212   
mod json_enums;
  201    213   
  202    214   
mod json_int_enums;
  203    215   
  204    216   
mod json_lists;
  205    217   
  206    218   
mod json_maps;
  207    219   
@@ -266,278 +325,341 @@
  286    298   
mod null_and_empty_headers_server;
  287    299   
  288    300   
mod omits_null_serializes_empty_string;
  289    301   
  290    302   
mod omits_serializing_empty_lists;
  291    303   
  292    304   
mod operation_with_defaults;
  293    305   
  294    306   
mod operation_with_nested_structure;
  295    307   
         308  +
mod output_stream;
         309  +
         310  +
mod output_stream_with_initial_response;
         311  +
  296    312   
mod post_player_action;
  297    313   
  298    314   
mod post_union_with_json_name;
  299    315   
  300    316   
mod put_with_content_encoding;
  301    317   
  302    318   
mod query_idempotency_token_auto_fill;
  303    319   
  304    320   
mod query_params_as_string_list_map;
  305    321   

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/client/duplex_stream.rs

@@ -0,1 +0,13 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`DuplexStream`](crate::operation::duplex_stream::builders::DuplexStreamFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream::builders::DuplexStreamFluentBuilder::stream) / [`set_stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream::builders::DuplexStreamFluentBuilder::set_stream):<br>required: **false**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`DuplexStreamOutput`](crate::operation::duplex_stream::DuplexStreamOutput) with field(s):
           8  +
    ///   - [`stream(EventReceiver<EventStream, EventStreamError>)`](crate::operation::duplex_stream::DuplexStreamOutput::stream): (undocumented)
           9  +
    /// - On failure, responds with [`SdkError<DuplexStreamError>`](crate::operation::duplex_stream::DuplexStreamError)
          10  +
    pub fn duplex_stream(&self) -> crate::operation::duplex_stream::builders::DuplexStreamFluentBuilder {
          11  +
        crate::operation::duplex_stream::builders::DuplexStreamFluentBuilder::new(self.handle.clone())
          12  +
    }
          13  +
}