AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406 (ignoring whitespace)

Files changed:

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

@@ -1,1 +109,122 @@
   17     17   
    "com.amazonaws.bedrockruntime.synthetic",
   18     18   
    "GetAsyncInvokeInput",
   19     19   
);
   20     20   
static GETASYNCINVOKEINPUT_MEMBER_INVOCATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   21     21   
    ::aws_smithy_schema::ShapeId::from_static(
   22     22   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeInput$invocationArn",
   23     23   
        "com.amazonaws.bedrockruntime.synthetic",
   24     24   
        "GetAsyncInvokeInput",
   25     25   
    ),
   26     26   
    ::aws_smithy_schema::ShapeType::String,
   27         -
    "invocation_arn",
          27  +
    "invocationArn",
   28     28   
    0,
   29     29   
)
   30     30   
.with_http_label();
   31     31   
static GETASYNCINVOKEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     32   
    GETASYNCINVOKEINPUT_SCHEMA_ID,
   33     33   
    ::aws_smithy_schema::ShapeType::Structure,
   34     34   
    &[&GETASYNCINVOKEINPUT_MEMBER_INVOCATION_ARN],
   35         -
);
          35  +
)
          36  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/async-invoke/{invocationArn}", None));
   36     37   
impl GetAsyncInvokeInput {
   37     38   
    /// The schema for this shape.
   38     39   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETASYNCINVOKEINPUT_SCHEMA;
   39     40   
}
   40     41   
impl ::aws_smithy_schema::serde::SerializableStruct for GetAsyncInvokeInput {
   41     42   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     43   
    fn serialize_members(
   43     44   
        &self,
   44     45   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     46   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     47   
        if let Some(ref val) = self.invocation_arn {
   47     48   
            ser.write_string(&GETASYNCINVOKEINPUT_MEMBER_INVOCATION_ARN, val)?;
   48     49   
        }
   49     50   
        Ok(())
   50     51   
    }
   51     52   
}
   52     53   
impl GetAsyncInvokeInput {
   53     54   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          55  +
    pub fn deserialize(
          56  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     57   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     58   
        #[allow(unused_variables, unused_mut)]
   58     59   
        let mut builder = Self::builder();
   59     60   
        #[allow(
   60     61   
            unused_variables,
   61     62   
            unreachable_code,
   62     63   
            clippy::single_match,
   63     64   
            clippy::match_single_binding,
   64     65   
            clippy::diverging_sub_expression
   65     66   
        )]
   66         -
        deserializer.read_struct(&GETASYNCINVOKEINPUT_SCHEMA, (), |_, member, deser| {
          67  +
        deserializer.read_struct(&GETASYNCINVOKEINPUT_SCHEMA, &mut |member, deser| {
   67     68   
            match member.member_index() {
   68     69   
                Some(0) => {
   69     70   
                    builder.invocation_arn = Some(deser.read_string(member)?);
   70     71   
                }
   71     72   
                _ => {}
   72     73   
            }
   73     74   
            Ok(())
   74     75   
        })?;
          76  +
        builder.invocation_arn = builder.invocation_arn.or(Some(String::new()));
   75     77   
        builder
   76     78   
            .build()
   77     79   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   78     80   
    }
   79     81   
}
          82  +
impl GetAsyncInvokeInput {
          83  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          84  +
    pub fn deserialize_with_response(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          87  +
        _status: u16,
          88  +
        _body: &[u8],
          89  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          90  +
        Self::deserialize(deserializer)
          91  +
    }
          92  +
}
   80     93   
impl GetAsyncInvokeInput {
   81     94   
    /// Creates a new builder-style object to manufacture [`GetAsyncInvokeInput`](crate::operation::get_async_invoke::GetAsyncInvokeInput).
   82     95   
    pub fn builder() -> crate::operation::get_async_invoke::builders::GetAsyncInvokeInputBuilder {
   83     96   
        crate::operation::get_async_invoke::builders::GetAsyncInvokeInputBuilder::default()
   84     97   
    }
   85     98   
}
   86     99   
   87    100   
/// A builder for [`GetAsyncInvokeInput`](crate::operation::get_async_invoke::GetAsyncInvokeInput).
   88    101   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   89    102   
#[non_exhaustive]

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

@@ -64,64 +310,384 @@
   84     84   
    "com.amazonaws.bedrockruntime.synthetic",
   85     85   
    "GetAsyncInvokeOutput",
   86     86   
);
   87     87   
static GETASYNCINVOKEOUTPUT_MEMBER_INVOCATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   88     88   
    ::aws_smithy_schema::ShapeId::from_static(
   89     89   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$invocationArn",
   90     90   
        "com.amazonaws.bedrockruntime.synthetic",
   91     91   
        "GetAsyncInvokeOutput",
   92     92   
    ),
   93     93   
    ::aws_smithy_schema::ShapeType::String,
   94         -
    "invocation_arn",
          94  +
    "invocationArn",
   95     95   
    0,
   96     96   
);
   97     97   
static GETASYNCINVOKEOUTPUT_MEMBER_MODEL_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   98     98   
    ::aws_smithy_schema::ShapeId::from_static(
   99     99   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$modelArn",
  100    100   
        "com.amazonaws.bedrockruntime.synthetic",
  101    101   
        "GetAsyncInvokeOutput",
  102    102   
    ),
  103    103   
    ::aws_smithy_schema::ShapeType::String,
  104         -
    "model_arn",
         104  +
    "modelArn",
  105    105   
    1,
  106    106   
);
  107    107   
static GETASYNCINVOKEOUTPUT_MEMBER_CLIENT_REQUEST_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  108    108   
    ::aws_smithy_schema::ShapeId::from_static(
  109    109   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$clientRequestToken",
  110    110   
        "com.amazonaws.bedrockruntime.synthetic",
  111    111   
        "GetAsyncInvokeOutput",
  112    112   
    ),
  113    113   
    ::aws_smithy_schema::ShapeType::String,
  114         -
    "client_request_token",
         114  +
    "clientRequestToken",
  115    115   
    2,
  116    116   
);
  117    117   
static GETASYNCINVOKEOUTPUT_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  118    118   
    ::aws_smithy_schema::ShapeId::from_static(
  119    119   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$status",
  120    120   
        "com.amazonaws.bedrockruntime.synthetic",
  121    121   
        "GetAsyncInvokeOutput",
  122    122   
    ),
  123    123   
    ::aws_smithy_schema::ShapeType::String,
  124    124   
    "status",
  125    125   
    3,
  126    126   
);
  127    127   
static GETASYNCINVOKEOUTPUT_MEMBER_FAILURE_MESSAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  128    128   
    ::aws_smithy_schema::ShapeId::from_static(
  129    129   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$failureMessage",
  130    130   
        "com.amazonaws.bedrockruntime.synthetic",
  131    131   
        "GetAsyncInvokeOutput",
  132    132   
    ),
  133    133   
    ::aws_smithy_schema::ShapeType::String,
  134         -
    "failure_message",
         134  +
    "failureMessage",
  135    135   
    4,
  136    136   
);
  137    137   
