AWS SDK

AWS SDK

rev. 52a747aa19d8f7ff1fb936dafeb9929959f2f20f

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/src/event_stream/receiver.rs

@@ -93,93 +188,203 @@
  113    113   
pub struct Receiver<T, E> {
  114    114   
    unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send + Sync>,
  115    115   
    decoder: MessageFrameDecoder,
  116    116   
    buffer: RecvBuf,
  117    117   
    body: SdkBody,
  118    118   
    /// Event Stream has optional initial response frames an with `:message-type` of
  119    119   
    /// `initial-response`. If `try_recv_initial()` is called and the next message isn't an
  120    120   
    /// initial response, then the message will be stored in `buffered_message` so that it can
  121    121   
    /// be returned with the next call of `recv()`.
  122    122   
    buffered_message: Option<Message>,
         123  +
    /// Stores initial-request or initial-response messages that were filtered out by `recv()`.
         124  +
    /// These are only returned when `try_recv_initial()` is explicitly called.
         125  +
    buffered_initial_message: Option<Message>,
  123    126   
    _phantom: PhantomData<E>,
  124    127   
}
  125    128   
  126    129   
// Used by `Receiver::try_recv_initial`, hence this enum is also doc hidden
  127    130   
#[doc(hidden)]
  128    131   
#[non_exhaustive]
  129    132   
pub enum InitialMessageType {
  130    133   
    Request,
  131    134   
    Response,
  132    135   
}
  133    136   
  134    137   
impl InitialMessageType {
  135    138   
    fn as_str(&self) -> &'static str {
  136    139   
        match self {
  137    140   
            InitialMessageType::Request => "initial-request",
  138    141   
            InitialMessageType::Response => "initial-response",
  139    142   
        }
  140    143   
    }
  141    144   
}
  142    145   
  143    146   
