AWS SDK

AWS SDK

rev. 32b1b3c3761061baed26023be3219639e42d7d12 (ignoring whitespace)

Files changed:

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_bidirectional_stream/_invoke_model_with_bidirectional_stream_input.rs

@@ -11,11 +147,160 @@
   31     31   
    "com.amazonaws.bedrockruntime.synthetic",
   32     32   
    "InvokeModelWithBidirectionalStreamInput",
   33     33   
);
   34     34   
static INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_MODEL_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   35     35   
    ::aws_smithy_schema::ShapeId::from_static(
   36     36   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithBidirectionalStreamInput$modelId",
   37     37   
        "com.amazonaws.bedrockruntime.synthetic",
   38     38   
        "InvokeModelWithBidirectionalStreamInput",
   39     39   
    ),
   40     40   
    ::aws_smithy_schema::ShapeType::String,
   41         -
    "model_id",
          41  +
    "modelId",
   42     42   
    0,
   43     43   
)
   44     44   
.with_http_label();
   45     45   
static INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_BODY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithBidirectionalStreamInput$body",
   48     48   
        "com.amazonaws.bedrockruntime.synthetic",
   49     49   
        "InvokeModelWithBidirectionalStreamInput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::Union,
   52     52   
    "body",
   53     53   
    1,
   54     54   
)
   55     55   
.with_http_payload();
   56     56   
static INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   57     57   
    INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_SCHEMA_ID,
   58     58   
    ::aws_smithy_schema::ShapeType::Structure,
   59     59   
    &[
   60     60   
        &INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_MODEL_ID,
   61     61   
        &INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_BODY,
   62     62   
    ],
   63         -
);
          63  +
)
          64  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
          65  +
    "POST",
          66  +
    "/model/{modelId}/invoke-with-bidirectional-stream",
          67  +
    None,
          68  +
));
   64     69   
impl InvokeModelWithBidirectionalStreamInput {
   65     70   
    /// The schema for this shape.
   66     71   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_SCHEMA;
   67     72   
}
   68     73   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeModelWithBidirectionalStreamInput {
   69     74   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   70     75   
    fn serialize_members(
   71     76   
        &self,
   72     77   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   73     78   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   74     79   
        if let Some(ref val) = self.model_id {
   75     80   
            ser.write_string(&INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_MODEL_ID, val)?;
   76     81   
        }
   77         -
        {
   78         -
            let val = &self.body;
   79         -
            ser.write_null(&INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_MEMBER_BODY)?;
   80         -
        }
   81     82   
        Ok(())
   82     83   
    }
   83     84   
}
   84     85   
impl InvokeModelWithBidirectionalStreamInput {
   85     86   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   86         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   87         -
        deserializer: &mut D,
          87  +
    pub fn deserialize(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   88     89   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   89     90   
        #[allow(unused_variables, unused_mut)]
   90     91   
        let mut builder = Self::builder();
   91     92   
        #[allow(
   92     93   
            unused_variables,
   93     94   
            unreachable_code,
   94     95   
            clippy::single_match,
   95     96   
            clippy::match_single_binding,
   96     97   
            clippy::diverging_sub_expression
   97     98   
        )]
   98         -
        deserializer.read_struct(&INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_SCHEMA, (), |_, member, deser| {
          99  +
        deserializer.read_struct(&INVOKEMODELWITHBIDIRECTIONALSTREAMINPUT_SCHEMA, &mut |member, deser| {
   99    100   
            match member.member_index() {
  100    101   
                Some(0) => {
  101    102   
                    builder.model_id = Some(deser.read_string(member)?);
  102    103   
                }
  103    104   
                Some(1) => {
  104    105   
                    builder.body = Some({
  105    106   
                        let _ = member;
  106         -
                        todo!("deserialize aggregate")
         107  +
                        todo!("deserialize streaming union")
  107    108   
                    });
  108    109   
                }
  109    110   
                _ => {}
  110    111   
            }
  111    112   
            Ok(())
  112    113   
        })?;
         114  +
        builder.model_id = builder.model_id.or(Some(String::new()));
  113    115   
        builder
  114    116   
            .build()
  115    117   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  116    118   
    }
  117    119   
}
         120  +
impl InvokeModelWithBidirectionalStreamInput {
         121  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         122  +
    pub fn deserialize_with_response(
         123  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         124  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         125  +
        _status: u16,
         126  +
        _body: &[u8],
         127  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         128  +
        Self::deserialize(deserializer)
         129  +
    }
         130  +
}
  118    131   
impl InvokeModelWithBidirectionalStreamInput {
  119    132   
    /// Creates a new builder-style object to manufacture [`InvokeModelWithBidirectionalStreamInput`](crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamInput).
  120    133   
    pub fn builder() -> crate::operation::invoke_model_with_bidirectional_stream::builders::InvokeModelWithBidirectionalStreamInputBuilder {
  121    134   
        crate::operation::invoke_model_with_bidirectional_stream::builders::InvokeModelWithBidirectionalStreamInputBuilder::default()
  122    135   
    }
  123    136   
}
  124    137   
  125    138   
/// A builder for [`InvokeModelWithBidirectionalStreamInput`](crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamInput).
  126    139   
#[derive(::std::default::Default, ::std::fmt::Debug)]
  127    140   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_bidirectional_stream/_invoke_model_with_bidirectional_stream_output.rs

@@ -10,10 +111,159 @@
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithBidirectionalStreamOutput$body",
   32     32   
        "com.amazonaws.bedrockruntime.synthetic",
   33     33   
        "InvokeModelWithBidirectionalStreamOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::Union,
   36     36   
    "body",
   37     37   
    0,
   38     38   
)
   39     39   
.with_http_payload();
          40  +
static INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          41  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          42  +
    ::aws_smithy_schema::ShapeType::String,
          43  +
    "request_id",
          44  +
    1,
          45  +
)
          46  +
.with_http_header("x-amzn-requestid");
   40     47   
static INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   41     48   
    INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA_ID,
   42     49   
    ::aws_smithy_schema::ShapeType::Structure,
   43         -
    &[&INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_MEMBER_BODY],
          50  +
    &[
          51  +
        &INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_MEMBER_BODY,
          52  +
        &INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_MEMBER__REQUEST_ID,
          53  +
    ],
   44     54   
);
   45     55   
impl InvokeModelWithBidirectionalStreamOutput {
   46     56   
    /// The schema for this shape.
   47     57   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA;
   48     58   
}
   49     59   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeModelWithBidirectionalStreamOutput {
   50     60   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   51     61   
    fn serialize_members(
   52     62   
        &self,
   53     63   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   54     64   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   55         -
        {
   56         -
            let val = &self.body;
   57         -
            ser.write_null(&INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_MEMBER_BODY)?;
   58         -
        }
   59     65   
        Ok(())
   60     66   
    }
   61     67   
}
   62     68   
impl InvokeModelWithBidirectionalStreamOutput {
   63     69   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   64         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   65         -
        deserializer: &mut D,
          70  +
    pub fn deserialize(
          71  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          72  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          73  +
        #[allow(unused_variables, unused_mut)]
          74  +
        let mut builder = Self::builder();
          75  +
        #[allow(
          76  +
            unused_variables,
          77  +
            unreachable_code,
          78  +
            clippy::single_match,
          79  +
            clippy::match_single_binding,
          80  +
            clippy::diverging_sub_expression
          81  +
        )]
          82  +
        deserializer.read_struct(&INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA, &mut |member, deser| {
          83  +
            match member.member_index() {
          84  +
                Some(0) => {
          85  +
                    builder.body = Some({
          86  +
                        let _ = member;
          87  +
                        todo!("deserialize streaming union")
          88  +
                    });
          89  +
                }
          90  +
                Some(1) => {
          91  +
                    builder._request_id = Some(deser.read_string(member)?);
          92  +
                }
          93  +
                _ => {}
          94  +
            }
          95  +
            Ok(())
          96  +
        })?;
          97  +
        builder
          98  +
            .build()
          99  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         100  +
    }
         101  +
}
         102  +
impl InvokeModelWithBidirectionalStreamOutput {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         104  +
    /// Header-bound members are read directly from headers, avoiding runtime
         105  +
    /// member iteration overhead. Body members are read via the deserializer.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
   66    111   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   67    112   
        #[allow(unused_variables, unused_mut)]
   68    113   
        let mut builder = Self::builder();
         114  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         115  +
            builder._request_id = Some(val.to_string());
         116  +
        }
   69    117   
        #[allow(
   70    118   
            unused_variables,
   71    119   
            unreachable_code,
   72    120   
            clippy::single_match,
   73    121   
            clippy::match_single_binding,
   74    122   
            clippy::diverging_sub_expression
   75    123   
        )]
   76         -
        deserializer.read_struct(&INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
         124  +
        deserializer.read_struct(&INVOKEMODELWITHBIDIRECTIONALSTREAMOUTPUT_SCHEMA, &mut |member, deser| {
   77    125   
            match member.member_index() {
   78    126   
                Some(0) => {
   79    127   
                    builder.body = Some({
   80    128   
                        let _ = member;
   81         -
                        todo!("deserialize aggregate")
         129  +
                        todo!("deserialize streaming union")
   82    130   
                    });
   83    131   
                }
   84    132   
                _ => {}
   85    133   
            }
   86    134   
            Ok(())
   87    135   
        })?;
   88    136   
        builder
   89    137   
            .build()
   90    138   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   91    139   
    }

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_response_stream.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `InvokeModelWithResponseStream`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InvokeModelWithResponseStream;
    6      6   