static GETASYNCINVOKEOUTPUT_MEMBER_SUBMIT_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  138    138   
    ::aws_smithy_schema::ShapeId::from_static(
  139    139   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$submitTime",
  140    140   
        "com.amazonaws.bedrockruntime.synthetic",
  141    141   
        "GetAsyncInvokeOutput",
  142    142   
    ),
  143    143   
    ::aws_smithy_schema::ShapeType::Timestamp,
  144         -
    "submit_time",
         144  +
    "submitTime",
  145    145   
    5,
  146         -
);
         146  +
)
         147  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  147    148   
static GETASYNCINVOKEOUTPUT_MEMBER_LAST_MODIFIED_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  148    149   
    ::aws_smithy_schema::ShapeId::from_static(
  149    150   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$lastModifiedTime",
  150    151   
        "com.amazonaws.bedrockruntime.synthetic",
  151    152   
        "GetAsyncInvokeOutput",
  152    153   
    ),
  153    154   
    ::aws_smithy_schema::ShapeType::Timestamp,
  154         -
    "last_modified_time",
         155  +
    "lastModifiedTime",
  155    156   
    6,
  156         -
);
         157  +
)
         158  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  157    159   
static GETASYNCINVOKEOUTPUT_MEMBER_END_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  158    160   
    ::aws_smithy_schema::ShapeId::from_static(
  159    161   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$endTime",
  160    162   
        "com.amazonaws.bedrockruntime.synthetic",
  161    163   
        "GetAsyncInvokeOutput",
  162    164   
    ),
  163    165   
    ::aws_smithy_schema::ShapeType::Timestamp,
  164         -
    "end_time",
         166  +
    "endTime",
  165    167   
    7,
  166         -
);
         168  +
)
         169  +
.with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::DateTime);
  167    170   
static GETASYNCINVOKEOUTPUT_MEMBER_OUTPUT_DATA_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  168    171   
    ::aws_smithy_schema::ShapeId::from_static(
  169    172   
        "com.amazonaws.bedrockruntime.synthetic#GetAsyncInvokeOutput$outputDataConfig",
  170    173   
        "com.amazonaws.bedrockruntime.synthetic",
  171    174   
        "GetAsyncInvokeOutput",
  172    175   
    ),
  173    176   
    ::aws_smithy_schema::ShapeType::Union,
  174         -
    "output_data_config",
         177  +
    "outputDataConfig",
  175    178   
    8,
  176    179   
);
         180  +
static GETASYNCINVOKEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         181  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
         182  +
    ::aws_smithy_schema::ShapeType::String,
         183  +
    "request_id",
         184  +
    9,
         185  +
)
         186  +
.with_http_header("x-amzn-requestid");
  177    187   
static GETASYNCINVOKEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  178    188   
    GETASYNCINVOKEOUTPUT_SCHEMA_ID,
  179    189   
    ::aws_smithy_schema::ShapeType::Structure,
  180    190   
    &[
  181    191   
        &GETASYNCINVOKEOUTPUT_MEMBER_INVOCATION_ARN,
  182    192   
        &GETASYNCINVOKEOUTPUT_MEMBER_MODEL_ARN,
  183    193   
        &GETASYNCINVOKEOUTPUT_MEMBER_CLIENT_REQUEST_TOKEN,
  184    194   
        &GETASYNCINVOKEOUTPUT_MEMBER_STATUS,
  185    195   
        &GETASYNCINVOKEOUTPUT_MEMBER_FAILURE_MESSAGE,
  186    196   
        &GETASYNCINVOKEOUTPUT_MEMBER_SUBMIT_TIME,
  187    197   
        &GETASYNCINVOKEOUTPUT_MEMBER_LAST_MODIFIED_TIME,
  188    198   
        &GETASYNCINVOKEOUTPUT_MEMBER_END_TIME,
  189    199   
        &GETASYNCINVOKEOUTPUT_MEMBER_OUTPUT_DATA_CONFIG,
         200  +
        &GETASYNCINVOKEOUTPUT_MEMBER__REQUEST_ID,
  190    201   
    ],
  191    202   
);
  192    203   
impl GetAsyncInvokeOutput {
  193    204   
    /// The schema for this shape.
  194    205   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETASYNCINVOKEOUTPUT_SCHEMA;
  195    206   
}
  196    207   
impl ::aws_smithy_schema::serde::SerializableStruct for GetAsyncInvokeOutput {
  197    208   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  198    209   
    fn serialize_members(
  199    210   
        &self,
  200    211   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  201    212   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  202    213   
        {
  203    214   
            let val = &self.invocation_arn;
  204    215   
            ser.write_string(&GETASYNCINVOKEOUTPUT_MEMBER_INVOCATION_ARN, val)?;
  205    216   
        }
  206    217   
        {
  207    218   
            let val = &self.model_arn;
  208    219   
            ser.write_string(&GETASYNCINVOKEOUTPUT_MEMBER_MODEL_ARN, val)?;
  209    220   
        }
  210    221   
        if let Some(ref val) = self.client_request_token {
  211    222   
            ser.write_string(&GETASYNCINVOKEOUTPUT_MEMBER_CLIENT_REQUEST_TOKEN, val)?;
  212    223   
        }
  213    224   
        {
  214    225   
            let val = &self.status;
  215    226   
            ser.write_string(&GETASYNCINVOKEOUTPUT_MEMBER_STATUS, val.as_str())?;
  216    227   
        }
  217    228   
        if let Some(ref val) = self.failure_message {
  218    229   
            ser.write_string(&GETASYNCINVOKEOUTPUT_MEMBER_FAILURE_MESSAGE, val)?;
  219    230   
        }
  220    231   
        {
  221    232   
            let val = &self.submit_time;
  222    233   
            ser.write_timestamp(&GETASYNCINVOKEOUTPUT_MEMBER_SUBMIT_TIME, val)?;
  223    234   
        }
  224    235   
        if let Some(ref val) = self.last_modified_time {
  225    236   
            ser.write_timestamp(&GETASYNCINVOKEOUTPUT_MEMBER_LAST_MODIFIED_TIME, val)?;
  226    237   
        }
  227    238   
        if let Some(ref val) = self.end_time {
  228    239   
            ser.write_timestamp(&GETASYNCINVOKEOUTPUT_MEMBER_END_TIME, val)?;
  229    240   
        }
  230    241   
        if let Some(ref val) = self.output_data_config {
  231         -
            ser.write_null(&GETASYNCINVOKEOUTPUT_MEMBER_OUTPUT_DATA_CONFIG)?;
         242  +
            ser.write_struct(&GETASYNCINVOKEOUTPUT_MEMBER_OUTPUT_DATA_CONFIG, val)?;
  232    243   
        }
  233    244   
        Ok(())
  234    245   
    }
  235    246   
}
  236    247   
