AWS SDK

AWS SDK

rev. ba98f30b52e51c6e715b0ae469e7a2e988c27d9a

Files changed:

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation.rs

@@ -1,0 +76,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citation(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::Citation,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.title {
    7         -
        object.key("title").string(var_1.as_str());
    8         -
    }
    9         -
    if let Some(var_2) = &input.source_content {
   10         -
        let mut array_3 = object.key("sourceContent").start_array();
   11         -
        for item_4 in var_2 {
   12         -
            {
   13         -
                #[allow(unused_mut)]
   14         -
                let mut object_5 = array_3.value().start_object();
   15         -
                crate::protocol_serde::shape_citation_source_content::ser_citation_source_content(&mut object_5, item_4)?;
   16         -
                object_5.finish();
   17         -
            }
   18         -
        }
   19         -
        array_3.finish();
   20         -
    }
   21         -
    if let Some(var_6) = &input.location {
   22         -
        #[allow(unused_mut)]
   23         -
        let mut object_7 = object.key("location").start_object();
   24         -
        crate::protocol_serde::shape_citation_location::ser_citation_location(&mut object_7, var_6)?;
   25         -
        object_7.finish();
   26         -
    }
   27         -
    Ok(())
   28         -
}
   29         -
   30         -
pub(crate) fn de_citation<'a, I>(
   31         -
    tokens: &mut ::std::iter::Peekable<I>,
   32         -
) -> ::std::result::Result<Option<crate::types::Citation>, ::aws_smithy_json::deserialize::error::DeserializeError>
   33         -
where
   34         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   35         -
{
   36         -
    match tokens.next().transpose()? {
   37         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   38         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   39         -
            #[allow(unused_mut)]
   40         -
            let mut builder = crate::types::builders::CitationBuilder::default();
   41         -
            loop {
   42         -
                match tokens.next().transpose()? {
   43         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   44         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   45         -
                        "title" => {
   46         -
                            builder = builder.set_title(
   47         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   48         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   49         -
                                    .transpose()?,
   50         -
                            );
   51         -
                        }
   52         -
                        "sourceContent" => {
   53         -
                            builder = builder.set_source_content(
   54         -
                                crate::protocol_serde::shape_citation_source_content_list::de_citation_source_content_list(tokens)?,
   55         -
                            );
   56         -
                        }
   57         -
                        "location" => {
   58         -
                            builder = builder.set_location(crate::protocol_serde::shape_citation_location::de_citation_location(tokens)?);
   59         -
                        }
   60         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   61         -
                    },
   62         -
                    other => {
   63         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   64         -
                            "expected object key or end object, found: {:?}",
   65         -
                            other
   66         -
                        )))
   67         -
                    }
   68         -
                }
   69         -
            }
   70         -
            Ok(Some(builder.build()))
   71         -
        }
   72         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   73         -
            "expected start object or null",
   74         -
        )),
   75         -
    }
   76         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_generated_content.rs

@@ -1,0 +81,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citation_generated_content(
    3         -
    object_4: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CitationGeneratedContent,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    match input {
    7         -
        crate::types::CitationGeneratedContent::Text(inner) => {
    8         -
            object_4.key("text").string(inner.as_str());
    9         -
        }
   10         -
        crate::types::CitationGeneratedContent::Unknown => {
   11         -
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   12         -
                "CitationGeneratedContent",
   13         -
            ))
   14         -
        }
   15         -
    }
   16         -
    Ok(())
   17         -
}
   18         -
   19         -