impl InvokeModelWithResponseStream {
    7      7   
    /// Creates a new `InvokeModelWithResponseStream`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          13  +
        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -141,147 +275,602 @@
  161    167   
  162    168   
        // If this is an error, defer to the non-streaming parser
  163    169   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  164    170   
            return ::std::option::Option::None;
  165    171   
        }
  166    172   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  167    173   
            crate::protocol_serde::shape_invoke_model_with_response_stream::de_invoke_model_with_response_stream_http_response(response),
  168    174   
        ))
  169    175   
    }
  170    176   
  171         -
    fn deserialize_nonstreaming(
         177  +
    fn deserialize_nonstreaming_with_config(
  172    178   
        &self,
  173    179   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         180  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  174    181   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  175    182   
        // For streaming operations, we only hit this case if its an error
  176    183   
        let body = response.body().bytes().expect("body loaded");
  177         -
        crate::protocol_serde::type_erase_result(
  178         -
            crate::protocol_serde::shape_invoke_model_with_response_stream::de_invoke_model_with_response_stream_http_error(
  179         -
                response.status().as_u16(),
         184  +
        let status = response.status().as_u16();
         185  +
        let headers = response.headers();
         186  +
        #[allow(unused_mut)]
         187  +
        let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         188  +
            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         189  +
        })?;
         190  +
        generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         191  +
        let generic = generic_builder.build();
         192  +
        let error_code = match generic.code() {
         193  +
            ::std::option::Option::Some(code) => code,
         194  +
            ::std::option::Option::None => {
         195  +
                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         196  +
                    ::aws_smithy_runtime_api::box_error::BoxError::from(
         197  +
                        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled(generic),
         198  +
                    ),
         199  +
                ))
         200  +
            }
         201  +
        };
         202  +
        let _error_message = generic.message().map(|msg| msg.to_owned());
         203  +
        let protocol = _cfg
         204  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         205  +
            .expect("a SharedClientProtocol is required");
         206  +
        let err = match error_code {
         207  +
            "AccessDeniedException" => {
         208  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::AccessDeniedException({
         209  +
                    let mut tmp = match protocol
         210  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         211  +
                        .and_then(|mut deser| {
         212  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         213  +
                                &mut *deser,
  180    214   
                                response.headers(),
         215  +
                                response.status().into(),
         216  +
                                body,
         217  +
                            )
         218  +
                        }) {
         219  +
                        ::std::result::Result::Ok(val) => val,
         220  +
                        ::std::result::Result::Err(e) => {
         221  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         222  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         223  +
                            ))
         224  +
                        }
         225  +
                    };
         226  +
                    tmp.meta = generic;
         227  +
                    if tmp.message.is_none() {
         228  +
                        tmp.message = _error_message;
         229  +
                    }
         230  +
                    tmp
         231  +
                })
         232  +
            }
         233  +
            "InternalServerException" => {
         234  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::InternalServerException({
         235  +
                    let mut tmp = match protocol
         236  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         237  +
                        .and_then(|mut deser| {
         238  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         239  +
                                &mut *deser,
         240  +
                                response.headers(),
         241  +
                                response.status().into(),
         242  +
                                body,
         243  +
                            )
         244  +
                        }) {
         245  +
                        ::std::result::Result::Ok(val) => val,
         246  +
                        ::std::result::Result::Err(e) => {
         247  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                            ))
         250  +
                        }
         251  +
                    };
         252  +
                    tmp.meta = generic;
         253  +
                    if tmp.message.is_none() {
         254  +
                        tmp.message = _error_message;
         255  +
                    }
         256  +
                    tmp
         257  +
                })
         258  +
            }
         259  +
            "ModelErrorException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelErrorException({
         260  +
                let mut tmp = match protocol
         261  +
                    .deserialize_response(response, crate::types::error::ModelErrorException::SCHEMA, _cfg)
         262  +
                    .and_then(|mut deser| {
         263  +
                        crate::types::error::ModelErrorException::deserialize_with_response(
         264  +
                            &mut *deser,
         265  +
                            response.headers(),
         266  +
                            response.status().into(),
         267  +
                            body,
         268  +
                        )
         269  +
                    }) {
         270  +
                    ::std::result::Result::Ok(val) => val,
         271  +
                    ::std::result::Result::Err(e) => {
         272  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         273  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         274  +
                        ))
         275  +
                    }
         276  +
                };
         277  +
                tmp.meta = generic;
         278  +
                if tmp.message.is_none() {
         279  +
                    tmp.message = _error_message;
         280  +
                }
         281  +
                tmp
         282  +
            }),
         283  +
            "ModelNotReadyException" => {
         284  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelNotReadyException({
         285  +
                    let mut tmp = match protocol
         286  +
                        .deserialize_response(response, crate::types::error::ModelNotReadyException::SCHEMA, _cfg)
         287  +
                        .and_then(|mut deser| {
         288  +
                            crate::types::error::ModelNotReadyException::deserialize_with_response(
         289  +
                                &mut *deser,
         290  +
                                response.headers(),
         291  +
                                response.status().into(),
         292  +
                                body,
         293  +
                            )
         294  +
                        }) {
         295  +
                        ::std::result::Result::Ok(val) => val,
         296  +
                        ::std::result::Result::Err(e) => {
         297  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         298  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         299  +
                            ))
         300  +
                        }
         301  +
                    };
         302  +
                    tmp.meta = generic;
         303  +
                    if tmp.message.is_none() {
         304  +
                        tmp.message = _error_message;
         305  +
                    }
         306  +
                    tmp
         307  +
                })
         308  +
            }
         309  +
            "ModelStreamErrorException" => {
         310  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelStreamErrorException({
         311  +
                    let mut tmp = match protocol
         312  +
                        .deserialize_response(response, crate::types::error::ModelStreamErrorException::SCHEMA, _cfg)
         313  +
                        .and_then(|mut deser| {
         314  +
                            crate::types::error::ModelStreamErrorException::deserialize_with_response(
         315  +
                                &mut *deser,
         316  +
                                response.headers(),
         317  +
                                response.status().into(),
         318  +
                                body,
         319  +
                            )
         320  +
                        }) {
         321  +
                        ::std::result::Result::Ok(val) => val,
         322  +
                        ::std::result::Result::Err(e) => {
         323  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         324  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         325  +
                            ))
         326  +
                        }
         327  +
                    };
         328  +
                    tmp.meta = generic;
         329  +
                    if tmp.message.is_none() {
         330  +
                        tmp.message = _error_message;
         331  +
                    }
         332  +
                    tmp
         333  +
                })
         334  +
            }
         335  +
            "ModelTimeoutException" => {
         336  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelTimeoutException({
         337  +
                    let mut tmp = match protocol
         338  +
                        .deserialize_response(response, crate::types::error::ModelTimeoutException::SCHEMA, _cfg)
         339  +
                        .and_then(|mut deser| {
         340  +
                            crate::types::error::ModelTimeoutException::deserialize_with_response(
         341  +
                                &mut *deser,
         342  +
                                response.headers(),
         343  +
                                response.status().into(),
         344  +
                                body,
         345  +
                            )
         346  +
                        }) {
         347  +
                        ::std::result::Result::Ok(val) => val,
         348  +
                        ::std::result::Result::Err(e) => {
         349  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         350  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         351  +
                            ))
         352  +
                        }
         353  +
                    };
         354  +
                    tmp.meta = generic;
         355  +
                    if tmp.message.is_none() {
         356  +
                        tmp.message = _error_message;
         357  +
                    }
         358  +
                    tmp
         359  +
                })
         360  +
            }
         361  +
            "ResourceNotFoundException" => {
         362  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ResourceNotFoundException({
         363  +
                    let mut tmp = match protocol
         364  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         365  +
                        .and_then(|mut deser| {
         366  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         367  +
                                &mut *deser,
         368  +
                                response.headers(),
         369  +
                                response.status().into(),
  181    370   
                                body,
  182         -
            ),
  183    371   
                            )
         372  +
                        }) {
         373  +
                        ::std::result::Result::Ok(val) => val,
         374  +
                        ::std::result::Result::Err(e) => {
         375  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         376  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         377  +
                            ))
         378  +
                        }
         379  +
                    };
         380  +
                    tmp.meta = generic;
         381  +
                    if tmp.message.is_none() {
         382  +
                        tmp.message = _error_message;
         383  +
                    }
         384  +
                    tmp
         385  +
                })
         386  +
            }
         387  +
            "ServiceQuotaExceededException" => {
         388  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ServiceQuotaExceededException({
         389  +
                    let mut tmp = match protocol
         390  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         391  +
                        .and_then(|mut deser| {
         392  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         393  +
                                &mut *deser,
         394  +
                                response.headers(),
         395  +
                                response.status().into(),
         396  +
                                body,
         397  +
                            )
         398  +
                        }) {
         399  +
                        ::std::result::Result::Ok(val) => val,
         400  +
                        ::std::result::Result::Err(e) => {
         401  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         402  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         403  +
                            ))
         404  +
                        }
         405  +
                    };
         406  +
                    tmp.meta = generic;
         407  +
                    if tmp.message.is_none() {
         408  +
                        tmp.message = _error_message;
         409  +
                    }
         410  +
                    tmp
         411  +
                })
         412  +
            }
         413  +
            "ServiceUnavailableException" => {
         414  +
                crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ServiceUnavailableException({
         415  +
                    let mut tmp = match protocol
         416  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         417  +
                        .and_then(|mut deser| {
         418  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         419  +
                                &mut *deser,
         420  +
                                response.headers(),
         421  +
                                response.status().into(),
         422  +
                                body,
         423  +
                            )
         424  +
                        }) {
         425  +
                        ::std::result::Result::Ok(val) => val,
         426  +
                        ::std::result::Result::Err(e) => {
         427  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         428  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         429  +
                            ))
         430  +
                        }
         431  +
                    };
         432  +
                    tmp.meta = generic;
         433  +
                    if tmp.message.is_none() {
         434  +
                        tmp.message = _error_message;
         435  +
                    }
         436  +
                    tmp
         437  +
                })
         438  +
            }
         439  +
            "ThrottlingException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ThrottlingException({
         440  +
                let mut tmp = match protocol
         441  +
                    .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         442  +
                    .and_then(|mut deser| {
         443  +
                        crate::types::error::ThrottlingException::deserialize_with_response(
         444  +
                            &mut *deser,
         445  +
                            response.headers(),
         446  +
                            response.status().into(),
         447  +
                            body,
         448  +
                        )
         449  +
                    }) {
         450  +
                    ::std::result::Result::Ok(val) => val,
         451  +
                    ::std::result::Result::Err(e) => {
         452  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         453  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         454  +
                        ))
         455  +
                    }
         456  +
                };
         457  +
                tmp.meta = generic;
         458  +
                if tmp.message.is_none() {
         459  +
                    tmp.message = _error_message;
         460  +
                }
         461  +
                tmp
         462  +
            }),
         463  +
            "ValidationException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ValidationException({
         464  +
                let mut tmp = match protocol
         465  +
                    .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         466  +
                    .and_then(|mut deser| {
         467  +
                        crate::types::error::ValidationException::deserialize_with_response(
         468  +
                            &mut *deser,
         469  +
                            response.headers(),
         470  +
                            response.status().into(),
         471  +
                            body,
         472  +
                        )
         473  +
                    }) {
         474  +
                    ::std::result::Result::Ok(val) => val,
         475  +
                    ::std::result::Result::Err(e) => {
         476  +
                        return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         477  +
                            ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         478  +
                        ))
         479  +
                    }
         480  +
                };
         481  +
                tmp.meta = generic;
         482  +
                if tmp.message.is_none() {
         483  +
                    tmp.message = _error_message;
         484  +
                }
         485  +
                tmp
         486  +
            }),
         487  +
            _ => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::generic(generic),
         488  +
        };
         489  +
        ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         490  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         491  +
        ))
  184    492   
    }
  185    493   
}
  186    494   