impl GetAsyncInvokeOutput {
  237    248   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  238         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  239         -
        deserializer: &mut D,
         249  +
    pub fn deserialize(
         250  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         251  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         252  +
        #[allow(unused_variables, unused_mut)]
         253  +
        let mut builder = Self::builder();
         254  +
        #[allow(
         255  +
            unused_variables,
         256  +
            unreachable_code,
         257  +
            clippy::single_match,
         258  +
            clippy::match_single_binding,
         259  +
            clippy::diverging_sub_expression
         260  +
        )]
         261  +
        deserializer.read_struct(&GETASYNCINVOKEOUTPUT_SCHEMA, &mut |member, deser| {
         262  +
            match member.member_index() {
         263  +
                Some(0) => {
         264  +
                    builder.invocation_arn = Some(deser.read_string(member)?);
         265  +
                }
         266  +
                Some(1) => {
         267  +
                    builder.model_arn = Some(deser.read_string(member)?);
         268  +
                }
         269  +
                Some(2) => {
         270  +
                    builder.client_request_token = Some(deser.read_string(member)?);
         271  +
                }
         272  +
                Some(3) => {
         273  +
                    builder.status = Some(crate::types::AsyncInvokeStatus::from(deser.read_string(member)?.as_str()));
         274  +
                }
         275  +
                Some(4) => {
         276  +
                    builder.failure_message = Some(deser.read_string(member)?);
         277  +
                }
         278  +
                Some(5) => {
         279  +
                    builder.submit_time = Some(deser.read_timestamp(member)?);
         280  +
                }
         281  +
                Some(6) => {
         282  +
                    builder.last_modified_time = Some(deser.read_timestamp(member)?);
         283  +
                }
         284  +
                Some(7) => {
         285  +
                    builder.end_time = Some(deser.read_timestamp(member)?);
         286  +
                }
         287  +
                Some(8) => {
         288  +
                    builder.output_data_config = Some(crate::types::AsyncInvokeOutputDataConfig::deserialize(deser)?);
         289  +
                }
         290  +
                Some(9) => {
         291  +
                    builder._request_id = Some(deser.read_string(member)?);
         292  +
                }
         293  +
                _ => {}
         294  +
            }
         295  +
            Ok(())
         296  +
        })?;
         297  +
        builder.invocation_arn = builder.invocation_arn.or(Some(String::new()));
         298  +
        builder.model_arn = builder.model_arn.or(Some(String::new()));
         299  +
        builder.submit_time = builder.submit_time.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         300  +
        builder
         301  +
            .build()
         302  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         303  +
    }
         304  +
}
         305  +