pub(crate) fn de_citation_generated_content<'a, I>(
   20         -
    tokens: &mut ::std::iter::Peekable<I>,
   21         -
) -> ::std::result::Result<Option<crate::types::CitationGeneratedContent>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    let mut variant = None;
   26         -
    match tokens.next().transpose()? {
   27         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   28         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   29         -
            match tokens.next().transpose()? {
   30         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   31         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   32         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   33         -
                        tokens.peek()
   34         -
                    {
   35         -
                        let _ = tokens.next().expect("peek returned a token")?;
   36         -
                        continue;
   37         -
                    }
   38         -
                    let key = key.to_unescaped()?;
   39         -
                    if key == "__type" {
   40         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   41         -
                        continue;
   42         -
                    }
   43         -
                    if variant.is_some() {
   44         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
                            "encountered mixed variants in union",
   46         -
                        ));
   47         -
                    }
   48         -
                    variant = match key.as_ref() {
   49         -
                        "text" => Some(crate::types::CitationGeneratedContent::Text(
   50         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   51         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   52         -
                                .transpose()?
   53         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'text' cannot be null"))?,
   54         -
                        )),
   55         -
                        _ => {
   56         -
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   57         -
                            Some(crate::types::CitationGeneratedContent::Unknown)
   58         -
                        }
   59         -
                    };
   60         -
                }
   61         -
                other => {
   62         -
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                        "expected object key or end object, found: {:?}",
   64         -
                        other
   65         -
                    )))
   66         -
                }
   67         -
            }
   68         -
        },
   69         -
        _ => {
   70         -
            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   71         -
                "expected start object or null",
   72         -
            ))
   73         -
        }
   74         -
    }
   75         -
    if variant.is_none() {
   76         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77         -
            "Union did not contain a valid variant.",
   78         -
        ));
   79         -
    }
   80         -
    Ok(variant)
   81         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_generated_content_list.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citation_generated_content_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::CitationGeneratedContent>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   11         -
            let mut items = Vec::new();
   12         -
            loop {
   13         -
                match tokens.peek() {
   14         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   15         -
                        tokens.next().transpose().unwrap();
   16         -
                        break;
   17         -
                    }
   18         -
                    _ => {
   19         -
                        let value = crate::protocol_serde::shape_citation_generated_content::de_citation_generated_content(tokens)?;
   20         -
                        if let Some(value) = value {
   21         -
                            items.push(value);
   22         -
                        }
   23         -
                    }
   24         -
                }
   25         -
            }
   26         -
            Ok(Some(items))
   27         -
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29         -
            "expected start array or null",
   30         -
        )),
   31         -
    }
   32         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_location.rs

@@ -1,0 +105,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citation_location(
    3         -
    object_7: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CitationLocation,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    match input {
    7         -
        crate::types::CitationLocation::DocumentChar(inner) => {
    8         -
            #[allow(unused_mut)]
    9         -
            let mut object_1 = object_7.key("documentChar").start_object();
   10         -
            crate::protocol_serde::shape_document_char_location::ser_document_char_location(&mut object_1, inner)?;
   11         -
            object_1.finish();
   12         -
        }
   13         -
        crate::types::CitationLocation::DocumentPage(inner) => {
   14         -
            #[allow(unused_mut)]
   15         -
            let mut object_2 = object_7.key("documentPage").start_object();
   16         -
            crate::protocol_serde::shape_document_page_location::ser_document_page_location(&mut object_2, inner)?;
   17         -
            object_2.finish();
   18         -
        }
   19         -
        crate::types::CitationLocation::DocumentChunk(inner) => {
   20         -
            #[allow(unused_mut)]
   21         -
            let mut object_3 = object_7.key("documentChunk").start_object();
   22         -
            crate::protocol_serde::shape_document_chunk_location::ser_document_chunk_location(&mut object_3, inner)?;
   23         -
            object_3.finish();
   24         -
        }
   25         -
        crate::types::CitationLocation::Unknown => {
   26         -
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   27         -
                "CitationLocation",
   28         -
            ))
   29         -
        }
   30         -
    }
   31         -
    Ok(())
   32         -
}
   33         -
   34         -
pub(crate) fn de_citation_location<'a, I>(
   35         -
    tokens: &mut ::std::iter::Peekable<I>,
   36         -
) -> ::std::result::Result<Option<crate::types::CitationLocation>, ::aws_smithy_json::deserialize::error::DeserializeError>
   37         -