#[derive(Debug)]
  187    495   
struct InvokeModelWithResponseStreamRequestSerializer;
  188    496   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeModelWithResponseStreamRequestSerializer {
  189    497   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  190    498   
    fn serialize_input(
  191    499   
        &self,
  192    500   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  193    501   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  194    502   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  195    503   
        let input = input
  196    504   
            .downcast::<crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput>()
  197    505   
            .expect("correct type");
  198         -
        let _header_serialization_settings = _cfg
  199         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  200         -
            .cloned()
  201         -
            .unwrap_or_default();
  202         -
        let mut request_builder = {
  203         -
            #[allow(clippy::uninlined_format_args)]
  204         -
            fn uri_base(
  205         -
                _input: &crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput,
  206         -
                output: &mut ::std::string::String,
  207         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  208         -
                use ::std::fmt::Write as _;
  209         -
                let input_1 = &_input.model_id;
  210         -
                let input_1 = input_1
  211         -
                    .as_ref()
  212         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("model_id", "cannot be empty or unset"))?;
  213         -
                let model_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  214         -
                if model_id.is_empty() {
  215         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  216         -
                        "model_id",
  217         -
                        "cannot be empty or unset",
  218         -
                    ));
         506  +
        let protocol = _cfg
         507  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         508  +
            .expect("a SharedClientProtocol is required");
         509  +
        if protocol.supports_http_bindings() {
         510  +
            let mut input = input;
         511  +
            let payload = input.body.take();
         512  +
            let mut request = protocol
         513  +
                .serialize_body(&input, InvokeModelWithResponseStream::INPUT_SCHEMA, "", _cfg)
         514  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         515  +
            if let ::std::option::Option::Some(payload) = payload {
         516  +
                *request.body_mut() = ::aws_smithy_types::body::SdkBody::from(payload.into_inner());
         517  +
                request.headers_mut().insert("Content-Type", "application/octet-stream");
         518  +
                if let ::std::option::Option::Some(content_length) = request.body().content_length() {
         519  +
                    request.headers_mut().insert("Content-Length", content_length.to_string());
         520  +
                }
         521  +
            }
         522  +
            {
         523  +
                let mut uri = "/model/{modelId}/invoke-with-response-stream".to_string();
         524  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         525  +
                if let Some(ref val) = input.content_type {
         526  +
                    request.headers_mut().insert("Content-Type", val.to_string());
         527  +
                }
         528  +
                if let Some(ref val) = input.accept {
         529  +
                    request.headers_mut().insert("X-Amzn-Bedrock-Accept", val.to_string());
         530  +
                }
         531  +
                if let Some(ref val) = input.model_id {
         532  +
                    uri = uri.replace("{modelId}", &::aws_smithy_schema::http_protocol::percent_encode(&val.to_string()));
         533  +
                }
         534  +
                if let Some(ref val) = input.trace {
         535  +
                    request.headers_mut().insert("X-Amzn-Bedrock-Trace", val.as_str().to_string());
         536  +
                }
         537  +
                if let Some(ref val) = input.guardrail_identifier {
         538  +
                    request.headers_mut().insert("X-Amzn-Bedrock-GuardrailIdentifier", val.to_string());
         539  +
                }
         540  +
                if let Some(ref val) = input.guardrail_version {
         541  +
                    request.headers_mut().insert("X-Amzn-Bedrock-GuardrailVersion", val.to_string());
         542  +
                }
         543  +
                if let Some(ref val) = input.performance_config_latency {
         544  +
                    request
         545  +
                        .headers_mut()
         546  +
                        .insert("X-Amzn-Bedrock-PerformanceConfig-Latency", val.as_str().to_string());
         547  +
                }
         548  +
                if !query_params.is_empty() {
         549  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         550  +
                    let pairs: Vec<String> = query_params
         551  +
                        .iter()
         552  +
                        .map(|(k, v)| {
         553  +
                            format!(
         554  +
                                "{}={}",
         555  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         556  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         557  +
                            )
         558  +
                        })
         559  +
                        .collect();
         560  +
                    uri.push_str(&pairs.join("&"));
  219    561   
                }
  220         -
                ::std::write!(output, "/model/{modelId}/invoke-with-response-stream", modelId = model_id).expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
         562  +
                request.set_uri(uri.as_str()).expect("valid URI");
         563  +
            }
         564  +
         565  +
            return ::std::result::Result::Ok(request);
         566  +
        } else {
         567  +
            let mut request = protocol
         568  +
                .serialize_request(&input, InvokeModelWithResponseStream::INPUT_SCHEMA, "", _cfg)
         569  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         570  +
         571  +
            return ::std::result::Result::Ok(request);
  222    572   
        }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput,
  226         -
                builder: ::http_1x::request::Builder,
  227         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  228         -
                let mut uri = ::std::string::String::new();
  229         -
                uri_base(input, &mut uri)?;
  230         -
                let builder =
  231         -
                    crate::protocol_serde::shape_invoke_model_with_response_stream::ser_invoke_model_with_response_stream_headers(input, builder)?;
  232         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  233         -
            }
  234         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  235         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
  236         -
            builder
  237         -
        };
  238         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  239         -
            crate::protocol_serde::shape_invoke_model_with_response_stream_input::ser_body_http_payload(input.body)?,
  240         -
        );
  241         -
        if let Some(content_length) = body.content_length() {
  242         -
            let content_length = content_length.to_string();
  243         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  244         -
        }
  245         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  246    573   
    }
  247    574   
}
  248    575   
#[derive(Debug)]
  249    576   
struct InvokeModelWithResponseStreamEndpointParamsInterceptor;
  250    577   
  251    578   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeModelWithResponseStreamEndpointParamsInterceptor {
  252    579   
    fn name(&self) -> &'static str {
  253    580   
        "InvokeModelWithResponseStreamEndpointParamsInterceptor"
  254    581   
    }
  255    582   

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_response_stream/_invoke_model_with_response_stream_input.rs

@@ -108,108 +332,376 @@
  128    128   
    0,
  129    129   
)
  130    130   
.with_http_payload();
  131    131   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_CONTENT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  132    132   
    ::aws_smithy_schema::ShapeId::from_static(
  133    133   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$contentType",
  134    134   
        "com.amazonaws.bedrockruntime.synthetic",
  135    135   
        "InvokeModelWithResponseStreamInput",
  136    136   
    ),
  137    137   
    ::aws_smithy_schema::ShapeType::String,
  138         -
    "content_type",
         138  +
    "contentType",
  139    139   
    1,
  140    140   
)
  141    141   
.with_http_header("Content-Type");
  142    142   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_ACCEPT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  143    143   
    ::aws_smithy_schema::ShapeId::from_static(
  144    144   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$accept",
  145    145   
        "com.amazonaws.bedrockruntime.synthetic",
  146    146   
        "InvokeModelWithResponseStreamInput",
  147    147   
    ),
  148    148   
    ::aws_smithy_schema::ShapeType::String,
  149    149   
    "accept",
  150    150   
    2,
  151    151   
)
  152    152   