impl GetAsyncInvokeOutput {
         306  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         307  +
    /// Header-bound members are read directly from headers, avoiding runtime
         308  +
    /// member iteration overhead. Body members are read via the deserializer.
         309  +
    pub fn deserialize_with_response(
         310  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         311  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         312  +
        _status: u16,
         313  +
        _body: &[u8],
  240    314   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  241    315   
        #[allow(unused_variables, unused_mut)]
  242    316   
        let mut builder = Self::builder();
         317  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         318  +
            builder._request_id = Some(val.to_string());
         319  +
        }
  243    320   
        #[allow(
  244    321   
            unused_variables,
  245    322   
            unreachable_code,
  246    323   
            clippy::single_match,
  247    324   
            clippy::match_single_binding,
  248    325   
            clippy::diverging_sub_expression
  249    326   
        )]
  250         -
        deserializer.read_struct(&GETASYNCINVOKEOUTPUT_SCHEMA, (), |_, member, deser| {
         327  +
        deserializer.read_struct(&GETASYNCINVOKEOUTPUT_SCHEMA, &mut |member, deser| {
  251    328   
            match member.member_index() {
  252    329   
                Some(0) => {
  253    330   
                    builder.invocation_arn = Some(deser.read_string(member)?);
  254    331   
                }
  255    332   
                Some(1) => {
  256    333   
                    builder.model_arn = Some(deser.read_string(member)?);
  257    334   
                }
  258    335   
                Some(2) => {
  259    336   
                    builder.client_request_token = Some(deser.read_string(member)?);
  260    337   
                }
  261    338   
                Some(3) => {
  262    339   
                    builder.status = Some(crate::types::AsyncInvokeStatus::from(deser.read_string(member)?.as_str()));
  263    340   
                }
  264    341   
                Some(4) => {
  265    342   
                    builder.failure_message = Some(deser.read_string(member)?);
  266    343   
                }
  267    344   
                Some(5) => {
  268    345   
                    builder.submit_time = Some(deser.read_timestamp(member)?);
  269    346   
                }
  270    347   
                Some(6) => {
  271    348   
                    builder.last_modified_time = Some(deser.read_timestamp(member)?);
  272    349   
                }
  273    350   
                Some(7) => {
  274    351   
                    builder.end_time = Some(deser.read_timestamp(member)?);
  275    352   
                }
  276    353   
                Some(8) => {
  277         -
                    builder.output_data_config = Some({
  278         -
                        let _ = member;
  279         -
                        todo!("deserialize aggregate")
  280         -
                    });
         354  +
                    builder.output_data_config = Some(crate::types::AsyncInvokeOutputDataConfig::deserialize(deser)?);
  281    355   
                }
  282    356   
                _ => {}
  283    357   
            }
  284    358   
            Ok(())
  285    359   
        })?;
  286    360   
        builder
  287    361   
            .build()
  288    362   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  289    363   
    }
  290    364   
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model.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 `InvokeModel`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InvokeModel;
    6      6   
impl InvokeModel {
    7      7   
    /// Creates a new `InvokeModel`
    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::invoke_model::InvokeModelInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::invoke_model::InvokeModelOutput::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::invoke_model::InvokeModelInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::invoke_model::InvokeModelOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::invoke_model::InvokeModelError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -119,123 +253,510 @@
  139    143   
                crate::operation::invoke_model::InvokeModelError,
  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 InvokeModelResponseDeserializer;
  148    152   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeModelResponseDeserializer {
  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_invoke_model::de_invoke_model_http_error(status, headers, body)
  161         -
        } else {
  162         -
            crate::protocol_serde::shape_invoke_model::de_invoke_model_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::invoke_model::InvokeModelError::unhandled(generic)),
         176  +
                    ))
         177  +
                }
         178  +
            };
         179  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         180  +
            let protocol = _cfg
         181  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         182  +
                .expect("a SharedClientProtocol is required");
         183  +
            let err = match error_code {
         184  +
                "AccessDeniedException" => crate::operation::invoke_model::InvokeModelError::AccessDeniedException({
         185  +
                    let mut tmp = match protocol
         186  +
                        .deserialize_response(response, crate::types::error::AccessDeniedException::SCHEMA, _cfg)
         187  +
                        .and_then(|mut deser| {
         188  +
                            crate::types::error::AccessDeniedException::deserialize_with_response(
         189  +
                                &mut *deser,
         190  +
                                response.headers(),
         191  +
                                response.status().into(),
         192  +
                                body,
         193  +
                            )
         194  +
                        }) {
         195  +
                        ::std::result::Result::Ok(val) => val,
         196  +
                        ::std::result::Result::Err(e) => {
         197  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         198  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         199  +
                            ))
         200  +
                        }
         201  +
                    };
         202  +
                    tmp.meta = generic;
         203  +
                    if tmp.message.is_none() {
         204  +
                        tmp.message = _error_message;
         205  +
                    }
         206  +
                    tmp
         207  +
                }),
         208  +
                "InternalServerException" => crate::operation::invoke_model::InvokeModelError::InternalServerException({
         209  +
                    let mut tmp = match protocol
         210  +
                        .deserialize_response(response, crate::types::error::InternalServerException::SCHEMA, _cfg)
         211  +
                        .and_then(|mut deser| {
         212  +
                            crate::types::error::InternalServerException::deserialize_with_response(
         213  +
                                &mut *deser,
         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  +
                "ModelErrorException" => crate::operation::invoke_model::InvokeModelError::ModelErrorException({
         233  +
                    let mut tmp = match protocol
         234  +
                        .deserialize_response(response, crate::types::error::ModelErrorException::SCHEMA, _cfg)
         235  +
                        .and_then(|mut deser| {
         236  +
                            crate::types::error::ModelErrorException::deserialize_with_response(
         237  +
                                &mut *deser,
         238  +
                                response.headers(),
         239  +
                                response.status().into(),
         240  +
                                body,
         241  +
                            )
         242  +
                        }) {
         243  +
                        ::std::result::Result::Ok(val) => val,
         244  +
                        ::std::result::Result::Err(e) => {
         245  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         246  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         247  +
                            ))
         248  +
                        }
         249  +
                    };
         250  +
                    tmp.meta = generic;
         251  +
                    if tmp.message.is_none() {
         252  +
                        tmp.message = _error_message;
         253  +
                    }
         254  +
                    tmp
         255  +
                }),
         256  +
                "ModelNotReadyException" => crate::operation::invoke_model::InvokeModelError::ModelNotReadyException({
         257  +
                    let mut tmp = match protocol
         258  +
                        .deserialize_response(response, crate::types::error::ModelNotReadyException::SCHEMA, _cfg)
         259  +
                        .and_then(|mut deser| {
         260  +
                            crate::types::error::ModelNotReadyException::deserialize_with_response(
         261  +
                                &mut *deser,
         262  +
                                response.headers(),
         263  +
                                response.status().into(),
         264  +
                                body,
         265  +
                            )
         266  +
                        }) {
         267  +
                        ::std::result::Result::Ok(val) => val,
         268  +
                        ::std::result::Result::Err(e) => {
         269  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         270  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         271  +
                            ))
         272  +
                        }
         273  +
                    };
         274  +
                    tmp.meta = generic;
         275  +
                    if tmp.message.is_none() {
         276  +
                        tmp.message = _error_message;
         277  +
                    }
         278  +
                    tmp
         279  +
                }),
         280  +
                "ModelTimeoutException" => crate::operation::invoke_model::InvokeModelError::ModelTimeoutException({
         281  +
                    let mut tmp = match protocol
         282  +
                        .deserialize_response(response, crate::types::error::ModelTimeoutException::SCHEMA, _cfg)
         283  +
                        .and_then(|mut deser| {
         284  +
                            crate::types::error::ModelTimeoutException::deserialize_with_response(
         285  +
                                &mut *deser,
         286  +
                                response.headers(),
         287  +
                                response.status().into(),
         288  +
                                body,
         289  +
                            )
         290  +
                        }) {
         291  +
                        ::std::result::Result::Ok(val) => val,
         292  +
                        ::std::result::Result::Err(e) => {
         293  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         294  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         295  +
                            ))
         296  +
                        }
  163    297   
                    };
  164         -
        crate::protocol_serde::type_erase_result(parse_result)
         298  +
                    tmp.meta = generic;
         299  +
                    if tmp.message.is_none() {
         300  +
                        tmp.message = _error_message;
         301  +
                    }
         302  +
                    tmp
         303  +
                }),
         304  +
                "ResourceNotFoundException" => crate::operation::invoke_model::InvokeModelError::ResourceNotFoundException({
         305  +
                    let mut tmp = match protocol
         306  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         307  +
                        .and_then(|mut deser| {
         308  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         309  +
                                &mut *deser,
         310  +
                                response.headers(),
         311  +
                                response.status().into(),
         312  +
                                body,
         313  +
                            )
         314  +
                        }) {
         315  +
                        ::std::result::Result::Ok(val) => val,
         316  +
                        ::std::result::Result::Err(e) => {
         317  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         318  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         319  +
                            ))
         320  +
                        }
         321  +
                    };
         322  +
                    tmp.meta = generic;
         323  +
                    if tmp.message.is_none() {
         324  +
                        tmp.message = _error_message;
         325  +
                    }
         326  +
                    tmp
         327  +
                }),
         328  +
                "ServiceQuotaExceededException" => crate::operation::invoke_model::InvokeModelError::ServiceQuotaExceededException({
         329  +
                    let mut tmp = match protocol
         330  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         331  +
                        .and_then(|mut deser| {
         332  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         333  +
                                &mut *deser,
         334  +
                                response.headers(),
         335  +
                                response.status().into(),
         336  +
                                body,
         337  +
                            )
         338  +
                        }) {
         339  +
                        ::std::result::Result::Ok(val) => val,
         340  +
                        ::std::result::Result::Err(e) => {
         341  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         342  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         343  +
                            ))
         344  +
                        }
         345  +
                    };
         346  +
                    tmp.meta = generic;
         347  +
                    if tmp.message.is_none() {
         348  +
                        tmp.message = _error_message;
         349  +
                    }
         350  +
                    tmp
         351  +
                }),
         352  +
                "ServiceUnavailableException" => crate::operation::invoke_model::InvokeModelError::ServiceUnavailableException({
         353  +
                    let mut tmp = match protocol
         354  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         355  +
                        .and_then(|mut deser| {
         356  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         357  +
                                &mut *deser,
         358  +
                                response.headers(),
         359  +
                                response.status().into(),
         360  +
                                body,
         361  +
                            )
         362  +
                        }) {
         363  +
                        ::std::result::Result::Ok(val) => val,
         364  +
                        ::std::result::Result::Err(e) => {
         365  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         366  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         367  +
                            ))
         368  +
                        }
         369  +
                    };
         370  +
                    tmp.meta = generic;
         371  +
                    if tmp.message.is_none() {
         372  +
                        tmp.message = _error_message;
         373  +
                    }
         374  +
                    tmp
         375  +
                }),
         376  +
                "ThrottlingException" => crate::operation::invoke_model::InvokeModelError::ThrottlingException({
         377  +
                    let mut tmp = match protocol
         378  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         379  +
                        .and_then(|mut deser| {
         380  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         381  +
                                &mut *deser,
         382  +
                                response.headers(),
         383  +
                                response.status().into(),
         384  +
                                body,
         385  +
                            )
         386  +
                        }) {
         387  +
                        ::std::result::Result::Ok(val) => val,
         388  +
                        ::std::result::Result::Err(e) => {
         389  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         390  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         391  +
                            ))
         392  +
                        }
         393  +
                    };
         394  +
                    tmp.meta = generic;
         395  +
                    if tmp.message.is_none() {
         396  +
                        tmp.message = _error_message;
         397  +
                    }
         398  +
                    tmp
         399  +
                }),
         400  +
                "ValidationException" => crate::operation::invoke_model::InvokeModelError::ValidationException({
         401  +
                    let mut tmp = match protocol
         402  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         403  +
                        .and_then(|mut deser| {
         404  +
                            crate::types::error::ValidationException::deserialize_with_response(
         405  +
                                &mut *deser,
         406  +
                                response.headers(),
         407  +
                                response.status().into(),
         408  +
                                body,
         409  +
                            )
         410  +
                        }) {
         411  +
                        ::std::result::Result::Ok(val) => val,
         412  +
                        ::std::result::Result::Err(e) => {
         413  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         414  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         415  +
                            ))
         416  +
                        }
         417  +
                    };
         418  +
                    tmp.meta = generic;
         419  +
                    if tmp.message.is_none() {
         420  +
                        tmp.message = _error_message;
         421  +
                    }
         422  +
                    tmp
         423  +
                }),
         424  +
                _ => crate::operation::invoke_model::InvokeModelError::generic(generic),
         425  +
            };
         426  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         427  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         428  +
            ))
         429  +
        } else {
         430  +
            let protocol = _cfg
         431  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         432  +
                .expect("a SharedClientProtocol is required");
         433  +
            let mut deser = protocol.deserialize_response(response, InvokeModel::OUTPUT_SCHEMA, _cfg).map_err(|e| {
         434  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         435  +
            })?;
         436  +
            let body = response.body().bytes().expect("body loaded");
         437  +
            let output = crate::operation::invoke_model::InvokeModelOutput::deserialize_with_response(
         438  +
                &mut *deser,
         439  +
                response.headers(),
         440  +
                response.status().into(),
         441  +
                body,
         442  +
            )
         443  +
            .map_err(|e| {
         444  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         445  +
            })?;
         446  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         447  +
        }
  165    448   
    }
  166    449   
}
  167    450   