where
   38         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   39         -
{
   40         -
    let mut variant = None;
   41         -
    match tokens.next().transpose()? {
   42         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   43         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   44         -
            match tokens.next().transpose()? {
   45         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   46         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   47         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   48         -
                        tokens.peek()
   49         -
                    {
   50         -
                        let _ = tokens.next().expect("peek returned a token")?;
   51         -
                        continue;
   52         -
                    }
   53         -
                    let key = key.to_unescaped()?;
   54         -
                    if key == "__type" {
   55         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   56         -
                        continue;
   57         -
                    }
   58         -
                    if variant.is_some() {
   59         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   60         -
                            "encountered mixed variants in union",
   61         -
                        ));
   62         -
                    }
   63         -
                    variant = match key.as_ref() {
   64         -
                        "documentChar" => Some(crate::types::CitationLocation::DocumentChar(
   65         -
                            crate::protocol_serde::shape_document_char_location::de_document_char_location(tokens)?.ok_or_else(|| {
   66         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'documentChar' cannot be null")
   67         -
                            })?,
   68         -
                        )),
   69         -
                        "documentPage" => Some(crate::types::CitationLocation::DocumentPage(
   70         -
                            crate::protocol_serde::shape_document_page_location::de_document_page_location(tokens)?.ok_or_else(|| {
   71         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'documentPage' cannot be null")
   72         -
                            })?,
   73         -
                        )),
   74         -
                        "documentChunk" => Some(crate::types::CitationLocation::DocumentChunk(
   75         -
                            crate::protocol_serde::shape_document_chunk_location::de_document_chunk_location(tokens)?.ok_or_else(|| {
   76         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'documentChunk' cannot be null")
   77         -
                            })?,
   78         -
                        )),
   79         -
                        _ => {
   80         -
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   81         -
                            Some(crate::types::CitationLocation::Unknown)
   82         -
                        }
   83         -
                    };
   84         -
                }
   85         -
                other => {
   86         -
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   87         -
                        "expected object key or end object, found: {:?}",
   88         -
                        other
   89         -
                    )))
   90         -
                }
   91         -
            }
   92         -
        },
   93         -
        _ => {
   94         -
            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   95         -
                "expected start object or null",
   96         -
            ))
   97         -
        }
   98         -
    }
   99         -
    if variant.is_none() {
  100         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  101         -
            "Union did not contain a valid variant.",
  102         -
        ));
  103         -
    }
  104         -
    Ok(variant)
  105         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_source_content.rs

@@ -1,0 +81,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citation_source_content(
    3         -
    object_5: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CitationSourceContent,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    match input {
    7         -
        crate::types::CitationSourceContent::Text(inner) => {
    8         -
            object_5.key("text").string(inner.as_str());
    9         -
        }
   10         -
        crate::types::CitationSourceContent::Unknown => {
   11         -
            return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant(
   12         -
                "CitationSourceContent",
   13         -
            ))
   14         -
        }
   15         -
    }
   16         -
    Ok(())
   17         -
}
   18         -
   19         -
pub(crate) fn de_citation_source_content<'a, I>(
   20         -
    tokens: &mut ::std::iter::Peekable<I>,
   21         -
) -> ::std::result::Result<Option<crate::types::CitationSourceContent>, ::aws_smithy_json::deserialize::error::DeserializeError>
   22         -