.with_http_header("X-Amzn-Bedrock-Accept");
  153    153   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_MODEL_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  154    154   
    ::aws_smithy_schema::ShapeId::from_static(
  155    155   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$modelId",
  156    156   
        "com.amazonaws.bedrockruntime.synthetic",
  157    157   
        "InvokeModelWithResponseStreamInput",
  158    158   
    ),
  159    159   
    ::aws_smithy_schema::ShapeType::String,
  160         -
    "model_id",
         160  +
    "modelId",
  161    161   
    3,
  162    162   
)
  163    163   
.with_http_label();
  164    164   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_TRACE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  165    165   
    ::aws_smithy_schema::ShapeId::from_static(
  166    166   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$trace",
  167    167   
        "com.amazonaws.bedrockruntime.synthetic",
  168    168   
        "InvokeModelWithResponseStreamInput",
  169    169   
    ),
  170    170   
    ::aws_smithy_schema::ShapeType::String,
  171    171   
    "trace",
  172    172   
    4,
  173    173   
)
  174    174   
.with_http_header("X-Amzn-Bedrock-Trace");
  175    175   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_IDENTIFIER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  176    176   
    ::aws_smithy_schema::ShapeId::from_static(
  177    177   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$guardrailIdentifier",
  178    178   
        "com.amazonaws.bedrockruntime.synthetic",
  179    179   
        "InvokeModelWithResponseStreamInput",
  180    180   
    ),
  181    181   
    ::aws_smithy_schema::ShapeType::String,
  182         -
    "guardrail_identifier",
         182  +
    "guardrailIdentifier",
  183    183   
    5,
  184    184   
)
  185    185   
.with_http_header("X-Amzn-Bedrock-GuardrailIdentifier");
  186    186   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_VERSION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  187    187   
    ::aws_smithy_schema::ShapeId::from_static(
  188    188   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$guardrailVersion",
  189    189   
        "com.amazonaws.bedrockruntime.synthetic",
  190    190   
        "InvokeModelWithResponseStreamInput",
  191    191   
    ),
  192    192   
    ::aws_smithy_schema::ShapeType::String,
  193         -
    "guardrail_version",
         193  +
    "guardrailVersion",
  194    194   
    6,
  195    195   
)
  196    196   
.with_http_header("X-Amzn-Bedrock-GuardrailVersion");
  197    197   
static INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  198    198   
    ::aws_smithy_schema::ShapeId::from_static(
  199    199   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamInput$performanceConfigLatency",
  200    200   
        "com.amazonaws.bedrockruntime.synthetic",
  201    201   
        "InvokeModelWithResponseStreamInput",
  202    202   
    ),
  203    203   
    ::aws_smithy_schema::ShapeType::String,
  204         -
    "performance_config_latency",
         204  +
    "performanceConfigLatency",
  205    205   
    7,
  206    206   
)
  207    207   
.with_http_header("X-Amzn-Bedrock-PerformanceConfig-Latency");
  208    208   
static INVOKEMODELWITHRESPONSESTREAMINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  209    209   
    INVOKEMODELWITHRESPONSESTREAMINPUT_SCHEMA_ID,
  210    210   
    ::aws_smithy_schema::ShapeType::Structure,
  211    211   
    &[
  212    212   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_BODY,
  213    213   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_CONTENT_TYPE,
  214    214   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_ACCEPT,
  215    215   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_MODEL_ID,
  216    216   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_TRACE,
  217    217   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_IDENTIFIER,
  218    218   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_VERSION,
  219    219   
        &INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY,
  220    220   
    ],
  221         -
);
         221  +
)
         222  +
.with_http(aws_smithy_schema::traits::HttpTrait::new(
         223  +
    "POST",
         224  +
    "/model/{modelId}/invoke-with-response-stream",
         225  +
    None,
         226  +
));
  222    227   
impl InvokeModelWithResponseStreamInput {
  223    228   
    /// The schema for this shape.
  224    229   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEMODELWITHRESPONSESTREAMINPUT_SCHEMA;
  225    230   
}
  226    231   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeModelWithResponseStreamInput {
  227    232   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  228    233   
    fn serialize_members(
  229    234   
        &self,
  230    235   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  231    236   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  232    237   
        if let Some(ref val) = self.body {
  233    238   
            ser.write_blob(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_BODY, val)?;
  234    239   
        }
  235    240   
        if let Some(ref val) = self.content_type {
  236    241   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_CONTENT_TYPE, val)?;
  237    242   
        }
  238    243   
        if let Some(ref val) = self.accept {
  239    244   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_ACCEPT, val)?;
  240    245   
        }
  241    246   
        if let Some(ref val) = self.model_id {
  242    247   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_MODEL_ID, val)?;
  243    248   
        }
  244    249   
        if let Some(ref val) = self.trace {
  245    250   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_TRACE, val.as_str())?;
  246    251   
        }
  247    252   
        if let Some(ref val) = self.guardrail_identifier {
  248    253   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_IDENTIFIER, val)?;
  249    254   
        }
  250    255   
        if let Some(ref val) = self.guardrail_version {
  251    256   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_GUARDRAIL_VERSION, val)?;
  252    257   
        }
  253    258   
        if let Some(ref val) = self.performance_config_latency {
  254    259   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMINPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY, val.as_str())?;
  255    260   
        }
  256    261   
        Ok(())
  257    262   
    }
  258    263   
}
  259    264   
impl InvokeModelWithResponseStreamInput {
  260    265   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  261         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  262         -
        deserializer: &mut D,
         266  +
    pub fn deserialize(
         267  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  263    268   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  264    269   
        #[allow(unused_variables, unused_mut)]
  265    270   
        let mut builder = Self::builder();
  266    271   
        #[allow(
  267    272   
            unused_variables,
  268    273   
            unreachable_code,
  269    274   
            clippy::single_match,
  270    275   
            clippy::match_single_binding,
  271    276   
            clippy::diverging_sub_expression
  272    277   
        )]
  273         -
        deserializer.read_struct(&INVOKEMODELWITHRESPONSESTREAMINPUT_SCHEMA, (), |_, member, deser| {
         278  +
        deserializer.read_struct(&INVOKEMODELWITHRESPONSESTREAMINPUT_SCHEMA, &mut |member, deser| {
  274    279   
            match member.member_index() {
  275    280   
                Some(0) => {
  276    281   
                    builder.body = Some(deser.read_blob(member)?);
  277    282   
                }
  278    283   
                Some(1) => {
  279    284   
                    builder.content_type = Some(deser.read_string(member)?);
  280    285   
                }
  281    286   
                Some(2) => {
  282    287   
                    builder.accept = Some(deser.read_string(member)?);
  283    288   
                }
  284    289   
                Some(3) => {
  285    290   
                    builder.model_id = Some(deser.read_string(member)?);
  286    291   
                }
  287    292   
                Some(4) => {
  288    293   
                    builder.trace = Some(crate::types::Trace::from(deser.read_string(member)?.as_str()));
  289    294   
                }
  290    295   
                Some(5) => {
  291    296   
                    builder.guardrail_identifier = Some(deser.read_string(member)?);
  292    297   
                }
  293    298   
                Some(6) => {
  294    299   
                    builder.guardrail_version = Some(deser.read_string(member)?);
  295    300   
                }
  296    301   
                Some(7) => {
  297    302   
                    builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(deser.read_string(member)?.as_str()));
  298    303   
                }
  299    304   
                _ => {}
  300    305   
            }
  301    306   
            Ok(())
  302    307   
        })?;
         308  +
        builder.model_id = builder.model_id.or(Some(String::new()));
         309  +
        builder
         310  +
            .build()
         311  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         312  +
    }
         313  +
}
         314  +
impl InvokeModelWithResponseStreamInput {
         315  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         316  +
    /// Header-bound members are read directly from headers, avoiding runtime
         317  +
    /// member iteration overhead. Body members are read via the deserializer.
         318  +
    pub fn deserialize_with_response(
         319  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         320  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         321  +
        _status: u16,
         322  +
        body: &[u8],
         323  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         324  +
        #[allow(unused_variables, unused_mut)]
         325  +
        let mut builder = Self::builder();
         326  +
        if let Some(val) = headers.get("Content-Type") {
         327  +
            builder.content_type = Some(val.to_string());
         328  +
        }
         329  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-Accept") {
         330  +
            builder.accept = Some(val.to_string());
         331  +
        }
         332  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-Trace") {
         333  +
            builder.trace = Some(crate::types::Trace::from(val));
         334  +
        }
         335  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-GuardrailIdentifier") {
         336  +
            builder.guardrail_identifier = Some(val.to_string());
         337  +
        }
         338  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-GuardrailVersion") {
         339  +
            builder.guardrail_version = Some(val.to_string());
         340  +
        }
         341  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-PerformanceConfig-Latency") {
         342  +
            builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(val));
         343  +
        }
         344  +
        if !body.is_empty() {
         345  +
            builder.body = Some(::aws_smithy_types::Blob::new(body.to_vec()));
         346  +
        }
  303    347   
        builder
  304    348   
            .build()
  305    349   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  306    350   
    }
  307    351   
}
  308    352   
impl InvokeModelWithResponseStreamInput {
  309    353   
    /// Creates a new builder-style object to manufacture [`InvokeModelWithResponseStreamInput`](crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput).
  310    354   
    pub fn builder() -> crate::operation::invoke_model_with_response_stream::builders::InvokeModelWithResponseStreamInputBuilder {
  311    355   
        crate::operation::invoke_model_with_response_stream::builders::InvokeModelWithResponseStreamInputBuilder::default()
  312    356   
    }

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_response_stream/_invoke_model_with_response_stream_output.rs

@@ -22,22 +157,212 @@
   42     42   
    0,
   43     43   
)
   44     44   