impl<T, E> Receiver<T, E> {
  144    147   
    /// Creates a new `Receiver` with the given message unmarshaller and SDK body.
  145    148   
    pub fn new(
  146    149   
        unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + Sync + 'static,
  147    150   
        body: SdkBody,
  148    151   
    ) -> Self {
  149    152   
        Receiver {
  150    153   
            unmarshaller: Box::new(unmarshaller),
  151    154   
            decoder: MessageFrameDecoder::new(),
  152    155   
            buffer: RecvBuf::Empty,
  153    156   
            body,
  154    157   
            buffered_message: None,
         158  +
            buffered_initial_message: None,
  155    159   
            _phantom: Default::default(),
  156    160   
        }
  157    161   
    }
  158    162   
         163  +
    /// Checks if a message is an initial-request or initial-response message.
         164  +
    fn is_initial_message(message: &Message) -> bool {
         165  +
        message
         166  +
            .headers()
         167  +
            .iter()
         168  +
            .find(|h| h.name().as_str() == ":event-type")
         169  +
            .and_then(|h| h.value().as_string().ok())
         170  +
            .map(|s| s.as_str() == "initial-request" || s.as_str() == "initial-response")
         171  +
            .unwrap_or(false)
         172  +
    }
         173  +
  159    174   
    fn unmarshall(&self, message: Message) -> Result<Option<T>, SdkError<E, RawMessage>> {
  160    175   
        match self.unmarshaller.unmarshall(&message) {
  161    176   
            Ok(unmarshalled) => match unmarshalled {
  162    177   
                UnmarshalledMessage::Event(event) => Ok(Some(event)),
  163    178   
                UnmarshalledMessage::Error(err) => {
  164    179   
                    Err(SdkError::service_error(err, RawMessage::Decoded(message)))
  165    180   
                }
  166    181   
            },
  167    182   
            Err(err) => Err(SdkError::response_error(err, RawMessage::Decoded(message))),
  168    183   
        }
@@ -213,228 +329,366 @@
  233    248   
            .await
  234    249   
            .map(|opt| opt.map(|(msg, _)| msg))
  235    250   
    }
  236    251   
  237    252   
    /// Tries to receive the initial response message with preprocessing support.
  238    253   
    ///
  239    254   
    /// The preprocessor function can transform the raw message (e.g., unwrap envelopes)
  240    255   
    /// and return metadata alongside the transformed message. If the transformed message
  241    256   
    /// matches the expected `message_type`, both the message and metadata are returned.
  242    257   
    /// Otherwise, the transformed message is buffered and `Ok(None)` is returned.
         258  +
    ///
         259  +
    /// This method will block waiting for a message if no initial message has been buffered yet.
  243    260   
    #[doc(hidden)]
  244    261   
    pub async fn try_recv_initial_with_preprocessor<F, M>(
  245    262   
        &mut self,
  246    263   
        message_type: InitialMessageType,
  247    264   
        preprocessor: F,
  248    265   
    ) -> Result<Option<(Message, M)>, SdkError<E, RawMessage>>
  249    266   
    where
  250    267   
        F: FnOnce(Message) -> Result<(Message, M), ResponseError<RawMessage>>,
  251    268   
    {
  252         -
        if let Some(message) = self.next_message().await? {
  253         -
            let (processed_message, metadata) =
  254         -
                preprocessor(message.clone()).map_err(|err| SdkError::ResponseError(err))?;
  255         -
  256         -
            if let Some(event_type) = processed_message
  257         -
                .headers()
  258         -
                .iter()
  259         -
                .find(|h| h.name().as_str() == ":event-type")
         269  +
        // Check if we already have a buffered initial message from recv()
         270  +
        let message = if let Some(buffered) = self.buffered_initial_message.take() {
         271  +
            buffered
         272  +
        } else {
         273  +
            // Otherwise, block waiting for the next message
         274  +
            match self.next_message().await? {
         275  +
                Some(msg) => msg,
         276  +
                None => return Ok(None),
         277  +
            }
         278  +
        };
         279  +
         280  +
        let (processed_message, metadata) =
         281  +
            preprocessor(message.clone()).map_err(|err| SdkError::ResponseError(err))?;
         282  +
         283  +
        if let Some(event_type) = processed_message
         284  +
            .headers()
         285  +
            .iter()
         286  +
            .find(|h| h.name().as_str() == ":event-type")
         287  +
        {
         288  +
            if event_type
         289  +
                .value()
         290  +
                .as_string()
         291  +
                .ok()
         292  +
                .map(|s| s.as_str() == message_type.as_str())
         293  +
                .unwrap_or(false)
  260    294   
            {
  261         -
                if event_type
  262         -
                    .value()
  263         -
                    .as_string()
  264         -
                    .map(|s| s.as_str() == message_type.as_str())
  265         -
                    .unwrap_or(false)
  266         -
                {
  267         -
                    return Ok(Some((processed_message, metadata)));
  268         -
                }
         295  +
                return Ok(Some((processed_message, metadata)));
  269    296   
            }
  270         -
            // Buffer the processed message so that it can be returned by the next call to `recv()`
  271         -
            self.buffered_message = Some(message);
  272    297   
        }
         298  +
        // Buffer the original message so that it can be returned by the next call to `recv()`
         299  +
        self.buffered_message = Some(message);
  273    300   
        Ok(None)
  274    301   
    }
  275    302   
  276    303   
    /// Asynchronously tries to receive a message from the stream. If the stream has ended,
  277    304   
    /// it returns an `Ok(None)`. If there is a transport layer error, it will return
  278    305   
    /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned
  279    306   
    /// messages.
         307  +
    ///
         308  +
    /// This method filters out initial-request and initial-response messages. Those messages
         309  +
    /// are only returned when `try_recv_initial()` is explicitly called.
  280    310   
    pub async fn recv(&mut self) -> Result<Option<T>, SdkError<E, RawMessage>> {
  281         -
        if let Some(buffered) = self.buffered_message.take() {
  282         -
            return match self.unmarshall(buffered) {
  283         -
                Ok(message) => Ok(message),
  284         -
                Err(error) => {
  285         -
                    self.buffer = RecvBuf::Terminated;
  286         -
                    Err(error)
         311  +
        loop {
         312  +
            if let Some(buffered) = self.buffered_message.take() {
         313  +
                return match self.unmarshall(buffered) {
         314  +
                    Ok(message) => Ok(message),
         315  +
                    Err(error) => {
         316  +
                        self.buffer = RecvBuf::Terminated;
         317  +
                        Err(error)
         318  +
                    }
         319  +
                };
         320  +
            }
         321  +
            if let Some(message) = self.next_message().await? {
         322  +
                // Filter out initial messages - store them separately
         323  +
                if Self::is_initial_message(&message) {
         324  +
                    self.buffered_initial_message = Some(message);
         325  +
                    continue;
  287    326   
                }
  288         -
            };
  289         -
        }
  290         -
        if let Some(message) = self.next_message().await? {
  291         -
            match self.unmarshall(message) {
  292         -
                Ok(message) => Ok(message),
  293         -
                Err(error) => {
  294         -
                    self.buffer = RecvBuf::Terminated;
  295         -
                    Err(error)
         327  +
                match self.unmarshall(message) {
         328  +
                    Ok(message) => return Ok(message),
         329  +
                    Err(error) => {
         330  +
                        self.buffer = RecvBuf::Terminated;
         331  +
                        return Err(error);
         332  +
                    }
  296    333   
                }
         334  +
            } else {
         335  +
                return Ok(None);
  297    336   
            }
  298         -
        } else {
  299         -
            Ok(None)
  300    337   
        }
  301    338   
    }
  302    339   
}
  303    340   
  304    341   
#[cfg(test)]
  305    342   
mod tests {
  306    343   
    use super::{InitialMessageType, Receiver, UnmarshallMessage};
  307    344   
    use aws_smithy_eventstream::error::Error as EventStreamError;
  308    345   
    use aws_smithy_eventstream::frame::{write_message_to, UnmarshalledMessage};
  309    346   
    use aws_smithy_runtime_api::client::result::SdkError;

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-legacy-http/src/event_stream/receiver.rs

@@ -1,1 +39,39 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
    6      6   
use aws_smithy_eventstream::frame::{
    7      7   
    DecodedFrame, MessageFrameDecoder, UnmarshallMessage, UnmarshalledMessage,
    8      8   
};
    9         -
use aws_smithy_runtime_api::client::result::{ConnectorError, SdkError};
           9  +
use aws_smithy_runtime_api::client::result::{ConnectorError, ResponseError, SdkError};
   10     10   
use aws_smithy_types::body::SdkBody;
   11     11   
use aws_smithy_types::event_stream::{Message, RawMessage};
   12     12   
use bytes::Buf;
   13     13   
use bytes::Bytes;
   14     14   
use bytes_utils::SegmentedBuf;
   15     15   
use std::error::Error as StdError;
   16     16   
use std::fmt;
   17     17   
use std::marker::PhantomData;
   18     18   
use std::mem;
   19     19   
use tracing::trace;
@@ -93,93 +188,203 @@
  113    113   
pub struct Receiver<T, E> {
  114    114   
    unmarshaller: Box<dyn UnmarshallMessage<Output = T, Error = E> + Send + Sync>,
  115    115   
    decoder: MessageFrameDecoder,
  116    116   
    buffer: RecvBuf,
  117    117   
    body: SdkBody,
  118    118   
    /// Event Stream has optional initial response frames an with `:message-type` of
  119    119   
    /// `initial-response`. If `try_recv_initial()` is called and the next message isn't an
  120    120   
    /// initial response, then the message will be stored in `buffered_message` so that it can
  121    121   
    /// be returned with the next call of `recv()`.
  122    122   
    buffered_message: Option<Message>,
         123  +
    /// Stores initial-request or initial-response messages that were filtered out by `recv()`.
         124  +
    /// These are only returned when `try_recv_initial()` is explicitly called.
         125  +
    buffered_initial_message: Option<Message>,
  123    126   
    _phantom: PhantomData<E>,
  124    127   
}
  125    128   
  126    129   
// Used by `Receiver::try_recv_initial`, hence this enum is also doc hidden
  127    130   
#[doc(hidden)]
  128    131   
#[non_exhaustive]
  129    132   
pub enum InitialMessageType {
  130    133   
    Request,
  131    134   
    Response,
  132    135   
}
  133    136   
  134    137   
impl InitialMessageType {
  135    138   
    fn as_str(&self) -> &'static str {
  136    139   
        match self {
  137    140   
            InitialMessageType::Request => "initial-request",
  138    141   
            InitialMessageType::Response => "initial-response",
  139    142   
        }
  140    143   
    }
  141    144   
}
  142    145   
  143    146   
impl<T, E> Receiver<T, E> {
  144    147   
    /// Creates a new `Receiver` with the given message unmarshaller and SDK body.
  145    148   
    pub fn new(
  146    149   
        unmarshaller: impl UnmarshallMessage<Output = T, Error = E> + Send + Sync + 'static,
  147    150   
        body: SdkBody,
  148    151   
    ) -> Self {
  149    152   
        Receiver {
  150    153   
            unmarshaller: Box::new(unmarshaller),
  151    154   
            decoder: MessageFrameDecoder::new(),
  152    155   
            buffer: RecvBuf::Empty,
  153    156   
            body,
  154    157   
            buffered_message: None,
         158  +
            buffered_initial_message: None,
  155    159   
            _phantom: Default::default(),
  156    160   
        }
  157    161   
    }
  158    162   
         163  +
    /// Checks if a message is an initial-request or initial-response message.
         164  +
    fn is_initial_message(message: &Message) -> bool {
         165  +
        message
         166  +
            .headers()
         167  +
            .iter()
         168  +
            .find(|h| h.name().as_str() == ":event-type")
         169  +
            .and_then(|h| h.value().as_string().ok())
         170  +
            .map(|s| s.as_str() == "initial-request" || s.as_str() == "initial-response")
         171  +
            .unwrap_or(false)
         172  +
    }
         173  +
  159    174   
    fn unmarshall(&self, message: Message) -> Result<Option<T>, SdkError<E, RawMessage>> {
  160    175   
        match self.unmarshaller.unmarshall(&message) {
  161    176   
            Ok(unmarshalled) => match unmarshalled {
  162    177   
                UnmarshalledMessage::Event(event) => Ok(Some(event)),
  163    178   
                UnmarshalledMessage::Error(err) => {
  164    179   
                    Err(SdkError::service_error(err, RawMessage::Decoded(message)))
  165    180   
                }
  166    181   
            },
  167    182   
            Err(err) => Err(SdkError::response_error(err, RawMessage::Decoded(message))),
  168    183   
        }
@@ -202,217 +306,366 @@
  222    237   
        Ok(None)
  223    238   
    }
  224    239   
  225    240   
    /// Tries to receive the initial response message that has `:event-type` of a given `message_type`.
  226    241   
    /// If a different event type is received, then it is buffered and `Ok(None)` is returned.
  227    242   
    #[doc(hidden)]
  228    243   
    pub async fn try_recv_initial(
  229    244   
        &mut self,
  230    245   
        message_type: InitialMessageType,
  231    246   
    ) -> Result<Option<Message>, SdkError<E, RawMessage>> {
  232         -
        if let Some(message) = self.next_message().await? {
  233         -
            if let Some(event_type) = message
  234         -
                .headers()
  235         -
                .iter()
  236         -
                .find(|h| h.name().as_str() == ":event-type")
         247  +
        self.try_recv_initial_with_preprocessor(message_type, |msg| Ok((msg, ())))
         248  +
            .await
         249  +
            .map(|opt| opt.map(|(msg, _)| msg))
         250  +
    }
         251  +
         252  +
    /// Tries to receive the initial response message with preprocessing support.
         253  +
    ///
         254  +
    /// The preprocessor function can transform the raw message (e.g., unwrap envelopes)
         255  +
    /// and return metadata alongside the transformed message. If the transformed message
         256  +
    /// matches the expected `message_type`, both the message and metadata are returned.
         257  +
    /// Otherwise, the transformed message is buffered and `Ok(None)` is returned.
         258  +
    ///
         259  +
    /// This method will block waiting for a message if no initial message has been buffered yet.
         260  +
    #[doc(hidden)]
         261  +
    pub async fn try_recv_initial_with_preprocessor<F, M>(
         262  +
        &mut self,
         263  +
        message_type: InitialMessageType,
         264  +
        preprocessor: F,
         265  +
    ) -> Result<Option<(Message, M)>, SdkError<E, RawMessage>>
         266  +
    where
         267  +
        F: FnOnce(Message) -> Result<(Message, M), ResponseError<RawMessage>>,
         268  +
    {
         269  +
        // Check if we already have a buffered initial message from recv()
         270  +
        let message = if let Some(buffered) = self.buffered_initial_message.take() {
         271  +
            buffered
         272  +
        } else {
         273  +
            // Otherwise, block waiting for the next message
         274  +
            match self.next_message().await? {
         275  +
                Some(msg) => msg,
         276  +
                None => return Ok(None),
         277  +
            }
         278  +
        };
         279  +
         280  +
        let (processed_message, metadata) =
         281  +
            preprocessor(message.clone()).map_err(|err| SdkError::ResponseError(err))?;
         282  +
         283  +
        if let Some(event_type) = processed_message
         284  +
            .headers()
         285  +
            .iter()
         286  +
            .find(|h| h.name().as_str() == ":event-type")
         287  +
        {
         288  +
            if event_type
         289  +
                .value()
         290  +
                .as_string()
         291  +
                .ok()
         292  +
                .map(|s| s.as_str() == message_type.as_str())
         293  +
                .unwrap_or(false)
  237    294   
            {
  238         -
                if event_type
  239         -
                    .value()
  240         -
                    .as_string()
  241         -
                    .map(|s| s.as_str() == message_type.as_str())
  242         -
                    .unwrap_or(false)
  243         -
                {
  244         -
                    return Ok(Some(message));
  245         -
                }
         295  +
                return Ok(Some((processed_message, metadata)));
  246    296   
            }
  247         -
            // Buffer the message so that it can be returned by the next call to `recv()`
  248         -
            self.buffered_message = Some(message);
  249    297   
        }
         298  +
        // Buffer the original message so that it can be returned by the next call to `recv()`
         299  +
        self.buffered_message = Some(message);
  250    300   
        Ok(None)
  251    301   
    }
  252    302   
  253    303   
    /// Asynchronously tries to receive a message from the stream. If the stream has ended,
  254    304   
    /// it returns an `Ok(None)`. If there is a transport layer error, it will return
  255    305   
    /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned
  256    306   
    /// messages.
         307  +
    ///
         308  +
    /// This method filters out initial-request and initial-response messages. Those messages
         309  +
    /// are only returned when `try_recv_initial()` is explicitly called.
  257    310   
    pub async fn recv(&mut self) -> Result<Option<T>, SdkError<E, RawMessage>> {
  258         -
        if let Some(buffered) = self.buffered_message.take() {
  259         -
            return match self.unmarshall(buffered) {
  260         -
                Ok(message) => Ok(message),
  261         -
                Err(error) => {
  262         -
                    self.buffer = RecvBuf::Terminated;
  263         -
                    Err(error)
         311  +
        loop {
         312  +
            if let Some(buffered) = self.buffered_message.take() {
         313  +
                return match self.unmarshall(buffered) {
         314  +
                    Ok(message) => Ok(message),
         315  +
                    Err(error) => {
         316  +
                        self.buffer = RecvBuf::Terminated;
         317  +
                        Err(error)
         318  +
                    }
         319  +
                };
         320  +
            }
         321  +
            if let Some(message) = self.next_message().await? {
         322  +
                // Filter out initial messages - store them separately
         323  +
                if Self::is_initial_message(&message) {
         324  +
                    self.buffered_initial_message = Some(message);
         325  +
                    continue;
  264    326   
                }
  265         -
            };
  266         -
        }
  267         -
        if let Some(message) = self.next_message().await? {
  268         -
            match self.unmarshall(message) {
  269         -
                Ok(message) => Ok(message),
  270         -
                Err(error) => {
  271         -
                    self.buffer = RecvBuf::Terminated;
  272         -
                    Err(error)
         327  +
                match self.unmarshall(message) {
         328  +
                    Ok(message) => return Ok(message),
         329  +
                    Err(error) => {
         330  +
                        self.buffer = RecvBuf::Terminated;
         331  +
                        return Err(error);
         332  +
                    }
  273    333   
                }
         334  +
            } else {
         335  +
                return Ok(None);
  274    336   
            }
  275         -
        } else {
  276         -
            Ok(None)
  277    337   
        }
  278    338   
    }
  279    339   
}
  280    340   
  281    341   
#[cfg(test)]
  282    342   
mod tests {
  283    343   
    use super::{InitialMessageType, Receiver, UnmarshallMessage};
  284    344   
    use aws_smithy_eventstream::error::Error as EventStreamError;
  285    345   
    use aws_smithy_eventstream::frame::{write_message_to, UnmarshalledMessage};
  286    346   
    use aws_smithy_runtime_api::client::result::SdkError;

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

@@ -71,71 +161,133 @@
   91     91   
    > {
   92     92   
        let input = self
   93     93   
            .inner
   94     94   
            .build()
   95     95   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   96     96   
        let runtime_plugins = crate::operation::converse_stream::ConverseStream::operation_runtime_plugins(
   97     97   
            self.handle.runtime_plugins.clone(),
   98     98   
            &self.handle.conf,
   99     99   
            self.config_override,
  100    100   
        );
  101         -
        let mut output = crate::operation::converse_stream::ConverseStream::orchestrate(&runtime_plugins, input).await?;
         101  +
        let output = crate::operation::converse_stream::ConverseStream::orchestrate(&runtime_plugins, input).await?;
  102    102   
  103         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  104         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  105         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  106         -
        // This means that header information from the original response has been lost.
  107         -
        //
  108         -
        // Note that the response body would have been consumed by the deserializer
  109         -
        // regardless, even if the initial message was hypothetically processed during
  110         -
        // the orchestrator's deserialization phase but later resulted in an error.
  111         -
        fn response_error(
  112         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  113         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  114         -
            crate::operation::converse_stream::ConverseStreamError,
  115         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  116         -
        > {
  117         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  118         -
                err,
  119         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  120         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  121         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  122         -
                ),
  123         -
            )
  124         -
        }
  125         -
  126         -
        let message = output.stream.try_recv_initial_response().await.map_err(response_error)?;
  127         -
  128         -
        match message {
  129         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  130         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  131         -
        }
         103  +
        ::std::result::Result::Ok(output)
  132    104   
    }
  133    105   
  134    106   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  135    107   
    pub fn customize(
  136    108   
        self,
  137    109   
    ) -> crate::client::customize::CustomizableOperation<
  138    110   
        crate::operation::converse_stream::ConverseStreamOutput,
  139    111   
        crate::operation::converse_stream::ConverseStreamError,
  140    112   
        Self,
  141    113   
    > {

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

@@ -60,60 +152,124 @@
   80     80   
    > {
   81     81   
        let input = self
   82     82   
            .inner
   83     83   
            .build()
   84     84   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   85     85   
        let runtime_plugins = crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStream::operation_runtime_plugins(
   86     86   
            self.handle.runtime_plugins.clone(),
   87     87   
            &self.handle.conf,
   88     88   
            self.config_override,
   89     89   
        );
   90         -
        let mut output =
          90  +
        let output =
   91     91   
            crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStream::orchestrate(&runtime_plugins, input)
   92     92   
                .await?;
   93     93   
   94         -
        // Converts any error encountered beyond this point into an `SdkError` response error
   95         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
   96         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
   97         -
        // This means that header information from the original response has been lost.
   98         -
        //
   99         -
        // Note that the response body would have been consumed by the deserializer
  100         -
        // regardless, even if the initial message was hypothetically processed during
  101         -
        // the orchestrator's deserialization phase but later resulted in an error.
  102         -
        fn response_error(
  103         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  104         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  105         -
            crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError,
  106         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  107         -
        > {
  108         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  109         -
                err,
  110         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  111         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  112         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  113         -
                ),
  114         -
            )
  115         -
        }
  116         -
  117         -
        let message = output.body.try_recv_initial_response().await.map_err(response_error)?;
  118         -
  119         -
        match message {
  120         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  121         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  122         -
        }
          94  +
        ::std::result::Result::Ok(output)
  123     95   
    }
  124     96   
  125     97   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  126     98   
    pub fn customize(
  127     99   
        self,
  128    100   
    ) -> crate::client::customize::CustomizableOperation<
  129    101   
        crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamOutput,
  130    102   
        crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError,
  131    103   
        Self,
  132    104   
    > {

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

@@ -67,67 +158,129 @@
   87     87   
    > {
   88     88   
        let input = self
   89     89   
            .inner
   90     90   
            .build()
   91     91   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   92     92   
        let runtime_plugins = crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStream::operation_runtime_plugins(
   93     93   
            self.handle.runtime_plugins.clone(),
   94     94   
            &self.handle.conf,
   95     95   
            self.config_override,
   96     96   
        );
   97         -
        let mut output =
   98         -
            crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStream::orchestrate(&runtime_plugins, input).await?;
          97  +
        let output = crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStream::orchestrate(&runtime_plugins, input).await?;
   99     98   
  100         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  101         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  102         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  103         -
        // This means that header information from the original response has been lost.
  104         -
        //
  105         -
        // Note that the response body would have been consumed by the deserializer
  106         -
        // regardless, even if the initial message was hypothetically processed during
  107         -
        // the orchestrator's deserialization phase but later resulted in an error.
  108         -
        fn response_error(
  109         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  110         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  111         -
            crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError,
  112         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  113         -
        > {
  114         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  115         -
                err,
  116         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  117         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  118         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  119         -
                ),
  120         -
            )
  121         -
        }
  122         -
  123         -
        let message = output.body.try_recv_initial_response().await.map_err(response_error)?;
  124         -
  125         -
        match message {
  126         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  127         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  128         -
        }
          99  +
        ::std::result::Result::Ok(output)
  129    100   
    }
  130    101   
  131    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  132    103   
    pub fn customize(
  133    104   
        self,
  134    105   
    ) -> crate::client::customize::CustomizableOperation<
  135    106   
        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamOutput,
  136    107   
        crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError,
  137    108   
        Self,
  138    109   
    > {

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/get_log_object/builders.rs

@@ -65,65 +155,127 @@
   85     85   
    > {
   86     86   
        let input = self
   87     87   
            .inner
   88     88   
            .build()
   89     89   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   90     90   
        let runtime_plugins = crate::operation::get_log_object::GetLogObject::operation_runtime_plugins(
   91     91   
            self.handle.runtime_plugins.clone(),
   92     92   
            &self.handle.conf,
   93     93   
            self.config_override,
   94     94   
        );
   95         -
        let mut output = crate::operation::get_log_object::GetLogObject::orchestrate(&runtime_plugins, input).await?;
          95  +
        let output = crate::operation::get_log_object::GetLogObject::orchestrate(&runtime_plugins, input).await?;
   96     96   
   97         -
        // Converts any error encountered beyond this point into an `SdkError` response error
   98         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
   99         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  100         -
        // This means that header information from the original response has been lost.
  101         -
        //
  102         -
        // Note that the response body would have been consumed by the deserializer
  103         -
        // regardless, even if the initial message was hypothetically processed during
  104         -
        // the orchestrator's deserialization phase but later resulted in an error.
  105         -
        fn response_error(
  106         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  107         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  108         -
            crate::operation::get_log_object::GetLogObjectError,
  109         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  110         -
        > {
  111         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  112         -
                err,
  113         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  114         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  115         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  116         -
                ),
  117         -
            )
  118         -
        }
  119         -
  120         -
        let message = output.field_stream.try_recv_initial_response().await.map_err(response_error)?;
  121         -
  122         -
        match message {
  123         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  124         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  125         -
        }
          97  +
        ::std::result::Result::Ok(output)
  126     98   
    }
  127     99   
  128    100   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  129    101   
    pub fn customize(
  130    102   
        self,
  131    103   
    ) -> crate::client::customize::CustomizableOperation<
  132    104   
        crate::operation::get_log_object::GetLogObjectOutput,
  133    105   
        crate::operation::get_log_object::GetLogObjectError,
  134    106   
        Self,
  135    107   
    > {

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/start_live_tail/builders.rs

@@ -85,85 +175,147 @@
  105    105   
    > {
  106    106   
        let input = self
  107    107   
            .inner
  108    108   
            .build()
  109    109   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  110    110   
        let runtime_plugins = crate::operation::start_live_tail::StartLiveTail::operation_runtime_plugins(
  111    111   
            self.handle.runtime_plugins.clone(),
  112    112   
            &self.handle.conf,
  113    113   
            self.config_override,
  114    114   
        );
  115         -
        let mut output = crate::operation::start_live_tail::StartLiveTail::orchestrate(&runtime_plugins, input).await?;
         115  +
        let output = crate::operation::start_live_tail::StartLiveTail::orchestrate(&runtime_plugins, input).await?;
  116    116   
  117         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  118         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  119         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  120         -
        // This means that header information from the original response has been lost.
  121         -
        //
  122         -
        // Note that the response body would have been consumed by the deserializer
  123         -
        // regardless, even if the initial message was hypothetically processed during
  124         -
        // the orchestrator's deserialization phase but later resulted in an error.
  125         -
        fn response_error(
  126         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  127         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  128         -
            crate::operation::start_live_tail::StartLiveTailError,
  129         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  130         -
        > {
  131         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  132         -
                err,
  133         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  134         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  135         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  136         -
                ),
  137         -
            )
  138         -
        }
  139         -
  140         -
        let message = output.response_stream.try_recv_initial_response().await.map_err(response_error)?;
  141         -
  142         -
        match message {
  143         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  144         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  145         -
        }
         117  +
        ::std::result::Result::Ok(output)
  146    118   
    }
  147    119   
  148    120   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  149    121   
    pub fn customize(
  150    122   
        self,
  151    123   
    ) -> crate::client::customize::CustomizableOperation<
  152    124   
        crate::operation::start_live_tail::StartLiveTailOutput,
  153    125   
        crate::operation::start_live_tail::StartLiveTailError,
  154    126   
        Self,
  155    127   
    > {

tmp-codegen-diff/aws-sdk/sdk/lambda/src/operation/invoke_with_response_stream/builders.rs

@@ -60,60 +150,122 @@
   80     80   
    > {
   81     81   
        let input = self
   82     82   
            .inner
   83     83   
            .build()
   84     84   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   85     85   
        let runtime_plugins = crate::operation::invoke_with_response_stream::InvokeWithResponseStream::operation_runtime_plugins(
   86     86   
            self.handle.runtime_plugins.clone(),
   87     87   
            &self.handle.conf,
   88     88   
            self.config_override,
   89     89   
        );
   90         -
        let mut output = crate::operation::invoke_with_response_stream::InvokeWithResponseStream::orchestrate(&runtime_plugins, input).await?;
          90  +
        let output = crate::operation::invoke_with_response_stream::InvokeWithResponseStream::orchestrate(&runtime_plugins, input).await?;
   91     91   
   92         -
        // Converts any error encountered beyond this point into an `SdkError` response error
   93         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
   94         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
   95         -
        // This means that header information from the original response has been lost.
   96         -
        //
   97         -
        // Note that the response body would have been consumed by the deserializer
   98         -
        // regardless, even if the initial message was hypothetically processed during
   99         -
        // the orchestrator's deserialization phase but later resulted in an error.
  100         -
        fn response_error(
  101         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  102         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  103         -
            crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
  104         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  105         -
        > {
  106         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  107         -
                err,
  108         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  109         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  110         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  111         -
                ),
  112         -
            )
  113         -
        }
  114         -
  115         -
        let message = output.event_stream.try_recv_initial_response().await.map_err(response_error)?;
  116         -
  117         -
        match message {
  118         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  119         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  120         -
        }
          92  +
        ::std::result::Result::Ok(output)
  121     93   
    }
  122     94   
  123     95   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  124     96   
    pub fn customize(
  125     97   
        self,
  126     98   
    ) -> crate::client::customize::CustomizableOperation<
  127     99   
        crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput,
  128    100   
        crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
  129    101   
        Self,
  130    102   
    > {

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content/builders.rs

@@ -124,124 +214,186 @@
  144    144   
    > {
  145    145   
        let input = self
  146    146   
            .inner
  147    147   
            .build()
  148    148   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  149    149   
        let runtime_plugins = crate::operation::select_object_content::SelectObjectContent::operation_runtime_plugins(
  150    150   
            self.handle.runtime_plugins.clone(),
  151    151   
            &self.handle.conf,
  152    152   
            self.config_override,
  153    153   
        );
  154         -
        let mut output = crate::operation::select_object_content::SelectObjectContent::orchestrate(&runtime_plugins, input).await?;
         154  +
        let output = crate::operation::select_object_content::SelectObjectContent::orchestrate(&runtime_plugins, input).await?;
  155    155   
  156         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  157         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  158         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  159         -
        // This means that header information from the original response has been lost.
  160         -
        //
  161         -
        // Note that the response body would have been consumed by the deserializer
  162         -
        // regardless, even if the initial message was hypothetically processed during
  163         -
        // the orchestrator's deserialization phase but later resulted in an error.
  164         -
        fn response_error(
  165         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  166         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  167         -
            crate::operation::select_object_content::SelectObjectContentError,
  168         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  169         -
        > {
  170         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  171         -
                err,
  172         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  173         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  174         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  175         -
                ),
  176         -
            )
  177         -
        }
  178         -
  179         -
        let message = output.payload.try_recv_initial_response().await.map_err(response_error)?;
  180         -
  181         -
        match message {
  182         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  183         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  184         -
        }
         156  +
        ::std::result::Result::Ok(output)
  185    157   
    }
  186    158   
  187    159   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  188    160   
    pub fn customize(
  189    161   
        self,
  190    162   
    ) -> crate::client::customize::CustomizableOperation<
  191    163   
        crate::operation::select_object_content::SelectObjectContentOutput,
  192    164   
        crate::operation::select_object_content::SelectObjectContentError,
  193    165   
        Self,
  194    166   
    > {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_call_analytics_stream_transcription/builders.rs

@@ -72,72 +168,136 @@
   92     92   
        let input = self
   93     93   
            .inner
   94     94   
            .build()
   95     95   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   96     96   
        let runtime_plugins =
   97     97   
            crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::operation_runtime_plugins(
   98     98   
                self.handle.runtime_plugins.clone(),
   99     99   
                &self.handle.conf,
  100    100   
                self.config_override,
  101    101   
            );
  102         -
        let mut output =
         102  +
        let output =
  103    103   
            crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::orchestrate(&runtime_plugins, input)
  104    104   
                .await?;
  105    105   
  106         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  107         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  108         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  109         -
        // This means that header information from the original response has been lost.
  110         -
        //
  111         -
        // Note that the response body would have been consumed by the deserializer
  112         -
        // regardless, even if the initial message was hypothetically processed during
  113         -
        // the orchestrator's deserialization phase but later resulted in an error.
  114         -
        fn response_error(
  115         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  116         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  117         -
            crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
  118         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  119         -
        > {
  120         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  121         -
                err,
  122         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  123         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  124         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  125         -
                ),
  126         -
            )
  127         -
        }
  128         -
  129         -
        let message = output
  130         -
            .call_analytics_transcript_result_stream
  131         -
            .try_recv_initial_response()
  132         -
            .await
  133         -
            .map_err(response_error)?;
  134         -
  135         -
        match message {
  136         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  137         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  138         -
        }
         106  +
        ::std::result::Result::Ok(output)
  139    107   
    }
  140    108   
  141    109   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  142    110   
    pub fn customize(
  143    111   
        self,
  144    112   
    ) -> crate::client::customize::CustomizableOperation<
  145    113   
        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
  146    114   
        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
  147    115   
        Self,
  148    116   
    > {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_medical_scribe_stream/builders.rs

@@ -73,73 +163,135 @@
   93     93   
    > {
   94     94   
        let input = self
   95     95   
            .inner
   96     96   
            .build()
   97     97   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   98     98   
        let runtime_plugins = crate::operation::start_medical_scribe_stream::StartMedicalScribeStream::operation_runtime_plugins(
   99     99   
            self.handle.runtime_plugins.clone(),
  100    100   
            &self.handle.conf,
  101    101   
            self.config_override,
  102    102   
        );
  103         -
        let mut output = crate::operation::start_medical_scribe_stream::StartMedicalScribeStream::orchestrate(&runtime_plugins, input).await?;
         103  +
        let output = crate::operation::start_medical_scribe_stream::StartMedicalScribeStream::orchestrate(&runtime_plugins, input).await?;
  104    104   
  105         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  106         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  107         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  108         -
        // This means that header information from the original response has been lost.
  109         -
        //
  110         -
        // Note that the response body would have been consumed by the deserializer
  111         -
        // regardless, even if the initial message was hypothetically processed during
  112         -
        // the orchestrator's deserialization phase but later resulted in an error.
  113         -
        fn response_error(
  114         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  115         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  116         -
            crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamError,
  117         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  118         -
        > {
  119         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  120         -
                err,
  121         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  122         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  123         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  124         -
                ),
  125         -
            )
  126         -
        }
  127         -
  128         -
        let message = output.result_stream.try_recv_initial_response().await.map_err(response_error)?;
  129         -
  130         -
        match message {
  131         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  132         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  133         -
        }
         105  +
        ::std::result::Result::Ok(output)
  134    106   
    }
  135    107   
  136    108   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  137    109   
    pub fn customize(
  138    110   
        self,
  139    111   
    ) -> crate::client::customize::CustomizableOperation<
  140    112   
        crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamOutput,
  141    113   
        crate::operation::start_medical_scribe_stream::StartMedicalScribeStreamError,
  142    114   
        Self,
  143    115   
    > {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_medical_stream_transcription/builders.rs

@@ -69,69 +164,132 @@
   89     89   
    > {
   90     90   
        let input = self
   91     91   
            .inner
   92     92   
            .build()
   93     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   94     94   
        let runtime_plugins = crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscription::operation_runtime_plugins(
   95     95   
            self.handle.runtime_plugins.clone(),
   96     96   
            &self.handle.conf,
   97     97   
            self.config_override,
   98     98   
        );
   99         -
        let mut output =
          99  +
        let output =
  100    100   
            crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscription::orchestrate(&runtime_plugins, input).await?;
  101    101   
  102         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  103         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  104         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  105         -
        // This means that header information from the original response has been lost.
  106         -
        //
  107         -
        // Note that the response body would have been consumed by the deserializer
  108         -
        // regardless, even if the initial message was hypothetically processed during
  109         -
        // the orchestrator's deserialization phase but later resulted in an error.
  110         -
        fn response_error(
  111         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  112         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  113         -
            crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError,
  114         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  115         -
        > {
  116         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  117         -
                err,
  118         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  119         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  120         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  121         -
                ),
  122         -
            )
  123         -
        }
  124         -
  125         -
        let message = output
  126         -
            .transcript_result_stream
  127         -
            .try_recv_initial_response()
  128         -
            .await
  129         -
            .map_err(response_error)?;
  130         -
  131         -
        match message {
  132         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  133         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  134         -
        }
         102  +
        ::std::result::Result::Ok(output)
  135    103   
    }
  136    104   
  137    105   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  138    106   
    pub fn customize(
  139    107   
        self,
  140    108   
    ) -> crate::client::customize::CustomizableOperation<
  141    109   
        crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionOutput,
  142    110   
        crate::operation::start_medical_stream_transcription::StartMedicalStreamTranscriptionError,
  143    111   
        Self,
  144    112   
    > {

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/operation/start_stream_transcription/builders.rs

@@ -69,69 +163,131 @@
   89     89   
    > {
   90     90   
        let input = self
   91     91   
            .inner
   92     92   
            .build()
   93     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   94     94   
        let runtime_plugins = crate::operation::start_stream_transcription::StartStreamTranscription::operation_runtime_plugins(
   95     95   
            self.handle.runtime_plugins.clone(),
   96     96   
            &self.handle.conf,
   97     97   
            self.config_override,
   98     98   
        );
   99         -
        let mut output = crate::operation::start_stream_transcription::StartStreamTranscription::orchestrate(&runtime_plugins, input).await?;
          99  +
        let output = crate::operation::start_stream_transcription::StartStreamTranscription::orchestrate(&runtime_plugins, input).await?;
  100    100   
  101         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  102         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  103         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  104         -
        // This means that header information from the original response has been lost.
  105         -
        //
  106         -
        // Note that the response body would have been consumed by the deserializer
  107         -
        // regardless, even if the initial message was hypothetically processed during
  108         -
        // the orchestrator's deserialization phase but later resulted in an error.
  109         -
        fn response_error(
  110         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  111         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  112         -
            crate::operation::start_stream_transcription::StartStreamTranscriptionError,
  113         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  114         -
        > {
  115         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  116         -
                err,
  117         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  118         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  119         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  120         -
                ),
  121         -
            )
  122         -
        }
  123         -
  124         -
        let message = output
  125         -
            .transcript_result_stream
  126         -
            .try_recv_initial_response()
  127         -
            .await
  128         -
            .map_err(response_error)?;
  129         -
  130         -
        match message {
  131         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  132         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  133         -
        }
         101  +
        ::std::result::Result::Ok(output)
  134    102   
    }
  135    103   
  136    104   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  137    105   
    pub fn customize(
  138    106   
        self,
  139    107   
    ) -> crate::client::customize::CustomizableOperation<
  140    108   
        crate::operation::start_stream_transcription::StartStreamTranscriptionOutput,
  141    109   
        crate::operation::start_stream_transcription::StartStreamTranscriptionError,
  142    110   
        Self,
  143    111   
    > {