where
   23         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   24         -
{
   25         -
    let mut variant = None;
   26         -
    match tokens.next().transpose()? {
   27         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   28         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   29         -
            match tokens.next().transpose()? {
   30         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   31         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   32         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   33         -
                        tokens.peek()
   34         -
                    {
   35         -
                        let _ = tokens.next().expect("peek returned a token")?;
   36         -
                        continue;
   37         -
                    }
   38         -
                    let key = key.to_unescaped()?;
   39         -
                    if key == "__type" {
   40         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   41         -
                        continue;
   42         -
                    }
   43         -
                    if variant.is_some() {
   44         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
                            "encountered mixed variants in union",
   46         -
                        ));
   47         -
                    }
   48         -
                    variant = match key.as_ref() {
   49         -
                        "text" => Some(crate::types::CitationSourceContent::Text(
   50         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   51         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   52         -
                                .transpose()?
   53         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'text' cannot be null"))?,
   54         -
                        )),
   55         -
                        _ => {
   56         -
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   57         -
                            Some(crate::types::CitationSourceContent::Unknown)
   58         -
                        }
   59         -
                    };
   60         -
                }
   61         -
                other => {
   62         -
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   63         -
                        "expected object key or end object, found: {:?}",
   64         -
                        other
   65         -
                    )))
   66         -
                }
   67         -
            }
   68         -
        },
   69         -
        _ => {
   70         -
            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   71         -
                "expected start object or null",
   72         -
            ))
   73         -
        }
   74         -
    }
   75         -
    if variant.is_none() {
   76         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   77         -
            "Union did not contain a valid variant.",
   78         -
        ));
   79         -
    }
   80         -
    Ok(variant)
   81         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_source_content_delta.rs

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citation_source_content_delta<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<crate::types::CitationSourceContentDelta>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   11         -
            #[allow(unused_mut)]
   12         -
            let mut builder = crate::types::builders::CitationSourceContentDeltaBuilder::default();
   13         -
            loop {
   14         -
                match tokens.next().transpose()? {
   15         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   16         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   17         -
                        "text" => {
   18         -
                            builder = builder.set_text(
   19         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                                    .transpose()?,
   22         -
                            );
   23         -
                        }
   24         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   25         -
                    },
   26         -
                    other => {
   27         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   28         -
                            "expected object key or end object, found: {:?}",
   29         -
                            other
   30         -
                        )))
   31         -
                    }
   32         -
                }
   33         -
            }
   34         -
            Ok(Some(builder.build()))
   35         -
        }
   36         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37         -
            "expected start object or null",
   38         -
        )),
   39         -
    }
   40         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_source_content_list.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citation_source_content_list<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::CitationSourceContent>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   11         -
            let mut items = Vec::new();
   12         -
            loop {
   13         -
                match tokens.peek() {
   14         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   15         -
                        tokens.next().transpose().unwrap();
   16         -
                        break;
   17         -
                    }
   18         -
                    _ => {
   19         -
                        let value = crate::protocol_serde::shape_citation_source_content::de_citation_source_content(tokens)?;
   20         -
                        if let Some(value) = value {
   21         -
                            items.push(value);
   22         -
                        }
   23         -
                    }
   24         -
                }
   25         -
            }
   26         -
            Ok(Some(items))
   27         -
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29         -
            "expected start array or null",
   30         -
        )),
   31         -
    }
   32         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citation_source_content_list_delta.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citation_source_content_list_delta<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::CitationSourceContentDelta>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   11         -
            let mut items = Vec::new();
   12         -
            loop {
   13         -
                match tokens.peek() {
   14         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   15         -
                        tokens.next().transpose().unwrap();
   16         -
                        break;
   17         -
                    }
   18         -
                    _ => {
   19         -
                        let value = crate::protocol_serde::shape_citation_source_content_delta::de_citation_source_content_delta(tokens)?;
   20         -
                        if let Some(value) = value {
   21         -
                            items.push(value);
   22         -
                        }
   23         -
                    }
   24         -
                }
   25         -
            }
   26         -
            Ok(Some(items))
   27         -
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29         -
            "expected start array or null",
   30         -
        )),
   31         -
    }
   32         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citations.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citations<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<::std::vec::Vec<crate::types::Citation>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
   11         -
            let mut items = Vec::new();
   12         -
            loop {
   13         -
                match tokens.peek() {
   14         -
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
   15         -
                        tokens.next().transpose().unwrap();
   16         -
                        break;
   17         -
                    }
   18         -
                    _ => {
   19         -
                        let value = crate::protocol_serde::shape_citation::de_citation(tokens)?;
   20         -
                        if let Some(value) = value {
   21         -
                            items.push(value);
   22         -
                        }
   23         -
                    }
   24         -
                }
   25         -
            }
   26         -
            Ok(Some(items))
   27         -
        }
   28         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   29         -
            "expected start array or null",
   30         -
        )),
   31         -
    }
   32         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citations_config.rs

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citations_config(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CitationsConfig,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    {
    7         -
        object.key("enabled").boolean(input.enabled);
    8         -
    }
    9         -
    Ok(())
   10         -
}
   11         -
   12         -
pub(crate) fn de_citations_config<'a, I>(
   13         -
    tokens: &mut ::std::iter::Peekable<I>,
   14         -
) -> ::std::result::Result<Option<crate::types::CitationsConfig>, ::aws_smithy_json::deserialize::error::DeserializeError>
   15         -
where
   16         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   17         -
{
   18         -
    match tokens.next().transpose()? {
   19         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   20         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   21         -
            #[allow(unused_mut)]
   22         -
            let mut builder = crate::types::builders::CitationsConfigBuilder::default();
   23         -
            loop {
   24         -
                match tokens.next().transpose()? {
   25         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   26         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   27         -
                        "enabled" => {
   28         -
                            builder = builder.set_enabled(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
   29         -
                        }
   30         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   31         -
                    },
   32         -
                    other => {
   33         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   34         -
                            "expected object key or end object, found: {:?}",
   35         -
                            other
   36         -
                        )))
   37         -
                    }
   38         -
                }
   39         -
            }
   40         -
            Ok(Some(crate::serde_util::citations_config_correct_errors(builder).build().map_err(
   41         -
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
   42         -
            )?))
   43         -
        }
   44         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
            "expected start object or null",
   46         -
        )),
   47         -
    }
   48         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citations_content_block.rs