.with_http_payload();
   45     45   
static INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_CONTENT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   46     46   
    ::aws_smithy_schema::ShapeId::from_static(
   47     47   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamOutput$contentType",
   48     48   
        "com.amazonaws.bedrockruntime.synthetic",
   49     49   
        "InvokeModelWithResponseStreamOutput",
   50     50   
    ),
   51     51   
    ::aws_smithy_schema::ShapeType::String,
   52         -
    "content_type",
          52  +
    "contentType",
   53     53   
    1,
   54     54   
)
   55     55   
.with_http_header("X-Amzn-Bedrock-Content-Type");
   56     56   
static INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.bedrockruntime.synthetic#InvokeModelWithResponseStreamOutput$performanceConfigLatency",
   59     59   
        "com.amazonaws.bedrockruntime.synthetic",
   60     60   
        "InvokeModelWithResponseStreamOutput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::String,
   63         -
    "performance_config_latency",
          63  +
    "performanceConfigLatency",
   64     64   
    2,
   65     65   
)
   66     66   
.with_http_header("X-Amzn-Bedrock-PerformanceConfig-Latency");
          67  +
static INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          69  +
    ::aws_smithy_schema::ShapeType::String,
          70  +
    "request_id",
          71  +
    3,
          72  +
)
          73  +
.with_http_header("x-amzn-requestid");
   67     74   
static INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   68     75   
    INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA_ID,
   69     76   
    ::aws_smithy_schema::ShapeType::Structure,
   70     77   
    &[
   71     78   
        &INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_BODY,
   72     79   
        &INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_CONTENT_TYPE,
   73     80   
        &INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY,
          81  +
        &INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER__REQUEST_ID,
   74     82   
    ],
   75     83   
);
   76     84   
impl InvokeModelWithResponseStreamOutput {
   77     85   
    /// The schema for this shape.
   78     86   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA;
   79     87   
}
   80     88   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeModelWithResponseStreamOutput {
   81     89   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   82     90   
    fn serialize_members(
   83     91   
        &self,
   84     92   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   85     93   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   86         -
        {
   87         -
            let val = &self.body;
   88         -
            ser.write_null(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_BODY)?;
   89         -
        }
   90     94   
        {
   91     95   
            let val = &self.content_type;
   92     96   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_CONTENT_TYPE, val)?;
   93     97   
        }
   94     98   
        if let Some(ref val) = self.performance_config_latency {
   95     99   
            ser.write_string(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY, val.as_str())?;
   96    100   
        }
   97    101   
        Ok(())
   98    102   
    }
   99    103   
}
  100    104   
impl InvokeModelWithResponseStreamOutput {
  101    105   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  102         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  103         -
        deserializer: &mut D,
         106  +
    pub fn deserialize(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  104    108   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  105    109   
        #[allow(unused_variables, unused_mut)]
  106    110   
        let mut builder = Self::builder();
  107    111   
        #[allow(
  108    112   
            unused_variables,
  109    113   
            unreachable_code,
  110    114   
            clippy::single_match,
  111    115   
            clippy::match_single_binding,
  112    116   
            clippy::diverging_sub_expression
  113    117   
        )]
  114         -
        deserializer.read_struct(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
         118  +
        deserializer.read_struct(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
  115    119   
            match member.member_index() {
  116    120   
                Some(0) => {
  117    121   
                    builder.body = Some({
  118    122   
                        let _ = member;
  119         -
                        todo!("deserialize aggregate")
         123  +
                        todo!("deserialize streaming union")
  120    124   
                    });
  121    125   
                }
  122    126   
                Some(1) => {
  123    127   
                    builder.content_type = Some(deser.read_string(member)?);
  124    128   
                }
  125    129   
                Some(2) => {
  126    130   
                    builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(deser.read_string(member)?.as_str()));
  127    131   
                }
         132  +
                Some(3) => {
         133  +
                    builder._request_id = Some(deser.read_string(member)?);
         134  +
                }
         135  +
                _ => {}
         136  +
            }
         137  +
            Ok(())
         138  +
        })?;
         139  +
        builder.content_type = builder.content_type.or(Some(String::new()));
         140  +
        builder
         141  +
            .build()
         142  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         143  +
    }
         144  +
}
         145  +
impl InvokeModelWithResponseStreamOutput {
         146  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         147  +
    /// Header-bound members are read directly from headers, avoiding runtime
         148  +
    /// member iteration overhead. Body members are read via the deserializer.
         149  +
    pub fn deserialize_with_response(
         150  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         151  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         152  +
        _status: u16,
         153  +
        _body: &[u8],
         154  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         155  +
        #[allow(unused_variables, unused_mut)]
         156  +
        let mut builder = Self::builder();
         157  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-Content-Type") {
         158  +
            builder.content_type = Some(val.to_string());
         159  +
        }
         160  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-PerformanceConfig-Latency") {
         161  +
            builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(val));
         162  +
        }
         163  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         164  +
            builder._request_id = Some(val.to_string());
         165  +
        }
         166  +
        #[allow(
         167  +
            unused_variables,
         168  +
            unreachable_code,
         169  +
            clippy::single_match,
         170  +
            clippy::match_single_binding,
         171  +
            clippy::diverging_sub_expression
         172  +
        )]
         173  +
        deserializer.read_struct(&INVOKEMODELWITHRESPONSESTREAMOUTPUT_SCHEMA, &mut |member, deser| {
         174  +
            match member.member_index() {
         175  +
                Some(0) => {
         176  +
                    builder.body = Some({
         177  +
                        let _ = member;
         178  +
                        todo!("deserialize streaming union")
         179  +
                    });
         180  +
                }
         181  +
                Some(1) => { /* read from headers above */ }
         182  +
                Some(2) => { /* read from headers above */ }
  128    183   
                _ => {}
  129    184   
            }
  130    185   
            Ok(())
  131    186   
        })?;
  132    187   
        builder
  133    188   
            .build()
  134    189   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  135    190   
    }
  136    191   
}
  137    192   