#[derive(Debug)]
  168    451   
struct InvokeModelRequestSerializer;
  169    452   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeModelRequestSerializer {
  170    453   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  171    454   
    fn serialize_input(
  172    455   
        &self,
  173    456   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  174    457   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  175    458   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  176    459   
        let input = input
  177    460   
            .downcast::<crate::operation::invoke_model::InvokeModelInput>()
  178    461   
            .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::invoke_model::InvokeModelInput,
  187         -
                output: &mut ::std::string::String,
  188         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  189         -
                use ::std::fmt::Write as _;
  190         -
                let input_1 = &_input.model_id;
  191         -
                let input_1 = input_1
  192         -
                    .as_ref()
  193         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("model_id", "cannot be empty or unset"))?;
  194         -
                let model_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
  195         -
                if model_id.is_empty() {
  196         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  197         -
                        "model_id",
  198         -
                        "cannot be empty or unset",
  199         -
                    ));
         462  +
        let protocol = _cfg
         463  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         464  +
            .expect("a SharedClientProtocol is required");
         465  +
        let mut input = input;
         466  +
        let payload = input.body.take();
         467  +
        let mut request = protocol
         468  +
            .serialize_request(&input, InvokeModel::INPUT_SCHEMA, "", _cfg)
         469  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         470  +
        if let ::std::option::Option::Some(payload) = payload {
         471  +
            *request.body_mut() = ::aws_smithy_types::body::SdkBody::from(payload.into_inner());
         472  +
            if !request.headers().contains_key("Content-Type") {
         473  +
                request.headers_mut().insert("Content-Type", "application/octet-stream");
         474  +
            }
         475  +
            if let ::std::option::Option::Some(content_length) = request.body().content_length() {
         476  +
                request.headers_mut().insert("Content-Length", content_length.to_string());
  200    477   
            }
  201         -
                ::std::write!(output, "/model/{modelId}/invoke", modelId = model_id).expect("formatting should succeed");
  202         -
                ::std::result::Result::Ok(())
  203    478   
        }
  204         -
            #[allow(clippy::unnecessary_wraps)]
  205         -
            fn update_http_builder(
  206         -
                input: &crate::operation::invoke_model::InvokeModelInput,
  207         -
                builder: ::http_1x::request::Builder,
  208         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  209         -
                let mut uri = ::std::string::String::new();
  210         -
                uri_base(input, &mut uri)?;
  211         -
                let builder = crate::protocol_serde::shape_invoke_model::ser_invoke_model_headers(input, builder)?;
  212         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  213         -
            }
  214         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  215         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
  216         -
            builder
  217         -
        };
  218         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_model_input::ser_body_http_payload(input.body)?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         479  +
         480  +
        return ::std::result::Result::Ok(request);
  224    481   
    }
  225    482   
}
  226    483   
#[derive(Debug)]
  227    484   
struct InvokeModelEndpointParamsInterceptor;
  228    485   
  229    486   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeModelEndpointParamsInterceptor {
  230    487   
    fn name(&self) -> &'static str {
  231    488   
        "InvokeModelEndpointParamsInterceptor"
  232    489   
    }
  233    490   

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

@@ -108,108 +332,372 @@
  128    128   
    0,
  129    129   
)
  130    130   
.with_http_payload();
  131    131   
static INVOKEMODELINPUT_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#InvokeModelInput$contentType",
  134    134   
        "com.amazonaws.bedrockruntime.synthetic",
  135    135   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_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#InvokeModelInput$accept",
  145    145   
        "com.amazonaws.bedrockruntime.synthetic",
  146    146   
        "InvokeModelInput",
  147    147   
    ),
  148    148   
    ::aws_smithy_schema::ShapeType::String,
  149    149   
    "accept",
  150    150   
    2,
  151    151   
)
  152    152   
.with_http_header("Accept");
  153    153   