@@ -1,0 +72,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_citations_content_block(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::types::CitationsContentBlock,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.content {
    7         -
        let mut array_2 = object.key("content").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                #[allow(unused_mut)]
   11         -
                let mut object_4 = array_2.value().start_object();
   12         -
                crate::protocol_serde::shape_citation_generated_content::ser_citation_generated_content(&mut object_4, item_3)?;
   13         -
                object_4.finish();
   14         -
            }
   15         -
        }
   16         -
        array_2.finish();
   17         -
    }
   18         -
    if let Some(var_5) = &input.citations {
   19         -
        let mut array_6 = object.key("citations").start_array();
   20         -
        for item_7 in var_5 {
   21         -
            {
   22         -
                #[allow(unused_mut)]
   23         -
                let mut object_8 = array_6.value().start_object();
   24         -
                crate::protocol_serde::shape_citation::ser_citation(&mut object_8, item_7)?;
   25         -
                object_8.finish();
   26         -
            }
   27         -
        }
   28         -
        array_6.finish();
   29         -
    }
   30         -
    Ok(())
   31         -
}
   32         -
   33         -
pub(crate) fn de_citations_content_block<'a, I>(
   34         -
    tokens: &mut ::std::iter::Peekable<I>,
   35         -
) -> ::std::result::Result<Option<crate::types::CitationsContentBlock>, ::aws_smithy_json::deserialize::error::DeserializeError>
   36         -
where
   37         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   38         -
{
   39         -
    match tokens.next().transpose()? {
   40         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   41         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   42         -
            #[allow(unused_mut)]
   43         -
            let mut builder = crate::types::builders::CitationsContentBlockBuilder::default();
   44         -
            loop {
   45         -
                match tokens.next().transpose()? {
   46         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   47         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   48         -
                        "content" => {
   49         -
                            builder = builder.set_content(
   50         -
                                crate::protocol_serde::shape_citation_generated_content_list::de_citation_generated_content_list(tokens)?,
   51         -
                            );
   52         -
                        }
   53         -
                        "citations" => {
   54         -
                            builder = builder.set_citations(crate::protocol_serde::shape_citations::de_citations(tokens)?);
   55         -
                        }
   56         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   57         -
                    },
   58         -
                    other => {
   59         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   60         -
                            "expected object key or end object, found: {:?}",
   61         -
                            other
   62         -
                        )))
   63         -
                    }
   64         -
                }
   65         -
            }
   66         -
            Ok(Some(builder.build()))
   67         -
        }
   68         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   69         -
            "expected start object or null",
   70         -
        )),
   71         -
    }
   72         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_citations_delta.rs

@@ -1,0 +48,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_citations_delta<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
) -> ::std::result::Result<Option<crate::types::CitationsDelta>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5         -
where
    6         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7         -
{
    8         -
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   11         -
            #[allow(unused_mut)]
   12         -
            let mut builder = crate::types::builders::CitationsDeltaBuilder::default();
   13         -
            loop {
   14         -
                match tokens.next().transpose()? {
   15         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   16         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   17         -
                        "title" => {
   18         -
                            builder = builder.set_title(
   19         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                                    .transpose()?,
   22         -
                            );
   23         -
                        }
   24         -
                        "sourceContent" => {
   25         -
                            builder = builder.set_source_content(
   26         -
                                crate::protocol_serde::shape_citation_source_content_list_delta::de_citation_source_content_list_delta(tokens)?,
   27         -
                            );
   28         -
                        }
   29         -
                        "location" => {
   30         -
                            builder = builder.set_location(crate::protocol_serde::shape_citation_location::de_citation_location(tokens)?);
   31         -
                        }
   32         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
                    },
   34         -
                    other => {
   35         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                            "expected object key or end object, found: {:?}",
   37         -
                            other
   38         -
                        )))
   39         -
                    }
   40         -
                }
   41         -
            }
   42         -
            Ok(Some(builder.build()))
   43         -
        }
   44         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   45         -
            "expected start object or null",
   46         -
        )),
   47         -
    }
   48         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_conflict_exception.rs

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_conflict_exception_json_err(
    3         -
    value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ConflictExceptionBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ConflictExceptionBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "message" => {
   14         -
                    builder = builder.set_message(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   21         -
            },
   22         -
            other => {
   23         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   24         -
                    "expected object key or end object, found: {:?}",
   25         -
                    other
   26         -
                )))
   27         -
            }
   28         -
        }
   29         -
    }
   30         -
    if tokens.next().is_some() {
   31         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32         -
            "found more JSON tokens after completing parsing",
   33         -
        ));
   34         -
    }
   35         -
    Ok(builder)
   36         -
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_content_block.rs