impl ::aws_types::request_id::RequestId for InvokeModelWithResponseStreamOutput {

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/list_async_invokes.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListAsyncInvokes`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListAsyncInvokes;
    6      6   
impl ListAsyncInvokes {
    7      7   
    /// Creates a new `ListAsyncInvokes`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_async_invokes::ListAsyncInvokesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_async_invokes::ListAsyncInvokesOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_async_invokes::ListAsyncInvokesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_async_invokes::ListAsyncInvokesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_async_invokes::ListAsyncInvokesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -119,123 +286,413 @@
  139    143   
                crate::operation::list_async_invokes::ListAsyncInvokesError,
  140    144   
            >::new());
  141    145   
  142    146   
        ::std::borrow::Cow::Owned(rcb)
  143    147   
    }
  144    148   
}
  145    149   
  146    150   
#[derive(Debug)]
  147    151   
struct ListAsyncInvokesResponseDeserializer;
  148    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListAsyncInvokesResponseDeserializer {
  149         -
    fn deserialize_nonstreaming(
         153  +
    fn deserialize_nonstreaming_with_config(
  150    154   
        &self,
  151    155   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         156  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  152    157   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  153    158   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  154         -
        let headers = response.headers();
  155         -
        let body = response.body().bytes().expect("body loaded");
  156    159   
        #[allow(unused_mut)]
  157    160   
        let mut force_error = false;
  158    161   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  159         -
        let parse_result = if !success && status != 200 || force_error {
  160         -
            crate::protocol_serde::shape_list_async_invokes::de_list_async_invokes_http_error(status, headers, body)
  161         -
        } else {
  162         -
            crate::protocol_serde::shape_list_async_invokes::de_list_async_invokes_http_response(status, headers, body)
         162  +
        if !success && status != 200 || force_error {
         163  +
            let headers = response.headers();
         164  +
            let body = response.body().bytes().expect("body loaded");
         165  +
            #[allow(unused_mut)]
         166  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         167  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         168  +
            })?;
         169  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         170  +
            let generic = generic_builder.build();
         171  +
            let error_code = match generic.code() {
         172  +
                ::std::option::Option::Some(code) => code,
         173  +
                ::std::option::Option::None => {
         174  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         175  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_async_invokes::ListAsyncInvokesError::unhandled(
         176  +
                            generic,
         177  +
                        )),
         178  +
                    ))
         179  +
                }
  163    180   
            };
  164         -
        crate::protocol_serde::type_erase_result(parse_result)
         181  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         182  +
            let protocol = _cfg
         183  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         184  +
                .expect("a SharedClientProtocol is required");
         185  +
            let err = match error_code {
         186  +
                "AccessDeniedException" => crate::operation::list_async_invokes::ListAsyncInvokesError::AccessDeniedException({
         187  +
                    let mut tmp = match protocol
         188  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         189  +
                        .and_then(|mut deser| {
         190  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         191  +
                                &mut *deser,
         192  +
                                response.headers(),
         193  +
                                response.status().into(),
         194  +
                                body,
         195  +
                            )
         196  +
                        }) {
         197  +
                        ::std::result::Result::Ok(val) => val,
         198  +
                        ::std::result::Result::Err(e) => {
         199  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         200  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         201  +
                            ))
         202  +
                        }
         203  +
                    };
         204  +
                    tmp.meta = generic;
         205  +
                    if tmp.message.is_none() {
         206  +
                        tmp.message = _error_message;
         207  +
                    }
         208  +
                    tmp
         209  +
                }),
         210  +
                "InternalServerException" => crate::operation::list_async_invokes::ListAsyncInvokesError::InternalServerException({
         211  +
                    let mut tmp = match protocol
         212  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         213  +
                        .and_then(|mut deser| {
         214  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         215  +
                                &mut *deser,
         216  +
                                response.headers(),
         217  +
                                response.status().into(),
         218  +
                                body,
         219  +
                            )
         220  +
                        }) {
         221  +
                        ::std::result::Result::Ok(val) => val,
         222  +
                        ::std::result::Result::Err(e) => {
         223  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         224  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         225  +
                            ))
         226  +
                        }
         227  +
                    };
         228  +
                    tmp.meta = generic;
         229  +
                    if tmp.message.is_none() {
         230  +
                        tmp.message = _error_message;
         231  +
                    }
         232  +
                    tmp
         233  +
                }),
         234  +
                "ThrottlingException" => crate::operation::list_async_invokes::ListAsyncInvokesError::ThrottlingException({
         235  +
                    let mut tmp = match protocol
         236  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         237  +
                        .and_then(|mut deser| {
         238  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         239  +
                                &mut *deser,
         240  +
                                response.headers(),
         241  +
                                response.status().into(),
         242  +
                                body,
         243  +
                            )
         244  +
                        }) {
         245  +
                        ::std::result::Result::Ok(val) => val,
         246  +
                        ::std::result::Result::Err(e) => {
         247  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         248  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         249  +
                            ))
         250  +
                        }
         251  +
                    };
         252  +
                    tmp.meta = generic;
         253  +
                    if tmp.message.is_none() {
         254  +
                        tmp.message = _error_message;
         255  +
                    }
         256  +
                    tmp
         257  +
                }),
         258  +
                "ValidationException" => crate::operation::list_async_invokes::ListAsyncInvokesError::ValidationException({
         259  +
                    let mut tmp = match protocol
         260  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         261  +
                        .and_then(|mut deser| {
         262  +
                            crate::types::error::ValidationException::deserialize_with_response(
         263  +
                                &mut *deser,
         264  +
                                response.headers(),
         265  +
                                response.status().into(),
         266  +
                                body,
         267  +
                            )
         268  +
                        }) {
         269  +
                        ::std::result::Result::Ok(val) => val,
         270  +
                        ::std::result::Result::Err(e) => {
         271  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         272  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         273  +
                            ))
         274  +
                        }
         275  +
                    };
         276  +
                    tmp.meta = generic;
         277  +
                    if tmp.message.is_none() {
         278  +
                        tmp.message = _error_message;
         279  +
                    }
         280  +
                    tmp
         281  +
                }),
         282  +
                _ => crate::operation::list_async_invokes::ListAsyncInvokesError::generic(generic),
         283  +
            };
         284  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         285  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         286  +
            ))
         287  +
        } else {
         288  +
            let protocol = _cfg
         289  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         290  +
                .expect("a SharedClientProtocol is required");
         291  +
            let mut deser = protocol
         292  +
                .deserialize_response(response, ListAsyncInvokes::OUTPUT_SCHEMA, _cfg)
         293  +
                .map_err(|e| {
         294  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         295  +
                })?;
         296  +
            let body = response.body().bytes().expect("body loaded");
         297  +
            let output = crate::operation::list_async_invokes::ListAsyncInvokesOutput::deserialize_with_response(
         298  +
                &mut *deser,
         299  +
                response.headers(),
         300  +
                response.status().into(),
         301  +
                body,
         302  +
            )
         303  +
            .map_err(|e| {
         304  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         305  +
            })?;
         306  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         307  +
        }
  165    308   
    }
  166    309   
}
  167    310   
#[derive(Debug)]
  168    311   
struct ListAsyncInvokesRequestSerializer;
  169    312   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListAsyncInvokesRequestSerializer {
  170    313   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  171    314   
    fn serialize_input(
  172    315   
        &self,
  173    316   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  174    317   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  175    318   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  176    319   
        let input = input
  177    320   
            .downcast::<crate::operation::list_async_invokes::ListAsyncInvokesInput>()
  178    321   
            .expect("correct type");
  179         -
        let _header_serialization_settings = _cfg
  180         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  181         -
            .cloned()
  182         -
            .unwrap_or_default();
  183         -
        let mut request_builder = {
  184         -
            #[allow(clippy::uninlined_format_args)]
  185         -
            fn uri_base(
  186         -
                _input: &crate::operation::list_async_invokes::ListAsyncInvokesInput,
  187         -
                output: &mut ::std::string::String,
  188         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  189         -
                use ::std::fmt::Write as _;
  190         -
                ::std::write!(output, "/async-invoke").expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
  192         -
            }
  193         -
            fn uri_query(
  194         -
                _input: &crate::operation::list_async_invokes::ListAsyncInvokesInput,
  195         -
                mut output: &mut ::std::string::String,
  196         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  198         -
                if let ::std::option::Option::Some(inner_1) = &_input.submit_time_after {
  199         -
                    {
  200         -
                        query.push_kv(
  201         -
                            "submitTimeAfter",
  202         -
                            &::aws_smithy_http::query::fmt_timestamp(inner_1, ::aws_smithy_types::date_time::Format::DateTime)?,
  203         -
                        );
  204         -
                    }
  205         -
                }
  206         -
                if let ::std::option::Option::Some(inner_2) = &_input.submit_time_before {
  207         -
                    {
  208         -
                        query.push_kv(
  209         -
                            "submitTimeBefore",
  210         -
                            &::aws_smithy_http::query::fmt_timestamp(inner_2, ::aws_smithy_types::date_time::Format::DateTime)?,
  211         -
                        );
  212         -
                    }
  213         -
                }
  214         -
                if let ::std::option::Option::Some(inner_3) = &_input.status_equals {
  215         -
                    {
  216         -
                        query.push_kv("statusEquals", &::aws_smithy_http::query::fmt_string(inner_3.as_str()));
  217         -
                    }
  218         -
                }
  219         -
                if let ::std::option::Option::Some(inner_4) = &_input.max_results {
         322  +
        let protocol = _cfg
         323  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         324  +
            .expect("a SharedClientProtocol is required");
         325  +
        if protocol.supports_http_bindings() {
         326  +
            let mut request = protocol
         327  +
                .serialize_body(&input, ListAsyncInvokes::INPUT_SCHEMA, "", _cfg)
         328  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
  220    329   
            {
  221         -
                        query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_4).encode());
         330  +
                let mut uri = "/async-invoke".to_string();
         331  +
                let mut query_params: Vec<(String, String)> = Vec::new();
         332  +
                if let Some(ref val) = input.submit_time_after {
         333  +
                    query_params.push((
         334  +
                        "submitTimeAfter".to_string(),
         335  +
                        val.fmt(::aws_smithy_types::date_time::Format::DateTime).expect("valid timestamp"),
         336  +
                    ));
  222    337   
                }
         338  +
                if let Some(ref val) = input.submit_time_before {
         339  +
                    query_params.push((
         340  +
                        "submitTimeBefore".to_string(),
         341  +
                        val.fmt(::aws_smithy_types::date_time::Format::DateTime).expect("valid timestamp"),
         342  +
                    ));
  223    343   
                }
  224         -
                if let ::std::option::Option::Some(inner_5) = &_input.next_token {
  225         -
                    {
  226         -
                        query.push_kv("nextToken", &::aws_smithy_http::query::fmt_string(inner_5));
         344  +
                if let Some(ref val) = input.status_equals {
         345  +
                    query_params.push(("statusEquals".to_string(), val.as_str().to_string()));
  227    346   
                }
         347  +
                if let Some(ref val) = input.max_results {
         348  +
                    query_params.push(("maxResults".to_string(), val.to_string()));
  228    349   
                }
  229         -
                if let ::std::option::Option::Some(inner_6) = &_input.sort_by {
  230         -
                    {
  231         -
                        query.push_kv("sortBy", &::aws_smithy_http::query::fmt_string(inner_6.as_str()));
         350  +
                if let Some(ref val) = input.next_token {
         351  +
                    query_params.push(("nextToken".to_string(), val.to_string()));
  232    352   
                }
         353  +
                if let Some(ref val) = input.sort_by {
         354  +
                    query_params.push(("sortBy".to_string(), val.as_str().to_string()));
  233    355   
                }
  234         -
                if let ::std::option::Option::Some(inner_7) = &_input.sort_order {
  235         -
                    {
  236         -
                        query.push_kv("sortOrder", &::aws_smithy_http::query::fmt_string(inner_7.as_str()));
         356  +
                if let Some(ref val) = input.sort_order {
         357  +
                    query_params.push(("sortOrder".to_string(), val.as_str().to_string()));
  237    358   
                }
         359  +
                if !query_params.is_empty() {
         360  +
                    uri.push(if uri.contains('?') { '&' } else { '?' });
         361  +
                    let pairs: Vec<String> = query_params
         362  +
                        .iter()
         363  +
                        .map(|(k, v)| {
         364  +
                            format!(
         365  +
                                "{}={}",
         366  +
                                ::aws_smithy_schema::http_protocol::percent_encode(k),
         367  +
                                ::aws_smithy_schema::http_protocol::percent_encode(v)
         368  +
                            )
         369  +
                        })
         370  +
                        .collect();
         371  +
                    uri.push_str(&pairs.join("&"));
  238    372   
                }
  239         -
                ::std::result::Result::Ok(())
         373  +
                request.set_uri(uri.as_str()).expect("valid URI");
  240    374   
            }
  241         -
            #[allow(clippy::unnecessary_wraps)]
  242         -
            fn update_http_builder(
  243         -
                input: &crate::operation::list_async_invokes::ListAsyncInvokesInput,
  244         -
                builder: ::http_1x::request::Builder,
  245         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  246         -
                let mut uri = ::std::string::String::new();
  247         -
                uri_base(input, &mut uri)?;
  248         -
                uri_query(input, &mut uri)?;
  249         -
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  250         -
            }
  251         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  252         -
            builder
  253         -
        };
  254         -
        let body = ::aws_smithy_types::body::SdkBody::from("");
  255    375   
  256         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         376  +
            return ::std::result::Result::Ok(request);
         377  +
        } else {
         378  +
            let mut request = protocol
         379  +
                .serialize_request(&input, ListAsyncInvokes::INPUT_SCHEMA, "", _cfg)
         380  +
                .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         381  +
         382  +
            return ::std::result::Result::Ok(request);
         383  +
        }
  257    384   
    }
  258    385   
}
  259    386   
#[derive(Debug)]
  260    387   
struct ListAsyncInvokesEndpointParamsInterceptor;
  261    388   
  262    389   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListAsyncInvokesEndpointParamsInterceptor {
  263    390   
    fn name(&self) -> &'static str {
  264    391   
        "ListAsyncInvokesEndpointParamsInterceptor"
  265    392   
    }
  266    393   

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/list_async_invokes/_list_async_invokes_input.rs

@@ -33,33 +255,269 @@
   53     53   
    "com.amazonaws.bedrockruntime.synthetic",
   54     54   
    "ListAsyncInvokesInput",
   55     55   
);
   56     56   
static LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_AFTER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   57     57   
    ::aws_smithy_schema::ShapeId::from_static(
   58     58   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$submitTimeAfter",
   59     59   
        "com.amazonaws.bedrockruntime.synthetic",
   60     60   
        "ListAsyncInvokesInput",
   61     61   
    ),
   62     62   
    ::aws_smithy_schema::ShapeType::Timestamp,
   63         -
    "submit_time_after",
          63  +
    "submitTimeAfter",
   64     64   
    0,
   65     65   
)
   66         -
.with_http_query("submitTimeAfter");
          66  +
.with_http_query("submitTimeAfter")
          67  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   67     68   
static LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_BEFORE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   68     69   
    ::aws_smithy_schema::ShapeId::from_static(
   69     70   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$submitTimeBefore",
   70     71   
        "com.amazonaws.bedrockruntime.synthetic",
   71     72   
        "ListAsyncInvokesInput",
   72     73   
    ),
   73     74   
    ::aws_smithy_schema::ShapeType::Timestamp,
   74         -
    "submit_time_before",
          75  +
    "submitTimeBefore",
   75     76   
    1,
   76     77   
)
   77         -
.with_http_query("submitTimeBefore");
          78  +
.with_http_query("submitTimeBefore")
          79  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
   78     80   
static LISTASYNCINVOKESINPUT_MEMBER_STATUS_EQUALS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   79     81   
    ::aws_smithy_schema::ShapeId::from_static(
   80     82   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$statusEquals",
   81     83   
        "com.amazonaws.bedrockruntime.synthetic",
   82     84   
        "ListAsyncInvokesInput",
   83     85   
    ),
   84     86   
    ::aws_smithy_schema::ShapeType::String,
   85         -
    "status_equals",
          87  +
    "statusEquals",
   86     88   
    2,
   87     89   
)
   88     90   
.with_http_query("statusEquals");
   89     91   
static LISTASYNCINVOKESINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   90     92   
    ::aws_smithy_schema::ShapeId::from_static(
   91     93   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$maxResults",
   92     94   
        "com.amazonaws.bedrockruntime.synthetic",
   93     95   
        "ListAsyncInvokesInput",
   94     96   
    ),
   95     97   
    ::aws_smithy_schema::ShapeType::Integer,
   96         -
    "max_results",
          98  +
    "maxResults",
   97     99   
    3,
   98    100   
)
   99    101   
.with_http_query("maxResults");
  100    102   
static LISTASYNCINVOKESINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    103   
    ::aws_smithy_schema::ShapeId::from_static(
  102    104   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$nextToken",
  103    105   
        "com.amazonaws.bedrockruntime.synthetic",
  104    106   
        "ListAsyncInvokesInput",
  105    107   
    ),
  106    108   
    ::aws_smithy_schema::ShapeType::String,
  107         -
    "next_token",
         109  +
    "nextToken",
  108    110   
    4,
  109    111   
)
  110    112   
.with_http_query("nextToken");
  111    113   
static LISTASYNCINVOKESINPUT_MEMBER_SORT_BY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  112    114   
    ::aws_smithy_schema::ShapeId::from_static(
  113    115   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$sortBy",
  114    116   
        "com.amazonaws.bedrockruntime.synthetic",
  115    117   
        "ListAsyncInvokesInput",
  116    118   
    ),
  117    119   
    ::aws_smithy_schema::ShapeType::String,
  118         -
    "sort_by",
         120  +
    "sortBy",
  119    121   
    5,
  120    122   
)
  121    123   
.with_http_query("sortBy");
  122    124   
static LISTASYNCINVOKESINPUT_MEMBER_SORT_ORDER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    125   
    ::aws_smithy_schema::ShapeId::from_static(
  124    126   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesInput$sortOrder",
  125    127   
        "com.amazonaws.bedrockruntime.synthetic",
  126    128   
        "ListAsyncInvokesInput",
  127    129   
    ),
  128    130   
    ::aws_smithy_schema::ShapeType::String,
  129         -
    "sort_order",
         131  +
    "sortOrder",
  130    132   
    6,
  131    133   
)
  132    134   
.with_http_query("sortOrder");
  133    135   
static LISTASYNCINVOKESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  134    136   
    LISTASYNCINVOKESINPUT_SCHEMA_ID,
  135    137   
    ::aws_smithy_schema::ShapeType::Structure,
  136    138   
    &[
  137    139   
        &LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_AFTER,
  138    140   
        &LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_BEFORE,
  139    141   
        &LISTASYNCINVOKESINPUT_MEMBER_STATUS_EQUALS,
  140    142   
        &LISTASYNCINVOKESINPUT_MEMBER_MAX_RESULTS,
  141    143   
        &LISTASYNCINVOKESINPUT_MEMBER_NEXT_TOKEN,
  142    144   
        &LISTASYNCINVOKESINPUT_MEMBER_SORT_BY,
  143    145   
        &LISTASYNCINVOKESINPUT_MEMBER_SORT_ORDER,
  144    146   
    ],
  145         -
);
         147  +
)
         148  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/async-invoke", None));
  146    149   
impl ListAsyncInvokesInput {
  147    150   
    /// The schema for this shape.
  148    151   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTASYNCINVOKESINPUT_SCHEMA;
  149    152   
}
  150    153   
impl ::aws_smithy_schema::serde::SerializableStruct for ListAsyncInvokesInput {
  151    154   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  152    155   
    fn serialize_members(
  153    156   
        &self,
  154    157   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  155    158   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  156    159   
        if let Some(ref val) = self.submit_time_after {
  157    160   
            ser.write_timestamp(&LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_AFTER, val)?;
  158    161   
        }
  159    162   
        if let Some(ref val) = self.submit_time_before {
  160    163   
            ser.write_timestamp(&LISTASYNCINVOKESINPUT_MEMBER_SUBMIT_TIME_BEFORE, val)?;
  161    164   
        }
  162    165   
        if let Some(ref val) = self.status_equals {
  163    166   
            ser.write_string(&LISTASYNCINVOKESINPUT_MEMBER_STATUS_EQUALS, val.as_str())?;
  164    167   
        }
  165    168   
        if let Some(ref val) = self.max_results {
  166    169   
            ser.write_integer(&LISTASYNCINVOKESINPUT_MEMBER_MAX_RESULTS, *val)?;
  167    170   
        }
  168    171   
        if let Some(ref val) = self.next_token {
  169    172   
            ser.write_string(&LISTASYNCINVOKESINPUT_MEMBER_NEXT_TOKEN, val)?;
  170    173   
        }
  171    174   
        if let Some(ref val) = self.sort_by {
  172    175   
            ser.write_string(&LISTASYNCINVOKESINPUT_MEMBER_SORT_BY, val.as_str())?;
  173    176   
        }
  174    177   
        if let Some(ref val) = self.sort_order {
  175    178   
            ser.write_string(&LISTASYNCINVOKESINPUT_MEMBER_SORT_ORDER, val.as_str())?;
  176    179   
        }
  177    180   
        Ok(())
  178    181   
    }
  179    182   
}
  180    183   
impl ListAsyncInvokesInput {
  181    184   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  182         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  183         -
        deserializer: &mut D,
         185  +
    pub fn deserialize(
         186  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  184    187   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  185    188   
        #[allow(unused_variables, unused_mut)]
  186    189   
        let mut builder = Self::builder();
  187    190   
        #[allow(
  188    191   
            unused_variables,
  189    192   
            unreachable_code,
  190    193   
            clippy::single_match,
  191    194   
            clippy::match_single_binding,
  192    195   
            clippy::diverging_sub_expression
  193    196   
        )]
  194         -
        deserializer.read_struct(&LISTASYNCINVOKESINPUT_SCHEMA, (), |_, member, deser| {
         197  +
        deserializer.read_struct(&LISTASYNCINVOKESINPUT_SCHEMA, &mut |member, deser| {
  195    198   
            match member.member_index() {
  196    199   
                Some(0) => {
  197    200   
                    builder.submit_time_after = Some(deser.read_timestamp(member)?);
  198    201   
                }
  199    202   
                Some(1) => {
  200    203   
                    builder.submit_time_before = Some(deser.read_timestamp(member)?);
  201    204   
                }
  202    205   
                Some(2) => {
  203    206   
                    builder.status_equals = Some(crate::types::AsyncInvokeStatus::from(deser.read_string(member)?.as_str()));
  204    207   
                }
  205    208   
                Some(3) => {
  206    209   
                    builder.max_results = Some(deser.read_integer(member)?);
  207    210   
                }
  208    211   
                Some(4) => {
  209    212   
                    builder.next_token = Some(deser.read_string(member)?);
  210    213   
                }
  211    214   
                Some(5) => {
  212    215   
                    builder.sort_by = Some(crate::types::SortAsyncInvocationBy::from(deser.read_string(member)?.as_str()));
  213    216   
                }
  214    217   
                Some(6) => {
  215    218   
                    builder.sort_order = Some(crate::types::SortOrder::from(deser.read_string(member)?.as_str()));
  216    219   
                }
  217    220   
                _ => {}
  218    221   
            }
  219    222   
            Ok(())
  220    223   
        })?;
  221    224   
        builder
  222    225   
            .build()
  223    226   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  224    227   
    }
  225    228   
}
         229  +
impl ListAsyncInvokesInput {
         230  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         231  +
    pub fn deserialize_with_response(
         232  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         233  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         234  +
        _status: u16,
         235  +
        _body: &[u8],
         236  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         237  +
        Self::deserialize(deserializer)
         238  +
    }
         239  +
}
  226    240   
impl ListAsyncInvokesInput {
  227    241   
    /// Creates a new builder-style object to manufacture [`ListAsyncInvokesInput`](crate::operation::list_async_invokes::ListAsyncInvokesInput).
  228    242   
    pub fn builder() -> crate::operation::list_async_invokes::builders::ListAsyncInvokesInputBuilder {
  229    243   
        crate::operation::list_async_invokes::builders::ListAsyncInvokesInputBuilder::default()
  230    244   
    }
  231    245   
}
  232    246   
  233    247   
/// A builder for [`ListAsyncInvokesInput`](crate::operation::list_async_invokes::ListAsyncInvokesInput).
  234    248   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  235    249   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/list_async_invokes/_list_async_invokes_output.rs

@@ -6,6 +143,195 @@
   26     26   
    "com.amazonaws.bedrockruntime.synthetic",
   27     27   
    "ListAsyncInvokesOutput",
   28     28   
);
   29     29   
static LISTASYNCINVOKESOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   30     30   
    ::aws_smithy_schema::ShapeId::from_static(
   31     31   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesOutput$nextToken",
   32     32   
        "com.amazonaws.bedrockruntime.synthetic",
   33     33   
        "ListAsyncInvokesOutput",
   34     34   
    ),
   35     35   
    ::aws_smithy_schema::ShapeType::String,
   36         -
    "next_token",
          36  +
    "nextToken",
   37     37   
    0,
   38     38   
);
   39     39   
static LISTASYNCINVOKESOUTPUT_MEMBER_ASYNC_INVOKE_SUMMARIES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.bedrockruntime.synthetic#ListAsyncInvokesOutput$asyncInvokeSummaries",
   42     42   
        "com.amazonaws.bedrockruntime.synthetic",
   43     43   
        "ListAsyncInvokesOutput",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::List,
   46         -
    "async_invoke_summaries",
          46  +
    "asyncInvokeSummaries",
   47     47   
    1,
   48     48   
);
          49  +
static LISTASYNCINVOKESOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          50  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          51  +
    ::aws_smithy_schema::ShapeType::String,
          52  +
    "request_id",
          53  +
    2,
          54  +
)
          55  +
.with_http_header("x-amzn-requestid");
   49     56   
static LISTASYNCINVOKESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   50     57   
    LISTASYNCINVOKESOUTPUT_SCHEMA_ID,
   51     58   
    ::aws_smithy_schema::ShapeType::Structure,
   52     59   
    &[
   53     60   
        &LISTASYNCINVOKESOUTPUT_MEMBER_NEXT_TOKEN,
   54     61   
        &LISTASYNCINVOKESOUTPUT_MEMBER_ASYNC_INVOKE_SUMMARIES,
          62  +
        &LISTASYNCINVOKESOUTPUT_MEMBER__REQUEST_ID,
   55     63   
    ],
   56     64   
);
   57     65   
impl ListAsyncInvokesOutput {
   58     66   
    /// The schema for this shape.
   59     67   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTASYNCINVOKESOUTPUT_SCHEMA;
   60     68   
}
   61     69   
impl ::aws_smithy_schema::serde::SerializableStruct for ListAsyncInvokesOutput {
   62     70   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   63     71   
    fn serialize_members(
   64     72   
        &self,
   65     73   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   66     74   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   67     75   
        if let Some(ref val) = self.next_token {
   68     76   
            ser.write_string(&LISTASYNCINVOKESOUTPUT_MEMBER_NEXT_TOKEN, val)?;
   69     77   
        }
   70     78   
        if let Some(ref val) = self.async_invoke_summaries {
   71     79   
            ser.write_list(
   72     80   
                &LISTASYNCINVOKESOUTPUT_MEMBER_ASYNC_INVOKE_SUMMARIES,
   73     81   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   74     82   
                    for item in val {
   75     83   
                        ser.write_struct(crate::types::AsyncInvokeSummary::SCHEMA, item)?;
   76     84   
                    }
   77     85   
                    Ok(())
   78     86   
                },
   79     87   
            )?;
   80     88   
        }
   81     89   
        Ok(())
   82     90   
    }
   83     91   
}
   84     92   
impl ListAsyncInvokesOutput {
   85     93   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   86         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   87         -
        deserializer: &mut D,
          94  +
    pub fn deserialize(
          95  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   88     96   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   89     97   
        #[allow(unused_variables, unused_mut)]
   90     98   
        let mut builder = Self::builder();
   91     99   
        #[allow(
   92    100   
            unused_variables,
   93    101   
            unreachable_code,
   94    102   
            clippy::single_match,
   95    103   
            clippy::match_single_binding,
   96    104   
            clippy::diverging_sub_expression
   97    105   
        )]
   98         -
        deserializer.read_struct(&LISTASYNCINVOKESOUTPUT_SCHEMA, (), |_, member, deser| {
         106  +
        deserializer.read_struct(&LISTASYNCINVOKESOUTPUT_SCHEMA, &mut |member, deser| {
   99    107   
            match member.member_index() {
  100    108   
                Some(0) => {
  101    109   
                    builder.next_token = Some(deser.read_string(member)?);
  102    110   
                }
  103    111   
                Some(1) => {
  104    112   
                    builder.async_invoke_summaries = Some({
  105         -
                        let container = if let Some(cap) = deser.container_size() {
  106         -
                            Vec::with_capacity(cap)
  107         -
                        } else {
  108         -
                            Vec::new()
  109         -
                        };
  110         -
                        deser.read_list(member, container, |mut list, deser| {
  111         -
                            list.push(crate::types::AsyncInvokeSummary::deserialize(deser)?);
  112         -
                            Ok(list)
  113         -
                        })?
         113  +
                        let mut container = Vec::new();
         114  +
                        deser.read_list(member, &mut |deser| {
         115  +
                            container.push(crate::types::AsyncInvokeSummary::deserialize(deser)?);
         116  +
                            Ok(())
         117  +
                        })?;
         118  +
                        container
         119  +
                    });
         120  +
                }
         121  +
                Some(2) => {
         122  +
                    builder._request_id = Some(deser.read_string(member)?);
         123  +
                }
         124  +
                _ => {}
         125  +
            }
         126  +
            Ok(())
         127  +
        })?;
         128  +
        Ok(builder.build())
         129  +
    }
         130  +
}
         131  +
impl ListAsyncInvokesOutput {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         133  +
    /// Header-bound members are read directly from headers, avoiding runtime
         134  +
    /// member iteration overhead. Body members are read via the deserializer.
         135  +
    pub fn deserialize_with_response(
         136  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         137  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         138  +
        _status: u16,
         139  +
        _body: &[u8],
         140  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         141  +
        #[allow(unused_variables, unused_mut)]
         142  +
        let mut builder = Self::builder();
         143  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         144  +
            builder._request_id = Some(val.to_string());
         145  +
        }
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&LISTASYNCINVOKESOUTPUT_SCHEMA, &mut |member, deser| {
         154  +
            match member.member_index() {
         155  +
                Some(0) => {
         156  +
                    builder.next_token = Some(deser.read_string(member)?);
         157  +
                }
         158  +
                Some(1) => {
         159  +
                    builder.async_invoke_summaries = Some({
         160  +
                        let mut container = Vec::new();
         161  +
                        deser.read_list(member, &mut |deser| {
         162  +
                            container.push(crate::types::AsyncInvokeSummary::deserialize(deser)?);
         163  +
                            Ok(())
         164  +
                        })?;
         165  +
                        container
  114    166   
                    });
  115    167   
                }
  116    168   
                _ => {}
  117    169   
            }
  118    170   
            Ok(())
  119    171   
        })?;
  120    172   
        Ok(builder.build())
  121    173   
    }
  122    174   
}
  123    175   
impl ::aws_types::request_id::RequestId for ListAsyncInvokesOutput {