static INVOKEMODELINPUT_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#InvokeModelInput$modelId",
  156    156   
        "com.amazonaws.bedrockruntime.synthetic",
  157    157   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_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#InvokeModelInput$trace",
  167    167   
        "com.amazonaws.bedrockruntime.synthetic",
  168    168   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_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#InvokeModelInput$guardrailIdentifier",
  178    178   
        "com.amazonaws.bedrockruntime.synthetic",
  179    179   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_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#InvokeModelInput$guardrailVersion",
  189    189   
        "com.amazonaws.bedrockruntime.synthetic",
  190    190   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_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#InvokeModelInput$performanceConfigLatency",
  200    200   
        "com.amazonaws.bedrockruntime.synthetic",
  201    201   
        "InvokeModelInput",
  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 INVOKEMODELINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  209    209   
    INVOKEMODELINPUT_SCHEMA_ID,
  210    210   
    ::aws_smithy_schema::ShapeType::Structure,
  211    211   
    &[
  212    212   
        &INVOKEMODELINPUT_MEMBER_BODY,
  213    213   
        &INVOKEMODELINPUT_MEMBER_CONTENT_TYPE,
  214    214   
        &INVOKEMODELINPUT_MEMBER_ACCEPT,
  215    215   
        &INVOKEMODELINPUT_MEMBER_MODEL_ID,
  216    216   
        &INVOKEMODELINPUT_MEMBER_TRACE,
  217    217   
        &INVOKEMODELINPUT_MEMBER_GUARDRAIL_IDENTIFIER,
  218    218   
        &INVOKEMODELINPUT_MEMBER_GUARDRAIL_VERSION,
  219    219   
        &INVOKEMODELINPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY,
  220    220   
    ],
  221         -
);
         221  +
)
         222  +
.with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/model/{modelId}/invoke", None));
  222    223   
impl InvokeModelInput {
  223    224   
    /// The schema for this shape.
  224    225   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVOKEMODELINPUT_SCHEMA;
  225    226   
}
  226    227   
impl ::aws_smithy_schema::serde::SerializableStruct for InvokeModelInput {
  227    228   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  228    229   
    fn serialize_members(
  229    230   
        &self,
  230    231   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  231    232   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  232    233   
        if let Some(ref val) = self.body {
  233    234   
            ser.write_blob(&INVOKEMODELINPUT_MEMBER_BODY, val)?;
  234    235   
        }
  235    236   
        if let Some(ref val) = self.content_type {
  236    237   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_CONTENT_TYPE, val)?;
  237    238   
        }
  238    239   
        if let Some(ref val) = self.accept {
  239    240   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_ACCEPT, val)?;
  240    241   
        }
  241    242   
        if let Some(ref val) = self.model_id {
  242    243   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_MODEL_ID, val)?;
  243    244   
        }
  244    245   
        if let Some(ref val) = self.trace {
  245    246   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_TRACE, val.as_str())?;
  246    247   
        }
  247    248   
        if let Some(ref val) = self.guardrail_identifier {
  248    249   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_GUARDRAIL_IDENTIFIER, val)?;
  249    250   
        }
  250    251   
        if let Some(ref val) = self.guardrail_version {
  251    252   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_GUARDRAIL_VERSION, val)?;
  252    253   
        }
  253    254   
        if let Some(ref val) = self.performance_config_latency {
  254    255   
            ser.write_string(&INVOKEMODELINPUT_MEMBER_PERFORMANCE_CONFIG_LATENCY, val.as_str())?;
  255    256   
        }
  256    257   
        Ok(())
  257    258   
    }
  258    259   
}
  259    260   
impl InvokeModelInput {
  260    261   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  261         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  262         -
        deserializer: &mut D,
         262  +
    pub fn deserialize(
         263  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  263    264   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  264    265   
        #[allow(unused_variables, unused_mut)]
  265    266   
        let mut builder = Self::builder();
  266    267   
        #[allow(
  267    268   
            unused_variables,
  268    269   
            unreachable_code,
  269    270   
            clippy::single_match,
  270    271   
            clippy::match_single_binding,
  271    272   
            clippy::diverging_sub_expression
  272    273   
        )]
  273         -
        deserializer.read_struct(&INVOKEMODELINPUT_SCHEMA, (), |_, member, deser| {
         274  +
        deserializer.read_struct(&INVOKEMODELINPUT_SCHEMA, &mut |member, deser| {
  274    275   
            match member.member_index() {
  275    276   
                Some(0) => {
  276    277   
                    builder.body = Some(deser.read_blob(member)?);
  277    278   
                }
  278    279   
                Some(1) => {
  279    280   
                    builder.content_type = Some(deser.read_string(member)?);
  280    281   
                }
  281    282   
                Some(2) => {
  282    283   
                    builder.accept = Some(deser.read_string(member)?);
  283    284   
                }
  284    285   
                Some(3) => {
  285    286   
                    builder.model_id = Some(deser.read_string(member)?);
  286    287   
                }
  287    288   
                Some(4) => {
  288    289   
                    builder.trace = Some(crate::types::Trace::from(deser.read_string(member)?.as_str()));
  289    290   
                }
  290    291   
                Some(5) => {
  291    292   
                    builder.guardrail_identifier = Some(deser.read_string(member)?);
  292    293   
                }
  293    294   
                Some(6) => {
  294    295   
                    builder.guardrail_version = Some(deser.read_string(member)?);
  295    296   
                }
  296    297   
                Some(7) => {
  297    298   
                    builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(deser.read_string(member)?.as_str()));
  298    299   
                }
  299    300   
                _ => {}
  300    301   
            }
  301    302   
            Ok(())
  302    303   
        })?;
         304  +
        builder.model_id = builder.model_id.or(Some(String::new()));
         305  +
        builder
         306  +
            .build()
         307  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         308  +
    }
         309  +
}
         310  +
impl InvokeModelInput {
         311  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         312  +
    /// Header-bound members are read directly from headers, avoiding runtime
         313  +
    /// member iteration overhead. Body members are read via the deserializer.
         314  +
    pub fn deserialize_with_response(
         315  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         316  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         317  +
        _status: u16,
         318  +
        body: &[u8],
         319  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         320  +
        #[allow(unused_variables, unused_mut)]
         321  +
        let mut builder = Self::builder();
         322  +
        if let Some(val) = headers.get("Content-Type") {
         323  +
            builder.content_type = Some(val.to_string());
         324  +
        }
         325  +
        if let Some(val) = headers.get("Accept") {
         326  +
            builder.accept = Some(val.to_string());
         327  +
        }
         328  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-Trace") {
         329  +
            builder.trace = Some(crate::types::Trace::from(val));
         330  +
        }
         331  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-GuardrailIdentifier") {
         332  +
            builder.guardrail_identifier = Some(val.to_string());
         333  +
        }
         334  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-GuardrailVersion") {
         335  +
            builder.guardrail_version = Some(val.to_string());
         336  +
        }
         337  +
        if let Some(val) = headers.get("X-Amzn-Bedrock-PerformanceConfig-Latency") {
         338  +
            builder.performance_config_latency = Some(crate::types::PerformanceConfigLatency::from(val));
         339  +
        }
         340  +
        if !body.is_empty() {
         341  +
            builder.body = Some(::aws_smithy_types::Blob::new(body.to_vec()));
         342  +
        }
  303    343   
        builder
  304    344   
            .build()
  305    345   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  306    346   
    }
  307    347   
}
  308    348   