@@ -1,1 +174,109 @@
    6      6   
    match input {
    7      7   
        crate::types::ContentBlock::Text(inner) => {
    8      8   
            object_3.key("text").string(inner.as_str());
    9      9   
        }
   10     10   
        crate::types::ContentBlock::Image(inner) => {
   11     11   
            #[allow(unused_mut)]
   12     12   
            let mut object_1 = object_3.key("image").start_object();
   13     13   
            crate::protocol_serde::shape_image_block::ser_image_block(&mut object_1, inner)?;
   14     14   
            object_1.finish();
   15     15   
        }
   16         -
        crate::types::ContentBlock::Document(inner) => {
   17         -
            #[allow(unused_mut)]
   18         -
            let mut object_2 = object_3.key("document").start_object();
   19         -
            crate::protocol_serde::shape_document_block::ser_document_block(&mut object_2, inner)?;
   20         -
            object_2.finish();
   21         -
        }
   22         -
        crate::types::ContentBlock::Video(inner) => {
   23         -
            #[allow(unused_mut)]
   24         -
            let mut object_3 = object_3.key("video").start_object();
   25         -
            crate::protocol_serde::shape_video_block::ser_video_block(&mut object_3, inner)?;
   26         -
            object_3.finish();
   27         -
        }
   28     16   
        crate::types::ContentBlock::ToolUse(inner) => {
   29     17   
            #[allow(unused_mut)]
   30         -
            let mut object_4 = object_3.key("toolUse").start_object();
   31         -
            crate::protocol_serde::shape_tool_use_block::ser_tool_use_block(&mut object_4, inner)?;
   32         -
            object_4.finish();
          18  +
            let mut object_2 = object_3.key("toolUse").start_object();
          19  +
            crate::protocol_serde::shape_tool_use_block::ser_tool_use_block(&mut object_2, inner)?;
          20  +
            object_2.finish();
   33     21   
        }
   34     22   
        crate::types::ContentBlock::ToolResult(inner) => {
   35     23   
            #[allow(unused_mut)]
   36         -
            let mut object_5 = object_3.key("toolResult").start_object();
   37         -
            crate::protocol_serde::shape_tool_result_block::ser_tool_result_block(&mut object_5, inner)?;
   38         -
            object_5.finish();
   39         -
        }
   40         -
        crate::types::ContentBlock::GuardContent(inner) => {
   41         -
            #[allow(unused_mut)]
   42         -
            let mut object_6 = object_3.key("guardContent").start_object();
   43         -
            crate::protocol_serde::shape_guardrail_converse_content_block::ser_guardrail_converse_content_block(&mut object_6, inner)?;
   44         -
            object_6.finish();
   45         -
        }
   46         -
        crate::types::ContentBlock::CachePoint(inner) => {
   47         -
            #[allow(unused_mut)]
   48         -
            let mut object_7 = object_3.key("cachePoint").start_object();
   49         -
            crate::protocol_serde::shape_cache_point_block::ser_cache_point_block(&mut object_7, inner)?;
   50         -
            object_7.finish();
   51         -
        }
   52         -
        crate::types::ContentBlock::ReasoningContent(inner) => {
   53         -
            #[allow(unused_mut)]
   54         -
            let mut object_8 = object_3.key("reasoningContent").start_object();
   55         -
            crate::protocol_serde::shape_reasoning_content_block::ser_reasoning_content_block(&mut object_8, inner)?;
   56         -
            object_8.finish();
   57         -
        }
   58         -
        crate::types::ContentBlock::CitationsContent(inner) => {
   59         -
            #[allow(unused_mut)]
   60         -
            let mut object_9 = object_3.key("citationsContent").start_object();
   61         -
            crate::protocol_serde::shape_citations_content_block::ser_citations_content_block(&mut object_9, inner)?;
   62         -
            object_9.finish();
          24  +
            let mut object_3 = object_3.key("toolResult").start_object();
          25  +
            crate::protocol_serde::shape_tool_result_block::ser_tool_result_block(&mut object_3, inner)?;
          26  +
            object_3.finish();
   63     27   
        }
   64     28   
        crate::types::ContentBlock::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("ContentBlock")),
   65     29   
    }
   66     30   
    Ok(())
   67     31   
}
   68     32   
   69     33   
pub(crate) fn de_content_block<'a, I>(
   70     34   
    tokens: &mut ::std::iter::Peekable<I>,
   71     35   
) -> ::std::result::Result<Option<crate::types::ContentBlock>, ::aws_smithy_json::deserialize::error::DeserializeError>
   72     36   
where
   73     37   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   74     38   
{
   75     39   
    let mut variant = None;
   76     40   
    match tokens.next().transpose()? {
   77     41   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   78     42   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   79     43   
            match tokens.next().transpose()? {
   80     44   
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   81     45   
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   82     46   
                    if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   83     47   
                        tokens.peek()
   84     48   
                    {
   85     49   
                        let _ = tokens.next().expect("peek returned a token")?;
   86     50   
                        continue;
   87     51   
                    }
   88     52   
                    let key = key.to_unescaped()?;
   89     53   
                    if key == "__type" {
   90     54   
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   91     55   
                        continue;
   92     56   
                    }
   93     57   
                    if variant.is_some() {
   94     58   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   95     59   
                            "encountered mixed variants in union",
   96     60   
                        ));
   97     61   
                    }
   98     62   
                    variant = match key.as_ref() {
   99     63   
                        "text" => Some(crate::types::ContentBlock::Text(
  100     64   
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  101     65   
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
  102     66   
                                .transpose()?
  103     67   
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'text' cannot be null"))?,
  104     68   
                        )),
  105     69   
                        "image" => Some(crate::types::ContentBlock::Image(
  106     70   
                            crate::protocol_serde::shape_image_block::de_image_block(tokens)?
  107     71   
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'image' cannot be null"))?,
  108     72   
                        )),
  109         -
                        "document" => Some(crate::types::ContentBlock::Document(
  110         -
                            crate::protocol_serde::shape_document_block::de_document_block(tokens)?.ok_or_else(|| {
  111         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'document' cannot be null")
  112         -
                            })?,
  113         -
                        )),
  114         -
                        "video" => Some(crate::types::ContentBlock::Video(
  115         -
                            crate::protocol_serde::shape_video_block::de_video_block(tokens)?
  116         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'video' cannot be null"))?,
  117         -
                        )),
  118     73   
                        "toolUse" => Some(crate::types::ContentBlock::ToolUse(
  119     74   
                            crate::protocol_serde::shape_tool_use_block::de_tool_use_block(tokens)?.ok_or_else(|| {
  120     75   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'toolUse' cannot be null")
  121     76   
                            })?,
  122     77   
                        )),
  123     78   
                        "toolResult" => Some(crate::types::ContentBlock::ToolResult(
  124     79   
                            crate::protocol_serde::shape_tool_result_block::de_tool_result_block(tokens)?.ok_or_else(|| {
  125     80   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'toolResult' cannot be null")
  126     81   
                            })?,
  127     82   
                        )),
  128         -
                        "guardContent" => Some(crate::types::ContentBlock::GuardContent(
  129         -
                            crate::protocol_serde::shape_guardrail_converse_content_block::de_guardrail_converse_content_block(tokens)?.ok_or_else(
  130         -
                                || ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'guardContent' cannot be null"),
  131         -
                            )?,
  132         -
                        )),
  133         -
                        "cachePoint" => Some(crate::types::ContentBlock::CachePoint(
  134         -
                            crate::protocol_serde::shape_cache_point_block::de_cache_point_block(tokens)?.ok_or_else(|| {
  135         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'cachePoint' cannot be null")
  136         -
                            })?,
  137         -
                        )),
  138         -
                        "reasoningContent" => Some(crate::types::ContentBlock::ReasoningContent(
  139         -
                            crate::protocol_serde::shape_reasoning_content_block::de_reasoning_content_block(tokens)?.ok_or_else(|| {
  140         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'reasoningContent' cannot be null")
  141         -
                            })?,
  142         -
                        )),
  143         -
                        "citationsContent" => Some(crate::types::ContentBlock::CitationsContent(
  144         -
                            crate::protocol_serde::shape_citations_content_block::de_citations_content_block(tokens)?.ok_or_else(|| {
  145         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'citationsContent' cannot be null")
  146         -
                            })?,
  147         -
                        )),
  148     83   
                        _ => {
  149     84   
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
  150     85   
                            Some(crate::types::ContentBlock::Unknown)
  151     86   
                        }
  152     87   
                    };
  153     88   
                }
  154     89   
                other => {
  155     90   
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  156     91   
                        "expected object key or end object, found: {:?}",
  157     92   
                        other

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_content_block_delta.rs

@@ -13,13 +79,69 @@
   33     33   
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   34     34   
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   35     35   
                                .transpose()?
   36     36   
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'text' cannot be null"))?,
   37     37   
                        )),
   38     38   
                        "toolUse" => Some(crate::types::ContentBlockDelta::ToolUse(
   39     39   
                            crate::protocol_serde::shape_tool_use_block_delta::de_tool_use_block_delta(tokens)?.ok_or_else(|| {
   40     40   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'toolUse' cannot be null")
   41     41   
                            })?,
   42     42   
                        )),
   43         -
                        "reasoningContent" => Some(crate::types::ContentBlockDelta::ReasoningContent(
   44         -
                            crate::protocol_serde::shape_reasoning_content_block_delta::de_reasoning_content_block_delta(tokens)?.ok_or_else(
   45         -
                                || ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'reasoningContent' cannot be null"),
   46         -
                            )?,
   47         -
                        )),
   48         -
                        "citation" => Some(crate::types::ContentBlockDelta::Citation(
   49         -
                            crate::protocol_serde::shape_citations_delta::de_citations_delta(tokens)?.ok_or_else(|| {
   50         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'citation' cannot be null")
   51         -
                            })?,
   52         -
                        )),
   53     43   
                        _ => {
   54     44   
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   55     45   
                            Some(crate::types::ContentBlockDelta::Unknown)
   56     46   
                        }
   57     47   
                    };
   58     48   
                }
   59     49   
                other => {
   60     50   
                    return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   61     51   
                        "expected object key or end object, found: {:?}",
   62     52   
                        other

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/protocol_serde/shape_converse.rs

@@ -80,80 +155,139 @@
  100    100   
                output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
  101    101   
                    .map_err(crate::operation::converse::ConverseError::unhandled)?;
  102    102   
                let output = output.meta(generic);
  103    103   
                output.build()
  104    104   
            };
  105    105   
            if tmp.message.is_none() {
  106    106   
                tmp.message = _error_message;
  107    107   
            }
  108    108   
            tmp
  109    109   
        }),
  110         -
        "ServiceUnavailableException" => crate::operation::converse::ConverseError::ServiceUnavailableException({
  111         -
            #[allow(unused_mut)]
  112         -
            let mut tmp = {
  113         -
                #[allow(unused_mut)]
  114         -
                let mut output = crate::types::error::builders::ServiceUnavailableExceptionBuilder::default();
  115         -
                output =
  116         -
                    crate::protocol_serde::shape_service_unavailable_exception::de_service_unavailable_exception_json_err(_response_body, output)
  117         -
                        .map_err(crate::operation::converse::ConverseError::unhandled)?;
  118         -
                let output = output.meta(generic);
  119         -
                output.build()
  120         -
            };
  121         -
            if tmp.message.is_none() {
  122         -
                tmp.message = _error_message;
  123         -
            }
  124         -
            tmp
  125         -
        }),
  126    110   
        "ThrottlingException" => crate::operation::converse::ConverseError::ThrottlingException({
  127    111   
            #[allow(unused_mut)]
  128    112   
            let mut tmp = {
  129    113   
                #[allow(unused_mut)]
  130    114   
                let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
  131    115   
                output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
  132    116   
                    .map_err(crate::operation::converse::ConverseError::unhandled)?;
  133    117   
                let output = output.meta(generic);
  134    118   
                output.build()
  135    119   
            };
@@ -178,162 +242,218 @@
  198    182   
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
  199    183   
                "additionalModelResponseFields" => {
  200    184   
                    builder = builder.set_additional_model_response_fields(Some(::aws_smithy_json::deserialize::token::expect_document(tokens)?));
  201    185   
                }
  202    186   
                "metrics" => {
  203    187   
                    builder = builder.set_metrics(crate::protocol_serde::shape_converse_metrics::de_converse_metrics(tokens)?);
  204    188   
                }
  205    189   
                "output" => {
  206    190   
                    builder = builder.set_output(crate::protocol_serde::shape_converse_output::de_converse_output(tokens)?);
  207    191   
                }
  208         -
                "performanceConfig" => {
  209         -
                    builder = builder.set_performance_config(crate::protocol_serde::shape_performance_configuration::de_performance_configuration(
  210         -
                        tokens,
  211         -
                    )?);
  212         -
                }
  213    192   
                "stopReason" => {
  214    193   
                    builder = builder.set_stop_reason(
  215    194   
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
  216    195   
                            .map(|s| s.to_unescaped().map(|u| crate::types::StopReason::from(u.as_ref())))
  217    196   
                            .transpose()?,
  218    197   
                    );
  219    198   
                }
  220         -
                "trace" => {
  221         -
                    builder = builder.set_trace(crate::protocol_serde::shape_converse_trace::de_converse_trace(tokens)?);
  222         -
                }
  223    199   
                "usage" => {
  224    200   
                    builder = builder.set_usage(crate::protocol_serde::shape_token_usage::de_token_usage(tokens)?);
  225    201   
                }
  226    202   
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  227    203   
            },
  228    204   
            other => {
  229    205   
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
  230    206   
                    "expected object key or end object, found: {:?}",
  231    207   
                    other
  232    208   
                )))