impl InvokeModelInput {
  309    349   
    /// Creates a new builder-style object to manufacture [`InvokeModelInput`](crate::operation::invoke_model::InvokeModelInput).
  310    350   
    pub fn builder() -> crate::operation::invoke_model::builders::InvokeModelInputBuilder {
  311    351   
        crate::operation::invoke_model::builders::InvokeModelInputBuilder::default()
  312    352   
    }

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

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

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/operation/invoke_model_with_bidirectional_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 `InvokeModelWithBidirectionalStream`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct InvokeModelWithBidirectionalStream;
    6      6   
impl InvokeModelWithBidirectionalStream {
    7      7   
    /// Creates a new `InvokeModelWithBidirectionalStream`
    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_bidirectional_stream::InvokeModelWithBidirectionalStreamInput::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_bidirectional_stream::InvokeModelWithBidirectionalStreamOutput::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_bidirectional_stream::InvokeModelWithBidirectionalStreamInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -141,147 +282,564 @@
  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_bidirectional_stream::de_invoke_model_with_bidirectional_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_bidirectional_stream::de_invoke_model_with_bidirectional_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_bidirectional_stream::InvokeModelWithBidirectionalStreamError::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_bidirectional_stream::InvokeModelWithBidirectionalStreamError::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_bidirectional_stream::InvokeModelWithBidirectionalStreamError::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" => {
         260  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelErrorException({
         261  +
                    let mut tmp = match protocol
         262  +
                        .deserialize_response(response, crate::types::error::ModelErrorException::SCHEMA, _cfg)
         263  +
                        .and_then(|mut deser| {
         264  +
                            crate::types::error::ModelErrorException::deserialize_with_response(
         265  +
                                &mut *deser,
         266  +
                                response.headers(),
         267  +
                                response.status().into(),
         268  +
                                body,
         269  +
                            )
         270  +
                        }) {
         271  +
                        ::std::result::Result::Ok(val) => val,
         272  +
                        ::std::result::Result::Err(e) => {
         273  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         274  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         275  +
                            ))
         276  +
                        }
         277  +
                    };
         278  +
                    tmp.meta = generic;
         279  +
                    if tmp.message.is_none() {
         280  +
                        tmp.message = _error_message;
         281  +
                    }
         282  +
                    tmp
         283  +
                })
         284  +
            }
         285  +
            "ModelNotReadyException" => {
         286  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelNotReadyException({
         287  +
                    let mut tmp = match protocol
         288  +
                        .deserialize_response(response, crate::types::error::ModelNotReadyException::SCHEMA, _cfg)
         289  +
                        .and_then(|mut deser| {
         290  +
                            crate::types::error::ModelNotReadyException::deserialize_with_response(
         291  +
                                &mut *deser,
         292  +
                                response.headers(),
         293  +
                                response.status().into(),
         294  +
                                body,
         295  +
                            )
         296  +
                        }) {
         297  +
                        ::std::result::Result::Ok(val) => val,
         298  +
                        ::std::result::Result::Err(e) => {
         299  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         300  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         301  +
                            ))
         302  +
                        }
         303  +
                    };
         304  +
                    tmp.meta = generic;
         305  +
                    if tmp.message.is_none() {
         306  +
                        tmp.message = _error_message;
         307  +
                    }
         308  +
                    tmp
         309  +
                })
         310  +
            }
         311  +
            "ModelStreamErrorException" => {
         312  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelStreamErrorException({
         313  +
                    let mut tmp = match protocol
         314  +
                        .deserialize_response(response, crate::types::error::ModelStreamErrorException::SCHEMA, _cfg)
         315  +
                        .and_then(|mut deser| {
         316  +
                            crate::types::error::ModelStreamErrorException::deserialize_with_response(
         317  +
                                &mut *deser,
         318  +
                                response.headers(),
         319  +
                                response.status().into(),
         320  +
                                body,
         321  +
                            )
         322  +
                        }) {
         323  +
                        ::std::result::Result::Ok(val) => val,
         324  +
                        ::std::result::Result::Err(e) => {
         325  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         326  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         327  +
                            ))
         328  +
                        }
         329  +
                    };
         330  +
                    tmp.meta = generic;
         331  +
                    if tmp.message.is_none() {
         332  +
                        tmp.message = _error_message;
         333  +
                    }
         334  +
                    tmp
         335  +
                })
         336  +
            }
         337  +
            "ModelTimeoutException" => {
         338  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelTimeoutException({
         339  +
                    let mut tmp = match protocol
         340  +
                        .deserialize_response(response, crate::types::error::ModelTimeoutException::SCHEMA, _cfg)
         341  +
                        .and_then(|mut deser| {
         342  +
                            crate::types::error::ModelTimeoutException::deserialize_with_response(
         343  +
                                &mut *deser,
         344  +
                                response.headers(),
         345  +
                                response.status().into(),
         346  +
                                body,
         347  +
                            )
         348  +
                        }) {
         349  +
                        ::std::result::Result::Ok(val) => val,
         350  +
                        ::std::result::Result::Err(e) => {
         351  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         352  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         353  +
                            ))
         354  +
                        }
         355  +
                    };
         356  +
                    tmp.meta = generic;
         357  +
                    if tmp.message.is_none() {
         358  +
                        tmp.message = _error_message;
         359  +
                    }
         360  +
                    tmp
         361  +
                })
         362  +
            }
         363  +
            "ResourceNotFoundException" => {
         364  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ResourceNotFoundException({
         365  +
                    let mut tmp = match protocol
         366  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         367  +
                        .and_then(|mut deser| {
         368  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         369  +
                                &mut *deser,
         370  +
                                response.headers(),
         371  +
                                response.status().into(),
         372  +
                                body,
         373  +
                            )
         374  +
                        }) {
         375  +
                        ::std::result::Result::Ok(val) => val,
         376  +
                        ::std::result::Result::Err(e) => {
         377  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         378  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         379  +
                            ))
         380  +
                        }
         381  +
                    };
         382  +
                    tmp.meta = generic;
         383  +
                    if tmp.message.is_none() {
         384  +
                        tmp.message = _error_message;
         385  +
                    }
         386  +
                    tmp
         387  +
                })
         388  +
            }
         389  +
            "ServiceQuotaExceededException" => {
         390  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ServiceQuotaExceededException({
         391  +
                    let mut tmp = match protocol
         392  +
                        .deserialize_response(response, crate::types::error::ServiceQuotaExceededException::SCHEMA, _cfg)
         393  +
                        .and_then(|mut deser| {
         394  +
                            crate::types::error::ServiceQuotaExceededException::deserialize_with_response(
         395  +
                                &mut *deser,
         396  +
                                response.headers(),
         397  +
                                response.status().into(),
         398  +
                                body,
         399  +
                            )
         400  +
                        }) {
         401  +
                        ::std::result::Result::Ok(val) => val,
         402  +
                        ::std::result::Result::Err(e) => {
         403  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         404  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         405  +
                            ))
         406  +
                        }
         407  +
                    };
         408  +
                    tmp.meta = generic;
         409  +
                    if tmp.message.is_none() {
         410  +
                        tmp.message = _error_message;
         411  +
                    }
         412  +
                    tmp
         413  +
                })
         414  +
            }
         415  +
            "ServiceUnavailableException" => {
         416  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ServiceUnavailableException({
         417  +
                    let mut tmp = match protocol
         418  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         419  +
                        .and_then(|mut deser| {
         420  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         421  +
                                &mut *deser,
         422  +
                                response.headers(),
         423  +
                                response.status().into(),
         424  +
                                body,
         425  +
                            )
         426  +
                        }) {
         427  +
                        ::std::result::Result::Ok(val) => val,
         428  +
                        ::std::result::Result::Err(e) => {
         429  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         430  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         431  +
                            ))
         432  +
                        }
         433  +
                    };
         434  +
                    tmp.meta = generic;
         435  +
                    if tmp.message.is_none() {
         436  +
                        tmp.message = _error_message;
         437  +
                    }
         438  +
                    tmp
         439  +
                })
         440  +
            }
         441  +
            "ThrottlingException" => {
         442  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ThrottlingException({
         443  +
                    let mut tmp = match protocol
         444  +
                        .deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
         445  +
                        .and_then(|mut deser| {
         446  +
                            crate::types::error::ThrottlingException::deserialize_with_response(
         447  +
                                &mut *deser,
         448  +
                                response.headers(),
         449  +
                                response.status().into(),
         450  +
                                body,
         451  +
                            )
         452  +
                        }) {
         453  +
                        ::std::result::Result::Ok(val) => val,
         454  +
                        ::std::result::Result::Err(e) => {
         455  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         456  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         457  +
                            ))
         458  +
                        }
         459  +
                    };
         460  +
                    tmp.meta = generic;
         461  +
                    if tmp.message.is_none() {
         462  +
                        tmp.message = _error_message;
         463  +
                    }
         464  +
                    tmp
         465  +
                })
         466  +
            }
         467  +
            "ValidationException" => {
         468  +
                crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ValidationException({
         469  +
                    let mut tmp = match protocol
         470  +
                        .deserialize_response(response, crate::types::error::ValidationException::SCHEMA, _cfg)
         471  +
                        .and_then(|mut deser| {
         472  +
                            crate::types::error::ValidationException::deserialize_with_response(
         473  +
                                &mut *deser,
         474  +
                                response.headers(),
         475  +
                                response.status().into(),
  181    476   
                                body,
  182         -
            ),
  183    477   
                            )
         478  +
                        }) {
         479  +
                        ::std::result::Result::Ok(val) => val,
         480  +
                        ::std::result::Result::Err(e) => {
         481  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         482  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         483  +
                            ))
         484  +
                        }
         485  +
                    };
         486  +
                    tmp.meta = generic;
         487  +
                    if tmp.message.is_none() {
         488  +
                        tmp.message = _error_message;
         489  +
                    }
         490  +
                    tmp
         491  +
                })
         492  +
            }
         493  +
            _ => crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::generic(generic),
         494  +
        };
         495  +
        ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         496  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         497  +
        ))
  184    498   
    }
  185    499   
}
  186    500   
#[derive(Debug)]
  187    501   
struct InvokeModelWithBidirectionalStreamRequestSerializer;
  188    502   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeModelWithBidirectionalStreamRequestSerializer {
  189    503   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  190    504   
    fn serialize_input(
  191    505   
        &self,
  192    506   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  193    507   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  194    508   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  195    509   
        let input = input
  196    510   
            .downcast::<crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamInput>()
  197    511   
            .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_bidirectional_stream::InvokeModelWithBidirectionalStreamInput,
  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         -
                    ));
  219         -
                }
  220         -
                ::std::write!(output, "/model/{modelId}/invoke-with-bidirectional-stream", modelId = model_id).expect("formatting should succeed");
  221         -
                ::std::result::Result::Ok(())
  222         -
            }
  223         -
            #[allow(clippy::unnecessary_wraps)]
  224         -
            fn update_http_builder(
  225         -
                input: &crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamInput,
  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         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  231         -
            }
  232         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  233         -
            builder =
  234         -
                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  235         -
            builder
  236         -
        };
  237         -
        let body = ::aws_smithy_types::body::SdkBody::from({
         512  +
        let protocol = _cfg
         513  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         514  +
            .expect("a SharedClientProtocol is required");
         515  +
        let mut request = protocol
         516  +
            .serialize_request(&input, InvokeModelWithBidirectionalStream::INPUT_SCHEMA, "", _cfg)
         517  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         518  +
        *request.body_mut() = ::aws_smithy_types::body::SdkBody::from({
  238    519   
            let error_marshaller = crate::event_stream_serde::InvokeModelWithBidirectionalStreamInputErrorMarshaller::new();
  239    520   
            let marshaller = crate::event_stream_serde::InvokeModelWithBidirectionalStreamInputMarshaller::new();
  240    521   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  241    522   
            _cfg.interceptor_state().store_put(signer_sender);
  242    523   
            ::aws_smithy_types::body::SdkBody::from_body_1_x(::http_body_util::StreamBody::new(input.body.into_body_stream(
  243    524   
                marshaller,
  244    525   
                error_marshaller,
  245    526   
                signer,
  246    527   
            )))
  247    528   
        });
  248         -
        if let Some(content_length) = body.content_length() {
  249         -
            let content_length = content_length.to_string();
  250         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  251         -
        }
  252         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         529  +
        // The protocol may have set Content-Length based on the initial empty body.
         530  +
        // Remove it since the event stream body has unknown length.
         531  +
        request.headers_mut().remove("Content-Length");
         532  +
        request.headers_mut().insert("Content-Type", "application/vnd.amazon.eventstream");
         533  +
         534  +
        return ::std::result::Result::Ok(request);
  253    535   
    }
  254    536   
}
  255    537   
#[derive(Debug)]
  256    538   
struct InvokeModelWithBidirectionalStreamEndpointParamsInterceptor;
  257    539   
  258    540   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeModelWithBidirectionalStreamEndpointParamsInterceptor {
  259    541   
    fn name(&self) -> &'static str {
  260    542   
        "InvokeModelWithBidirectionalStreamEndpointParamsInterceptor"
  261    543   
    }
  262    544   

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]