AWS SDK

AWS SDK

rev. 96f5a1b4ad139d2f1ad1e8e40f300e1cd1ff574c

Files changed:

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_reasoning_content_block.rs

@@ -28,28 +0,128 @@
   48     48   
    /// Returns true if the enum instance is the `Unknown` variant.
   49     49   
    pub fn is_unknown(&self) -> bool {
   50     50   
        matches!(self, Self::Unknown)
   51     51   
    }
   52     52   
}
   53     53   
impl ::std::fmt::Debug for ReasoningContentBlock {
   54     54   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
   55     55   
        ::std::write!(f, "*** Sensitive Data Redacted ***")
   56     56   
    }
   57     57   
}
          58  +
static REASONINGCONTENTBLOCK_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          59  +
    "com.amazonaws.bedrockruntime#ReasoningContentBlock",
          60  +
    "com.amazonaws.bedrockruntime",
          61  +
    "ReasoningContentBlock",
          62  +
);
          63  +
static REASONINGCONTENTBLOCK_MEMBER_REASONINGTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          64  +
    ::aws_smithy_schema::ShapeId::from_static(
          65  +
        "com.amazonaws.bedrockruntime#ReasoningContentBlock$reasoningText",
          66  +
        "com.amazonaws.bedrockruntime",
          67  +
        "ReasoningContentBlock",
          68  +
    ),
          69  +
    ::aws_smithy_schema::ShapeType::Structure,
          70  +
    "reasoningText",
          71  +
    0,
          72  +
);
          73  +
static REASONINGCONTENTBLOCK_MEMBER_REDACTEDCONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          74  +
    ::aws_smithy_schema::ShapeId::from_static(
          75  +
        "com.amazonaws.bedrockruntime#ReasoningContentBlock$redactedContent",
          76  +
        "com.amazonaws.bedrockruntime",
          77  +
        "ReasoningContentBlock",
          78  +
    ),
          79  +
    ::aws_smithy_schema::ShapeType::Blob,
          80  +
    "redactedContent",
          81  +
    1,
          82  +
);
          83  +
static REASONINGCONTENTBLOCK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          84  +
    REASONINGCONTENTBLOCK_SCHEMA_ID,
          85  +
    ::aws_smithy_schema::ShapeType::Union,
          86  +
    &[&REASONINGCONTENTBLOCK_MEMBER_REASONINGTEXT, &REASONINGCONTENTBLOCK_MEMBER_REDACTEDCONTENT],
          87  +
)
          88  +
.with_sensitive();
          89  +
impl ReasoningContentBlock {
          90  +
    /// The schema for this shape.
          91  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REASONINGCONTENTBLOCK_SCHEMA;
          92  +
}
          93  +
impl ::aws_smithy_schema::serde::SerializableStruct for ReasoningContentBlock {
          94  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          95  +
    fn serialize_members(
          96  +
        &self,
          97  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          98  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          99  +
        match self {
         100  +
            Self::ReasoningText(val) => {
         101  +
                ser.write_struct(&REASONINGCONTENTBLOCK_MEMBER_REASONINGTEXT, val)?;
         102  +
            }
         103  +
            Self::RedactedContent(val) => {
         104  +
                ser.write_blob(&REASONINGCONTENTBLOCK_MEMBER_REDACTEDCONTENT, val)?;
         105  +
            }
         106  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
         107  +
        }
         108  +
        Ok(())
         109  +
    }
         110  +
}
         111  +
impl ReasoningContentBlock {
         112  +
    /// Deserializes this union from a [`ShapeDeserializer`].
         113  +
    pub fn deserialize(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         115  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         116  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         117  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         118  +
        deserializer.read_struct(&REASONINGCONTENTBLOCK_SCHEMA, &mut |member, deser| {
         119  +
            result = ::std::option::Option::Some(match member.member_index() {
         120  +
                Some(0) => Self::ReasoningText(crate::types::ReasoningTextBlock::deserialize(deser)?),
         121  +
                Some(1) => Self::RedactedContent(deser.read_blob(member)?),
         122  +
                _ => Self::Unknown,
         123  +
            });
         124  +
            Ok(())
         125  +
        })?;
         126  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         127  +
    }
         128  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_reasoning_content_block_delta.rs

@@ -43,43 +0,161 @@
   63     63   
    /// Returns true if the enum instance is the `Unknown` variant.
   64     64   
    pub fn is_unknown(&self) -> bool {
   65     65   
        matches!(self, Self::Unknown)
   66     66   
    }
   67     67   
}
   68     68   
impl ::std::fmt::Debug for ReasoningContentBlockDelta {
   69     69   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
   70     70   
        ::std::write!(f, "*** Sensitive Data Redacted ***")
   71     71   
    }
   72     72   
}
          73  +
static REASONINGCONTENTBLOCKDELTA_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          74  +
    "com.amazonaws.bedrockruntime#ReasoningContentBlockDelta",
          75  +
    "com.amazonaws.bedrockruntime",
          76  +
    "ReasoningContentBlockDelta",
          77  +
);
          78  +
static REASONINGCONTENTBLOCKDELTA_MEMBER_TEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          79  +
    ::aws_smithy_schema::ShapeId::from_static(
          80  +
        "com.amazonaws.bedrockruntime#ReasoningContentBlockDelta$text",
          81  +
        "com.amazonaws.bedrockruntime",
          82  +
        "ReasoningContentBlockDelta",
          83  +
    ),
          84  +
    ::aws_smithy_schema::ShapeType::String,
          85  +
    "text",
          86  +
    0,
          87  +
);
          88  +
static REASONINGCONTENTBLOCKDELTA_MEMBER_REDACTEDCONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          89  +
    ::aws_smithy_schema::ShapeId::from_static(
          90  +
        "com.amazonaws.bedrockruntime#ReasoningContentBlockDelta$redactedContent",
          91  +
        "com.amazonaws.bedrockruntime",
          92  +
        "ReasoningContentBlockDelta",
          93  +
    ),
          94  +
    ::aws_smithy_schema::ShapeType::Blob,
          95  +
    "redactedContent",
          96  +
    1,
          97  +
);
          98  +
static REASONINGCONTENTBLOCKDELTA_MEMBER_SIGNATURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          99  +
    ::aws_smithy_schema::ShapeId::from_static(
         100  +
        "com.amazonaws.bedrockruntime#ReasoningContentBlockDelta$signature",
         101  +
        "com.amazonaws.bedrockruntime",
         102  +
        "ReasoningContentBlockDelta",
         103  +
    ),
         104  +
    ::aws_smithy_schema::ShapeType::String,
         105  +
    "signature",
         106  +
    2,
         107  +
);
         108  +
static REASONINGCONTENTBLOCKDELTA_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
         109  +
    REASONINGCONTENTBLOCKDELTA_SCHEMA_ID,
         110  +
    ::aws_smithy_schema::ShapeType::Union,
         111  +
    &[
         112  +
        &REASONINGCONTENTBLOCKDELTA_MEMBER_TEXT,
         113  +
        &REASONINGCONTENTBLOCKDELTA_MEMBER_REDACTEDCONTENT,
         114  +
        &REASONINGCONTENTBLOCKDELTA_MEMBER_SIGNATURE,
         115  +
    ],
         116  +
)
         117  +
.with_sensitive();
         118  +
impl ReasoningContentBlockDelta {
         119  +
    /// The schema for this shape.
         120  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &REASONINGCONTENTBLOCKDELTA_SCHEMA;
         121  +
}
         122  +
impl ::aws_smithy_schema::serde::SerializableStruct for ReasoningContentBlockDelta {
         123  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         124  +
    fn serialize_members(
         125  +
        &self,
         126  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         127  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         128  +
        match self {
         129  +
            Self::Text(val) => {
         130  +
                ser.write_string(&REASONINGCONTENTBLOCKDELTA_MEMBER_TEXT, val)?;
         131  +
            }
         132  +
            Self::RedactedContent(val) => {
         133  +
                ser.write_blob(&REASONINGCONTENTBLOCKDELTA_MEMBER_REDACTEDCONTENT, val)?;
         134  +
            }
         135  +
            Self::Signature(val) => {
         136  +
                ser.write_string(&REASONINGCONTENTBLOCKDELTA_MEMBER_SIGNATURE, val)?;
         137  +
            }
         138  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
         139  +
        }
         140  +
        Ok(())
         141  +
    }
         142  +
}
         143  +
impl ReasoningContentBlockDelta {
         144  +
    /// Deserializes this union from a [`ShapeDeserializer`].
         145  +
    pub fn deserialize(
         146  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         147  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         148  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         149  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         150  +
        deserializer.read_struct(&REASONINGCONTENTBLOCKDELTA_SCHEMA, &mut |member, deser| {
         151  +
            result = ::std::option::Option::Some(match member.member_index() {
         152  +
                Some(0) => Self::Text(deser.read_string(member)?),
         153  +
                Some(1) => Self::RedactedContent(deser.read_blob(member)?),
         154  +
                Some(2) => Self::Signature(deser.read_string(member)?),
         155  +
                _ => Self::Unknown,
         156  +
            });
         157  +
            Ok(())
         158  +
        })?;
         159  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         160  +
    }
         161  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_reasoning_text_block.rs

@@ -54,54 +142,154 @@
   74     74   
            ser.write_string(&REASONINGTEXTBLOCK_MEMBER_TEXT, val)?;
   75     75   
        }
   76     76   
        if let Some(ref val) = self.signature {
   77     77   
            ser.write_string(&REASONINGTEXTBLOCK_MEMBER_SIGNATURE, val)?;
   78     78   
        }
   79     79   
        Ok(())
   80     80   
    }
   81     81   
}
   82     82   
impl ReasoningTextBlock {
   83     83   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   84         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   85         -
        deserializer: &mut D,
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   86     86   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   87     87   
        #[allow(unused_variables, unused_mut)]
   88     88   
        let mut builder = Self::builder();
   89     89   
        #[allow(
   90     90   
            unused_variables,
   91     91   
            unreachable_code,
   92     92   
            clippy::single_match,
   93     93   
            clippy::match_single_binding,
   94     94   
            clippy::diverging_sub_expression
   95     95   
        )]
   96         -
        deserializer.read_struct(&REASONINGTEXTBLOCK_SCHEMA, (), |_, member, deser| {
          96  +
        deserializer.read_struct(&REASONINGTEXTBLOCK_SCHEMA, &mut |member, deser| {
   97     97   
            match member.member_index() {
   98     98   
                Some(0) => {
   99     99   
                    builder.text = Some(deser.read_string(member)?);
  100    100   
                }
  101    101   
                Some(1) => {
  102    102   
                    builder.signature = Some(deser.read_string(member)?);
  103    103   
                }
  104    104   
                _ => {}
  105    105   
            }
  106    106   
            Ok(())
  107    107   
        })?;
         108  +
        builder.text = builder.text.or(Some(String::new()));
  108    109   
        builder
  109    110   
            .build()
  110    111   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  111    112   
    }
  112    113   
}
         114  +
impl ReasoningTextBlock {
         115  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         116  +
    pub fn deserialize_with_response(
         117  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         118  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         119  +
        _status: u16,
         120  +
        _body: &[u8],
         121  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         122  +
        Self::deserialize(deserializer)
         123  +
    }
         124  +
}
  113    125   
impl ReasoningTextBlock {
  114    126   
    /// Creates a new builder-style object to manufacture [`ReasoningTextBlock`](crate::types::ReasoningTextBlock).
  115    127   
    pub fn builder() -> crate::types::builders::ReasoningTextBlockBuilder {
  116    128   
        crate::types::builders::ReasoningTextBlockBuilder::default()
  117    129   
    }
  118    130   
}
  119    131   
  120    132   
/// A builder for [`ReasoningTextBlock`](crate::types::ReasoningTextBlock).
  121    133   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  122    134   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_response_stream.rs

@@ -17,17 +0,103 @@
   37     37   
    }
   38     38   
}
   39     39   
impl ::std::fmt::Debug for ResponseStream {
   40     40   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
   41     41   
        match self {
   42     42   
            ResponseStream::Chunk(_) => f.debug_tuple("*** Sensitive Data Redacted ***").finish(),
   43     43   
            ResponseStream::Unknown => f.debug_tuple("Unknown").finish(),
   44     44   
        }
   45     45   
    }
   46     46   
}
          47  +
static RESPONSESTREAM_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          48  +
    "com.amazonaws.bedrockruntime#ResponseStream",
          49  +
    "com.amazonaws.bedrockruntime",
          50  +
    "ResponseStream",
          51  +
);
          52  +
static RESPONSESTREAM_MEMBER_CHUNK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          53  +
    ::aws_smithy_schema::ShapeId::from_static(
          54  +
        "com.amazonaws.bedrockruntime#ResponseStream$chunk",
          55  +
        "com.amazonaws.bedrockruntime",
          56  +
        "ResponseStream",
          57  +
    ),
          58  +
    ::aws_smithy_schema::ShapeType::Structure,
          59  +
    "chunk",
          60  +
    0,
          61  +
);
          62  +
static RESPONSESTREAM_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          63  +
    RESPONSESTREAM_SCHEMA_ID,
          64  +
    ::aws_smithy_schema::ShapeType::Union,
          65  +
    &[&RESPONSESTREAM_MEMBER_CHUNK],
          66  +
)
          67  +
.with_streaming();
          68  +
impl ResponseStream {
          69  +
    /// The schema for this shape.
          70  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &RESPONSESTREAM_SCHEMA;
          71  +
}
          72  +
impl ::aws_smithy_schema::serde::SerializableStruct for ResponseStream {
          73  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          74  +
    fn serialize_members(
          75  +
        &self,
          76  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          77  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          78  +
        match self {
          79  +
            Self::Chunk(val) => {
          80  +
                ser.write_struct(&RESPONSESTREAM_MEMBER_CHUNK, val)?;
          81  +
            }
          82  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
          83  +
        }
          84  +
        Ok(())
          85  +
    }
          86  +
}
          87  +
impl ResponseStream {
          88  +
    /// Deserializes this union from a [`ShapeDeserializer`].
          89  +
    pub fn deserialize(
          90  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          91  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          92  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
          93  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
          94  +
        deserializer.read_struct(&RESPONSESTREAM_SCHEMA, &mut |member, deser| {
          95  +
            result = ::std::option::Option::Some(match member.member_index() {
          96  +
                Some(0) => Self::Chunk(crate::types::PayloadPart::deserialize(deser)?),
          97  +
                _ => Self::Unknown,
          98  +
            });
          99  +
            Ok(())
         100  +
        })?;
         101  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         102  +
    }
         103  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_s3_location.rs

@@ -12,12 +130,142 @@
   32     32   
    "uri",
   33     33   
    0,
   34     34   
);
   35     35   
static S3LOCATION_MEMBER_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   36     36   
    ::aws_smithy_schema::ShapeId::from_static(
   37     37   
        "com.amazonaws.bedrockruntime#S3Location$bucketOwner",
   38     38   
        "com.amazonaws.bedrockruntime",
   39     39   
        "S3Location",
   40     40   
    ),
   41     41   
    ::aws_smithy_schema::ShapeType::String,
   42         -
    "bucket_owner",
          42  +
    "bucketOwner",
   43     43   
    1,
   44     44   
);
   45     45   
static S3LOCATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   46     46   
    S3LOCATION_SCHEMA_ID,
   47     47   
    ::aws_smithy_schema::ShapeType::Structure,
   48     48   
    &[&S3LOCATION_MEMBER_URI, &S3LOCATION_MEMBER_BUCKET_OWNER],
   49     49   
);
   50     50   
impl S3Location {
   51     51   
    /// The schema for this shape.
   52     52   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &S3LOCATION_SCHEMA;
   53     53   
}
   54     54   
impl ::aws_smithy_schema::serde::SerializableStruct for S3Location {
   55     55   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   56     56   
    fn serialize_members(
   57     57   
        &self,
   58     58   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   59     59   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   60     60   
        {
   61     61   
            let val = &self.uri;
   62     62   
            ser.write_string(&S3LOCATION_MEMBER_URI, val)?;
   63     63   
        }
   64     64   
        if let Some(ref val) = self.bucket_owner {
   65     65   
            ser.write_string(&S3LOCATION_MEMBER_BUCKET_OWNER, val)?;
   66     66   
        }
   67     67   
        Ok(())
   68     68   
    }
   69     69   
}
   70     70   
impl S3Location {
   71     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   72         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   73         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   74     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   75     75   
        #[allow(unused_variables, unused_mut)]
   76     76   
        let mut builder = Self::builder();
   77     77   
        #[allow(
   78     78   
            unused_variables,
   79     79   
            unreachable_code,
   80     80   
            clippy::single_match,
   81     81   
            clippy::match_single_binding,
   82     82   
            clippy::diverging_sub_expression
   83     83   
        )]
   84         -
        deserializer.read_struct(&S3LOCATION_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&S3LOCATION_SCHEMA, &mut |member, deser| {
   85     85   
            match member.member_index() {
   86     86   
                Some(0) => {
   87     87   
                    builder.uri = Some(deser.read_string(member)?);
   88     88   
                }
   89     89   
                Some(1) => {
   90     90   
                    builder.bucket_owner = Some(deser.read_string(member)?);
   91     91   
                }
   92     92   
                _ => {}
   93     93   
            }
   94     94   
            Ok(())
   95     95   
        })?;
          96  +
        builder.uri = builder.uri.or(Some(String::new()));
   96     97   
        builder
   97     98   
            .build()
   98     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   99    100   
    }
  100    101   
}
         102  +
impl S3Location {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  101    113   
impl S3Location {
  102    114   
    /// Creates a new builder-style object to manufacture [`S3Location`](crate::types::S3Location).
  103    115   
    pub fn builder() -> crate::types::builders::S3LocationBuilder {
  104    116   
        crate::types::builders::S3LocationBuilder::default()
  105    117   
    }
  106    118   
}
  107    119   
  108    120   
/// A builder for [`S3Location`](crate::types::S3Location).
  109    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  110    122   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_specific_tool_choice.rs

@@ -28,28 +113,125 @@
   48     48   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   49     49   
        {
   50     50   
            let val = &self.name;
   51     51   
            ser.write_string(&SPECIFICTOOLCHOICE_MEMBER_NAME, val)?;
   52     52   
        }
   53     53   
        Ok(())
   54     54   
    }
   55     55   
}
   56     56   
impl SpecificToolChoice {
   57     57   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   58         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   59         -
        deserializer: &mut D,
          58  +
    pub fn deserialize(
          59  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   60     60   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   61     61   
        #[allow(unused_variables, unused_mut)]
   62     62   
        let mut builder = Self::builder();
   63     63   
        #[allow(
   64     64   
            unused_variables,
   65     65   
            unreachable_code,
   66     66   
            clippy::single_match,
   67     67   
            clippy::match_single_binding,
   68     68   
            clippy::diverging_sub_expression
   69     69   
        )]
   70         -
        deserializer.read_struct(&SPECIFICTOOLCHOICE_SCHEMA, (), |_, member, deser| {
          70  +
        deserializer.read_struct(&SPECIFICTOOLCHOICE_SCHEMA, &mut |member, deser| {
   71     71   
            match member.member_index() {
   72     72   
                Some(0) => {
   73     73   
                    builder.name = Some(deser.read_string(member)?);
   74     74   
                }
   75     75   
                _ => {}
   76     76   
            }
   77     77   
            Ok(())
   78     78   
        })?;
          79  +
        builder.name = builder.name.or(Some(String::new()));
   79     80   
        builder
   80     81   
            .build()
   81     82   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   82     83   
    }
   83     84   
}
          85  +
impl SpecificToolChoice {
          86  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          87  +
    pub fn deserialize_with_response(
          88  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          89  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          90  +
        _status: u16,
          91  +
        _body: &[u8],
          92  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          93  +
        Self::deserialize(deserializer)
          94  +
    }
          95  +
}
   84     96   
impl SpecificToolChoice {
   85     97   
    /// Creates a new builder-style object to manufacture [`SpecificToolChoice`](crate::types::SpecificToolChoice).
   86     98   
    pub fn builder() -> crate::types::builders::SpecificToolChoiceBuilder {
   87     99   
        crate::types::builders::SpecificToolChoiceBuilder::default()
   88    100   
    }
   89    101   
}
   90    102   
   91    103   
/// A builder for [`SpecificToolChoice`](crate::types::SpecificToolChoice).
   92    104   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   93    105   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_system_content_block.rs

@@ -39,39 +0,156 @@
   59     59   
    }
   60     60   
    /// Returns true if this is a [`Text`](crate::types::SystemContentBlock::Text).
   61     61   
    pub fn is_text(&self) -> bool {
   62     62   
        self.as_text().is_ok()
   63     63   
    }
   64     64   
    /// Returns true if the enum instance is the `Unknown` variant.
   65     65   
    pub fn is_unknown(&self) -> bool {
   66     66   
        matches!(self, Self::Unknown)
   67     67   
    }
   68     68   
}
          69  +
static SYSTEMCONTENTBLOCK_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          70  +
    "com.amazonaws.bedrockruntime#SystemContentBlock",
          71  +
    "com.amazonaws.bedrockruntime",
          72  +
    "SystemContentBlock",
          73  +
);
          74  +
static SYSTEMCONTENTBLOCK_MEMBER_TEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          75  +
    ::aws_smithy_schema::ShapeId::from_static(
          76  +
        "com.amazonaws.bedrockruntime#SystemContentBlock$text",
          77  +
        "com.amazonaws.bedrockruntime",
          78  +
        "SystemContentBlock",
          79  +
    ),
          80  +
    ::aws_smithy_schema::ShapeType::String,
          81  +
    "text",
          82  +
    0,
          83  +
);
          84  +
static SYSTEMCONTENTBLOCK_MEMBER_GUARDCONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          85  +
    ::aws_smithy_schema::ShapeId::from_static(
          86  +
        "com.amazonaws.bedrockruntime#SystemContentBlock$guardContent",
          87  +
        "com.amazonaws.bedrockruntime",
          88  +
        "SystemContentBlock",
          89  +
    ),
          90  +
    ::aws_smithy_schema::ShapeType::Union,
          91  +
    "guardContent",
          92  +
    1,
          93  +
);
          94  +
static SYSTEMCONTENTBLOCK_MEMBER_CACHEPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          95  +
    ::aws_smithy_schema::ShapeId::from_static(
          96  +
        "com.amazonaws.bedrockruntime#SystemContentBlock$cachePoint",
          97  +
        "com.amazonaws.bedrockruntime",
          98  +
        "SystemContentBlock",
          99  +
    ),
         100  +
    ::aws_smithy_schema::ShapeType::Structure,
         101  +
    "cachePoint",
         102  +
    2,
         103  +
);
         104  +
static SYSTEMCONTENTBLOCK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
         105  +
    SYSTEMCONTENTBLOCK_SCHEMA_ID,
         106  +
    ::aws_smithy_schema::ShapeType::Union,
         107  +
    &[
         108  +
        &SYSTEMCONTENTBLOCK_MEMBER_TEXT,
         109  +
        &SYSTEMCONTENTBLOCK_MEMBER_GUARDCONTENT,
         110  +
        &SYSTEMCONTENTBLOCK_MEMBER_CACHEPOINT,
         111  +
    ],
         112  +
);
         113  +
impl SystemContentBlock {
         114  +
    /// The schema for this shape.
         115  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SYSTEMCONTENTBLOCK_SCHEMA;
         116  +
}
         117  +
impl ::aws_smithy_schema::serde::SerializableStruct for SystemContentBlock {
         118  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         119  +
    fn serialize_members(
         120  +
        &self,
         121  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         122  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         123  +
        match self {
         124  +
            Self::Text(val) => {
         125  +
                ser.write_string(&SYSTEMCONTENTBLOCK_MEMBER_TEXT, val)?;
         126  +
            }
         127  +
            Self::GuardContent(val) => {
         128  +
                ser.write_struct(&SYSTEMCONTENTBLOCK_MEMBER_GUARDCONTENT, val)?;
         129  +
            }
         130  +
            Self::CachePoint(val) => {
         131  +
                ser.write_struct(&SYSTEMCONTENTBLOCK_MEMBER_CACHEPOINT, val)?;
         132  +
            }
         133  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
         134  +
        }
         135  +
        Ok(())
         136  +
    }
         137  +
}
         138  +
impl SystemContentBlock {
         139  +
    /// Deserializes this union from a [`ShapeDeserializer`].
         140  +
    pub fn deserialize(
         141  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         142  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         143  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         144  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         145  +
        deserializer.read_struct(&SYSTEMCONTENTBLOCK_SCHEMA, &mut |member, deser| {
         146  +
            result = ::std::option::Option::Some(match member.member_index() {
         147  +
                Some(0) => Self::Text(deser.read_string(member)?),
         148  +
                Some(1) => Self::GuardContent(crate::types::GuardrailConverseContentBlock::deserialize(deser)?),
         149  +
                Some(2) => Self::CachePoint(crate::types::CachePointBlock::deserialize(deser)?),
         150  +
                _ => Self::Unknown,
         151  +
            });
         152  +
            Ok(())
         153  +
        })?;
         154  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         155  +
    }
         156  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tag.rs

@@ -36,36 +124,137 @@
   56     56   
        }
   57     57   
        {
   58     58   
            let val = &self.value;
   59     59   
            ser.write_string(&TAG_MEMBER_VALUE, val)?;
   60     60   
        }
   61     61   
        Ok(())
   62     62   
    }
   63     63   
}
   64     64   
impl Tag {
   65     65   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   66         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   67         -
        deserializer: &mut D,
          66  +
    pub fn deserialize(
          67  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   68     68   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   69     69   
        #[allow(unused_variables, unused_mut)]
   70     70   
        let mut builder = Self::builder();
   71     71   
        #[allow(
   72     72   
            unused_variables,
   73     73   
            unreachable_code,
   74     74   
            clippy::single_match,
   75     75   
            clippy::match_single_binding,
   76     76   
            clippy::diverging_sub_expression
   77     77   
        )]
   78         -
        deserializer.read_struct(&TAG_SCHEMA, (), |_, member, deser| {
          78  +
        deserializer.read_struct(&TAG_SCHEMA, &mut |member, deser| {
   79     79   
            match member.member_index() {
   80     80   
                Some(0) => {
   81     81   
                    builder.key = Some(deser.read_string(member)?);
   82     82   
                }
   83     83   
                Some(1) => {
   84     84   
                    builder.value = Some(deser.read_string(member)?);
   85     85   
                }
   86     86   
                _ => {}
   87     87   
            }
   88     88   
            Ok(())
   89     89   
        })?;
          90  +
        builder.key = builder.key.or(Some(String::new()));
          91  +
        builder.value = builder.value.or(Some(String::new()));
   90     92   
        builder
   91     93   
            .build()
   92     94   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   93     95   
    }
   94     96   
}
          97  +
impl Tag {
          98  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          99  +
    pub fn deserialize_with_response(
         100  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         101  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         102  +
        _status: u16,
         103  +
        _body: &[u8],
         104  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         105  +
        Self::deserialize(deserializer)
         106  +
    }
         107  +
}
   95    108   
impl Tag {
   96    109   
    /// Creates a new builder-style object to manufacture [`Tag`](crate::types::Tag).
   97    110   
    pub fn builder() -> crate::types::builders::TagBuilder {
   98    111   
        crate::types::builders::TagBuilder::default()
   99    112   
    }
  100    113   
}
  101    114   
  102    115   
/// A builder for [`Tag`](crate::types::Tag).
  103    116   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  104    117   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_token_usage.rs

@@ -19,19 +203,217 @@
   39     39   
}
   40     40   
static TOKENUSAGE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
   41     41   
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.bedrockruntime#TokenUsage", "com.amazonaws.bedrockruntime", "TokenUsage");
   42     42   
static TOKENUSAGE_MEMBER_INPUT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.bedrockruntime#TokenUsage$inputTokens",
   45     45   
        "com.amazonaws.bedrockruntime",
   46     46   
        "TokenUsage",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::Integer,
   49         -
    "input_tokens",
          49  +
    "inputTokens",
   50     50   
    0,
   51     51   
);
   52     52   
static TOKENUSAGE_MEMBER_OUTPUT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.bedrockruntime#TokenUsage$outputTokens",
   55     55   
        "com.amazonaws.bedrockruntime",
   56     56   
        "TokenUsage",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::Integer,
   59         -
    "output_tokens",
          59  +
    "outputTokens",
   60     60   
    1,
   61     61   
);
   62     62   
static TOKENUSAGE_MEMBER_TOTAL_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.bedrockruntime#TokenUsage$totalTokens",
   65     65   
        "com.amazonaws.bedrockruntime",
   66     66   
        "TokenUsage",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::Integer,
   69         -
    "total_tokens",
          69  +
    "totalTokens",
   70     70   
    2,
   71     71   
);
   72     72   
static TOKENUSAGE_MEMBER_CACHE_READ_INPUT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.bedrockruntime#TokenUsage$cacheReadInputTokens",
   75     75   
        "com.amazonaws.bedrockruntime",
   76     76   
        "TokenUsage",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::Integer,
   79         -
    "cache_read_input_tokens",
          79  +
    "cacheReadInputTokens",
   80     80   
    3,
   81     81   
);
   82     82   
static TOKENUSAGE_MEMBER_CACHE_WRITE_INPUT_TOKENS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.bedrockruntime#TokenUsage$cacheWriteInputTokens",
   85     85   
        "com.amazonaws.bedrockruntime",
   86     86   
        "TokenUsage",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::Integer,
   89         -
    "cache_write_input_tokens",
          89  +
    "cacheWriteInputTokens",
   90     90   
    4,
   91     91   
);
   92     92   
static TOKENUSAGE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   93     93   
    TOKENUSAGE_SCHEMA_ID,
   94     94   
    ::aws_smithy_schema::ShapeType::Structure,
   95     95   
    &[
   96     96   
        &TOKENUSAGE_MEMBER_INPUT_TOKENS,
   97     97   
        &TOKENUSAGE_MEMBER_OUTPUT_TOKENS,
   98     98   
        &TOKENUSAGE_MEMBER_TOTAL_TOKENS,
   99     99   
        &TOKENUSAGE_MEMBER_CACHE_READ_INPUT_TOKENS,
  100    100   
        &TOKENUSAGE_MEMBER_CACHE_WRITE_INPUT_TOKENS,
  101    101   
    ],
  102    102   
);
  103    103   
impl TokenUsage {
  104    104   
    /// The schema for this shape.
  105    105   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOKENUSAGE_SCHEMA;
  106    106   
}
  107    107   
impl ::aws_smithy_schema::serde::SerializableStruct for TokenUsage {
  108    108   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  109    109   
    fn serialize_members(
  110    110   
        &self,
  111    111   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  112    112   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  113    113   
        {
  114    114   
            let val = &self.input_tokens;
  115    115   
            ser.write_integer(&TOKENUSAGE_MEMBER_INPUT_TOKENS, *val)?;
  116    116   
        }
  117    117   
        {
  118    118   
            let val = &self.output_tokens;
  119    119   
            ser.write_integer(&TOKENUSAGE_MEMBER_OUTPUT_TOKENS, *val)?;
  120    120   
        }
  121    121   
        {
  122    122   
            let val = &self.total_tokens;
  123    123   
            ser.write_integer(&TOKENUSAGE_MEMBER_TOTAL_TOKENS, *val)?;
  124    124   
        }
  125    125   
        if let Some(ref val) = self.cache_read_input_tokens {
  126    126   
            ser.write_integer(&TOKENUSAGE_MEMBER_CACHE_READ_INPUT_TOKENS, *val)?;
  127    127   
        }
  128    128   
        if let Some(ref val) = self.cache_write_input_tokens {
  129    129   
            ser.write_integer(&TOKENUSAGE_MEMBER_CACHE_WRITE_INPUT_TOKENS, *val)?;
  130    130   
        }
  131    131   
        Ok(())
  132    132   
    }
  133    133   
}
  134    134   
impl TokenUsage {
  135    135   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  136         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  137         -
        deserializer: &mut D,
         136  +
    pub fn deserialize(
         137  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  138    138   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  139    139   
        #[allow(unused_variables, unused_mut)]
  140    140   
        let mut builder = Self::builder();
  141    141   
        #[allow(
  142    142   
            unused_variables,
  143    143   
            unreachable_code,
  144    144   
            clippy::single_match,
  145    145   
            clippy::match_single_binding,
  146    146   
            clippy::diverging_sub_expression
  147    147   
        )]
  148         -
        deserializer.read_struct(&TOKENUSAGE_SCHEMA, (), |_, member, deser| {
         148  +
        deserializer.read_struct(&TOKENUSAGE_SCHEMA, &mut |member, deser| {
  149    149   
            match member.member_index() {
  150    150   
                Some(0) => {
  151    151   
                    builder.input_tokens = Some(deser.read_integer(member)?);
  152    152   
                }
  153    153   
                Some(1) => {
  154    154   
                    builder.output_tokens = Some(deser.read_integer(member)?);
  155    155   
                }
  156    156   
                Some(2) => {
  157    157   
                    builder.total_tokens = Some(deser.read_integer(member)?);
  158    158   
                }
  159    159   
                Some(3) => {
  160    160   
                    builder.cache_read_input_tokens = Some(deser.read_integer(member)?);
  161    161   
                }
  162    162   
                Some(4) => {
  163    163   
                    builder.cache_write_input_tokens = Some(deser.read_integer(member)?);
  164    164   
                }
  165    165   
                _ => {}
  166    166   
            }
  167    167   
            Ok(())
  168    168   
        })?;
         169  +
        builder.input_tokens = builder.input_tokens.or(Some(0i32));
         170  +
        builder.output_tokens = builder.output_tokens.or(Some(0i32));
         171  +
        builder.total_tokens = builder.total_tokens.or(Some(0i32));
  169    172   
        builder
  170    173   
            .build()
  171    174   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  172    175   
    }
  173    176   
}
         177  +
impl TokenUsage {
         178  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         179  +
    pub fn deserialize_with_response(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         181  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         182  +
        _status: u16,
         183  +
        _body: &[u8],
         184  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         185  +
        Self::deserialize(deserializer)
         186  +
    }
         187  +
}
  174    188   
impl TokenUsage {
  175    189   
    /// Creates a new builder-style object to manufacture [`TokenUsage`](crate::types::TokenUsage).
  176    190   
    pub fn builder() -> crate::types::builders::TokenUsageBuilder {
  177    191   
        crate::types::builders::TokenUsageBuilder::default()
  178    192   
    }
  179    193   
}
  180    194   
  181    195   
/// A builder for [`TokenUsage`](crate::types::TokenUsage).
  182    196   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  183    197   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool.rs

@@ -23,23 +0,111 @@
   43     43   
    }
   44     44   
    /// Returns true if this is a [`ToolSpec`](crate::types::Tool::ToolSpec).
   45     45   
    pub fn is_tool_spec(&self) -> bool {
   46     46   
        self.as_tool_spec().is_ok()
   47     47   
    }
   48     48   
    /// Returns true if the enum instance is the `Unknown` variant.
   49     49   
    pub fn is_unknown(&self) -> bool {
   50     50   
        matches!(self, Self::Unknown)
   51     51   
    }
   52     52   
}
          53  +
static TOOL_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
          54  +
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.bedrockruntime#Tool", "com.amazonaws.bedrockruntime", "Tool");
          55  +
static TOOL_MEMBER_TOOLSPEC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.bedrockruntime#Tool$toolSpec", "com.amazonaws.bedrockruntime", "Tool"),
          57  +
    ::aws_smithy_schema::ShapeType::Structure,
          58  +
    "toolSpec",
          59  +
    0,
          60  +
);
          61  +
static TOOL_MEMBER_CACHEPOINT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          62  +
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.bedrockruntime#Tool$cachePoint", "com.amazonaws.bedrockruntime", "Tool"),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    "cachePoint",
          65  +
    1,
          66  +
);
          67  +
static TOOL_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          68  +
    TOOL_SCHEMA_ID,
          69  +
    ::aws_smithy_schema::ShapeType::Union,
          70  +
    &[&TOOL_MEMBER_TOOLSPEC, &TOOL_MEMBER_CACHEPOINT],
          71  +
);
          72  +
impl Tool {
          73  +
    /// The schema for this shape.
          74  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOL_SCHEMA;
          75  +
}
          76  +
impl ::aws_smithy_schema::serde::SerializableStruct for Tool {
          77  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          78  +
    fn serialize_members(
          79  +
        &self,
          80  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          81  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          82  +
        match self {
          83  +
            Self::ToolSpec(val) => {
          84  +
                ser.write_struct(&TOOL_MEMBER_TOOLSPEC, val)?;
          85  +
            }
          86  +
            Self::CachePoint(val) => {
          87  +
                ser.write_struct(&TOOL_MEMBER_CACHEPOINT, val)?;
          88  +
            }
          89  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
          90  +
        }
          91  +
        Ok(())
          92  +
    }
          93  +
}
          94  +
impl Tool {
          95  +
    /// Deserializes this union from a [`ShapeDeserializer`].
          96  +
    pub fn deserialize(
          97  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          98  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          99  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         100  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         101  +
        deserializer.read_struct(&TOOL_SCHEMA, &mut |member, deser| {
         102  +
            result = ::std::option::Option::Some(match member.member_index() {
         103  +
                Some(0) => Self::ToolSpec(crate::types::ToolSpecification::deserialize(deser)?),
         104  +
                Some(1) => Self::CachePoint(crate::types::CachePointBlock::deserialize(deser)?),
         105  +
                _ => Self::Unknown,
         106  +
            });
         107  +
            Ok(())
         108  +
        })?;
         109  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         110  +
    }
         111  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_choice.rs

@@ -38,38 +0,148 @@
   58     58   
    }
   59     59   
    /// Returns true if this is a [`Tool`](crate::types::ToolChoice::Tool).
   60     60   
    pub fn is_tool(&self) -> bool {
   61     61   
        self.as_tool().is_ok()
   62     62   
    }
   63     63   
    /// Returns true if the enum instance is the `Unknown` variant.
   64     64   
    pub fn is_unknown(&self) -> bool {
   65     65   
        matches!(self, Self::Unknown)
   66     66   
    }
   67     67   
}
          68  +
static TOOLCHOICE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
          69  +
    ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.bedrockruntime#ToolChoice", "com.amazonaws.bedrockruntime", "ToolChoice");
          70  +
static TOOLCHOICE_MEMBER_AUTO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          71  +
    ::aws_smithy_schema::ShapeId::from_static(
          72  +
        "com.amazonaws.bedrockruntime#ToolChoice$auto",
          73  +
        "com.amazonaws.bedrockruntime",
          74  +
        "ToolChoice",
          75  +
    ),
          76  +
    ::aws_smithy_schema::ShapeType::Structure,
          77  +
    "auto",
          78  +
    0,
          79  +
);
          80  +
static TOOLCHOICE_MEMBER_ANY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          81  +
    ::aws_smithy_schema::ShapeId::from_static(
          82  +
        "com.amazonaws.bedrockruntime#ToolChoice$any",
          83  +
        "com.amazonaws.bedrockruntime",
          84  +
        "ToolChoice",
          85  +
    ),
          86  +
    ::aws_smithy_schema::ShapeType::Structure,
          87  +
    "any",
          88  +
    1,
          89  +
);
          90  +
static TOOLCHOICE_MEMBER_TOOL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          91  +
    ::aws_smithy_schema::ShapeId::from_static(
          92  +
        "com.amazonaws.bedrockruntime#ToolChoice$tool",
          93  +
        "com.amazonaws.bedrockruntime",
          94  +
        "ToolChoice",
          95  +
    ),
          96  +
    ::aws_smithy_schema::ShapeType::Structure,
          97  +
    "tool",
          98  +
    2,
          99  +
);
         100  +
static TOOLCHOICE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
         101  +
    TOOLCHOICE_SCHEMA_ID,
         102  +
    ::aws_smithy_schema::ShapeType::Union,
         103  +
    &[&TOOLCHOICE_MEMBER_AUTO, &TOOLCHOICE_MEMBER_ANY, &TOOLCHOICE_MEMBER_TOOL],
         104  +
);
         105  +
impl ToolChoice {
         106  +
    /// The schema for this shape.
         107  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLCHOICE_SCHEMA;
         108  +
}
         109  +
impl ::aws_smithy_schema::serde::SerializableStruct for ToolChoice {
         110  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         111  +
    fn serialize_members(
         112  +
        &self,
         113  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         114  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         115  +
        match self {
         116  +
            Self::Auto(val) => {
         117  +
                ser.write_struct(&TOOLCHOICE_MEMBER_AUTO, val)?;
         118  +
            }
         119  +
            Self::Any(val) => {
         120  +
                ser.write_struct(&TOOLCHOICE_MEMBER_ANY, val)?;
         121  +
            }
         122  +
            Self::Tool(val) => {
         123  +
                ser.write_struct(&TOOLCHOICE_MEMBER_TOOL, val)?;
         124  +
            }
         125  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
         126  +
        }
         127  +
        Ok(())
         128  +
    }
         129  +
}
         130  +
impl ToolChoice {
         131  +
    /// Deserializes this union from a [`ShapeDeserializer`].
         132  +
    pub fn deserialize(
         133  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         134  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         135  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         136  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         137  +
        deserializer.read_struct(&TOOLCHOICE_SCHEMA, &mut |member, deser| {
         138  +
            result = ::std::option::Option::Some(match member.member_index() {
         139  +
                Some(0) => Self::Auto(crate::types::AutoToolChoice::deserialize(deser)?),
         140  +
                Some(1) => Self::Any(crate::types::AnyToolChoice::deserialize(deser)?),
         141  +
                Some(2) => Self::Tool(crate::types::SpecificToolChoice::deserialize(deser)?),
         142  +
                _ => Self::Unknown,
         143  +
            });
         144  +
            Ok(())
         145  +
        })?;
         146  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         147  +
    }
         148  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_configuration.rs

@@ -15,15 +155,161 @@
   35     35   
    "tools",
   36     36   
    0,
   37     37   
);
   38     38   
static TOOLCONFIGURATION_MEMBER_TOOL_CHOICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   39     39   
    ::aws_smithy_schema::ShapeId::from_static(
   40     40   
        "com.amazonaws.bedrockruntime#ToolConfiguration$toolChoice",
   41     41   
        "com.amazonaws.bedrockruntime",
   42     42   
        "ToolConfiguration",
   43     43   
    ),
   44     44   
    ::aws_smithy_schema::ShapeType::Union,
   45         -
    "tool_choice",
          45  +
    "toolChoice",
   46     46   
    1,
   47     47   
);
   48     48   
static TOOLCONFIGURATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   49     49   
    TOOLCONFIGURATION_SCHEMA_ID,
   50     50   
    ::aws_smithy_schema::ShapeType::Structure,
   51     51   
    &[&TOOLCONFIGURATION_MEMBER_TOOLS, &TOOLCONFIGURATION_MEMBER_TOOL_CHOICE],
   52     52   
);
   53     53   
impl ToolConfiguration {
   54     54   
    /// The schema for this shape.
   55     55   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLCONFIGURATION_SCHEMA;
   56     56   
}
   57     57   
impl ::aws_smithy_schema::serde::SerializableStruct for ToolConfiguration {
   58     58   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   59     59   
    fn serialize_members(
   60     60   
        &self,
   61     61   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   62     62   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   63     63   
        {
   64     64   
            let val = &self.tools;
   65     65   
   66     66   
            ser.write_list(
   67     67   
                &TOOLCONFIGURATION_MEMBER_TOOLS,
   68     68   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   69     69   
                    for item in val {
   70         -
                        todo!("schema: unsupported list element type");
          70  +
                        ser.write_struct(crate::types::Tool::SCHEMA, item)?;
   71     71   
                    }
   72     72   
                    Ok(())
   73     73   
                },
   74     74   
            )?;
   75     75   
        }
   76     76   
        if let Some(ref val) = self.tool_choice {
   77         -
            ser.write_null(&TOOLCONFIGURATION_MEMBER_TOOL_CHOICE)?;
          77  +
            ser.write_struct(&TOOLCONFIGURATION_MEMBER_TOOL_CHOICE, val)?;
   78     78   
        }
   79     79   
        Ok(())
   80     80   
    }
   81     81   
}
   82     82   
impl ToolConfiguration {
   83     83   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   84         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   85         -
        deserializer: &mut D,
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   86     86   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   87     87   
        #[allow(unused_variables, unused_mut)]
   88     88   
        let mut builder = Self::builder();
   89     89   
        #[allow(
   90     90   
            unused_variables,
   91     91   
            unreachable_code,
   92     92   
            clippy::single_match,
   93     93   
            clippy::match_single_binding,
   94     94   
            clippy::diverging_sub_expression
   95     95   
        )]
   96         -
        deserializer.read_struct(&TOOLCONFIGURATION_SCHEMA, (), |_, member, deser| {
          96  +
        deserializer.read_struct(&TOOLCONFIGURATION_SCHEMA, &mut |member, deser| {
   97     97   
            match member.member_index() {
   98     98   
                Some(0) => {
   99     99   
                    builder.tools = Some({
  100         -
                        let container = if let Some(cap) = deser.container_size() {
  101         -
                            Vec::with_capacity(cap)
  102         -
                        } else {
  103         -
                            Vec::new()
  104         -
                        };
  105         -
                        deser.read_list(member, container, |mut list, deser| {
  106         -
                            list.push(todo!("deserialize nested aggregate"));
  107         -
                            Ok(list)
  108         -
                        })?
         100  +
                        let mut container = Vec::new();
         101  +
                        deser.read_list(member, &mut |deser| {
         102  +
                            container.push(crate::types::Tool::deserialize(deser)?);
         103  +
                            Ok(())
         104  +
                        })?;
         105  +
                        container
  109    106   
                    });
  110    107   
                }
  111    108   
                Some(1) => {
  112         -
                    builder.tool_choice = Some({
  113         -
                        let _ = member;
  114         -
                        todo!("deserialize aggregate")
  115         -
                    });
         109  +
                    builder.tool_choice = Some(crate::types::ToolChoice::deserialize(deser)?);
  116    110   
                }
  117    111   
                _ => {}
  118    112   
            }
  119    113   
            Ok(())
  120    114   
        })?;
         115  +
        builder.tools = builder.tools.or(Some(Vec::new()));
  121    116   
        builder
  122    117   
            .build()
  123    118   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  124    119   
    }
  125    120   
}
         121  +
impl ToolConfiguration {
         122  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         123  +
    pub fn deserialize_with_response(
         124  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         125  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         126  +
        _status: u16,
         127  +
        _body: &[u8],
         128  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         129  +
        Self::deserialize(deserializer)
         130  +
    }
         131  +
}
  126    132   
impl ToolConfiguration {
  127    133   
    /// Creates a new builder-style object to manufacture [`ToolConfiguration`](crate::types::ToolConfiguration).
  128    134   
    pub fn builder() -> crate::types::builders::ToolConfigurationBuilder {
  129    135   
        crate::types::builders::ToolConfigurationBuilder::default()
  130    136   
    }
  131    137   
}
  132    138   
  133    139   
/// A builder for [`ToolConfiguration`](crate::types::ToolConfiguration).
  134    140   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  135    141   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_input_schema.rs

@@ -9,9 +0,94 @@
   29     29   
    }
   30     30   
    /// Returns true if this is a [`Json`](crate::types::ToolInputSchema::Json).
   31     31   
    pub fn is_json(&self) -> bool {
   32     32   
        self.as_json().is_ok()
   33     33   
    }
   34     34   
    /// Returns true if the enum instance is the `Unknown` variant.
   35     35   
    pub fn is_unknown(&self) -> bool {
   36     36   
        matches!(self, Self::Unknown)
   37     37   
    }
   38     38   
}
          39  +
static TOOLINPUTSCHEMA_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
          40  +
    "com.amazonaws.bedrockruntime#ToolInputSchema",
          41  +
    "com.amazonaws.bedrockruntime",
          42  +
    "ToolInputSchema",
          43  +
);
          44  +
static TOOLINPUTSCHEMA_MEMBER_JSON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_static(
          46  +
        "com.amazonaws.bedrockruntime#ToolInputSchema$json",
          47  +
        "com.amazonaws.bedrockruntime",
          48  +
        "ToolInputSchema",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::Document,
          51  +
    "json",
          52  +
    0,
          53  +
);
          54  +
static TOOLINPUTSCHEMA_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          55  +
    TOOLINPUTSCHEMA_SCHEMA_ID,
          56  +
    ::aws_smithy_schema::ShapeType::Union,
          57  +
    &[&TOOLINPUTSCHEMA_MEMBER_JSON],
          58  +
);
          59  +
impl ToolInputSchema {
          60  +
    /// The schema for this shape.
          61  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLINPUTSCHEMA_SCHEMA;
          62  +
}
          63  +
impl ::aws_smithy_schema::serde::SerializableStruct for ToolInputSchema {
          64  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          65  +
    fn serialize_members(
          66  +
        &self,
          67  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          68  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          69  +
        match self {
          70  +
            Self::Json(val) => {
          71  +
                ser.write_document(&TOOLINPUTSCHEMA_MEMBER_JSON, val)?;
          72  +
            }
          73  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
          74  +
        }
          75  +
        Ok(())
          76  +
    }
          77  +
}
          78  +
impl ToolInputSchema {
          79  +
    /// Deserializes this union from a [`ShapeDeserializer`].
          80  +
    pub fn deserialize(
          81  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          82  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          83  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
          84  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
          85  +
        deserializer.read_struct(&TOOLINPUTSCHEMA_SCHEMA, &mut |member, deser| {
          86  +
            result = ::std::option::Option::Some(match member.member_index() {
          87  +
                Some(0) => Self::Json(deser.read_document(member)?),
          88  +
                _ => Self::Unknown,
          89  +
            });
          90  +
            Ok(())
          91  +
        })?;
          92  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
          93  +
    }
          94  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_result_block.rs

@@ -16,16 +184,194 @@
   36     36   
    "com.amazonaws.bedrockruntime",
   37     37   
    "ToolResultBlock",
   38     38   
);
   39     39   
static TOOLRESULTBLOCK_MEMBER_TOOL_USE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   40     40   
    ::aws_smithy_schema::ShapeId::from_static(
   41     41   
        "com.amazonaws.bedrockruntime#ToolResultBlock$toolUseId",
   42     42   
        "com.amazonaws.bedrockruntime",
   43     43   
        "ToolResultBlock",
   44     44   
    ),
   45     45   
    ::aws_smithy_schema::ShapeType::String,
   46         -
    "tool_use_id",
          46  +
    "toolUseId",
   47     47   
    0,
   48     48   
);
   49     49   
static TOOLRESULTBLOCK_MEMBER_CONTENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   50     50   
    ::aws_smithy_schema::ShapeId::from_static(
   51     51   
        "com.amazonaws.bedrockruntime#ToolResultBlock$content",
   52     52   
        "com.amazonaws.bedrockruntime",
   53     53   
        "ToolResultBlock",
   54     54   
    ),
   55     55   
    ::aws_smithy_schema::ShapeType::List,
   56     56   
    "content",
   57     57   
    1,
   58     58   
);
   59     59   
static TOOLRESULTBLOCK_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   60     60   
    ::aws_smithy_schema::ShapeId::from_static(
   61     61   
        "com.amazonaws.bedrockruntime#ToolResultBlock$status",
   62     62   
        "com.amazonaws.bedrockruntime",
   63     63   
        "ToolResultBlock",
   64     64   
    ),
   65     65   
    ::aws_smithy_schema::ShapeType::String,
   66     66   
    "status",
   67     67   
    2,
   68     68   
);
   69     69   
static TOOLRESULTBLOCK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   70     70   
    TOOLRESULTBLOCK_SCHEMA_ID,
   71     71   
    ::aws_smithy_schema::ShapeType::Structure,
   72     72   
    &[
   73     73   
        &TOOLRESULTBLOCK_MEMBER_TOOL_USE_ID,
   74     74   
        &TOOLRESULTBLOCK_MEMBER_CONTENT,
   75     75   
        &TOOLRESULTBLOCK_MEMBER_STATUS,
   76     76   
    ],
   77     77   
);
   78     78   
impl ToolResultBlock {
   79     79   
    /// The schema for this shape.
   80     80   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLRESULTBLOCK_SCHEMA;
   81     81   
}
   82     82   
impl ::aws_smithy_schema::serde::SerializableStruct for ToolResultBlock {
   83     83   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   84     84   
    fn serialize_members(
   85     85   
        &self,
   86     86   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   87     87   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   88     88   
        {
   89     89   
            let val = &self.tool_use_id;
   90     90   
            ser.write_string(&TOOLRESULTBLOCK_MEMBER_TOOL_USE_ID, val)?;
   91     91   
        }
   92     92   
        {
   93     93   
            let val = &self.content;
   94     94   
   95     95   
            ser.write_list(
   96     96   
                &TOOLRESULTBLOCK_MEMBER_CONTENT,
   97     97   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   98     98   
                    for item in val {
   99         -
                        todo!("schema: unsupported list element type");
          99  +
                        ser.write_struct(crate::types::ToolResultContentBlock::SCHEMA, item)?;
  100    100   
                    }
  101    101   
                    Ok(())
  102    102   
                },
  103    103   
            )?;
  104    104   
        }
  105    105   
        if let Some(ref val) = self.status {
  106    106   
            ser.write_string(&TOOLRESULTBLOCK_MEMBER_STATUS, val.as_str())?;
  107    107   
        }
  108    108   
        Ok(())
  109    109   
    }
  110    110   
}
  111    111   
impl ToolResultBlock {
  112    112   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  113         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  114         -
        deserializer: &mut D,
         113  +
    pub fn deserialize(
         114  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  115    115   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  116    116   
        #[allow(unused_variables, unused_mut)]
  117    117   
        let mut builder = Self::builder();
  118    118   
        #[allow(
  119    119   
            unused_variables,
  120    120   
            unreachable_code,
  121    121   
            clippy::single_match,
  122    122   
            clippy::match_single_binding,
  123    123   
            clippy::diverging_sub_expression
  124    124   
        )]
  125         -
        deserializer.read_struct(&TOOLRESULTBLOCK_SCHEMA, (), |_, member, deser| {
         125  +
        deserializer.read_struct(&TOOLRESULTBLOCK_SCHEMA, &mut |member, deser| {
  126    126   
            match member.member_index() {
  127    127   
                Some(0) => {
  128    128   
                    builder.tool_use_id = Some(deser.read_string(member)?);
  129    129   
                }
  130    130   
                Some(1) => {
  131    131   
                    builder.content = Some({
  132         -
                        let container = if let Some(cap) = deser.container_size() {
  133         -
                            Vec::with_capacity(cap)
  134         -
                        } else {
  135         -
                            Vec::new()
  136         -
                        };
  137         -
                        deser.read_list(member, container, |mut list, deser| {
  138         -
                            list.push(todo!("deserialize nested aggregate"));
  139         -
                            Ok(list)
  140         -
                        })?
         132  +
                        let mut container = Vec::new();
         133  +
                        deser.read_list(member, &mut |deser| {
         134  +
                            container.push(crate::types::ToolResultContentBlock::deserialize(deser)?);
         135  +
                            Ok(())
         136  +
                        })?;
         137  +
                        container
  141    138   
                    });
  142    139   
                }
  143    140   
                Some(2) => {
  144    141   
                    builder.status = Some(crate::types::ToolResultStatus::from(deser.read_string(member)?.as_str()));
  145    142   
                }
  146    143   
                _ => {}
  147    144   
            }
  148    145   
            Ok(())
  149    146   
        })?;
         147  +
        builder.tool_use_id = builder.tool_use_id.or(Some(String::new()));
         148  +
        builder.content = builder.content.or(Some(Vec::new()));
  150    149   
        builder
  151    150   
            .build()
  152    151   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  153    152   
    }
  154    153   
}
         154  +
impl ToolResultBlock {
         155  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         156  +
    pub fn deserialize_with_response(
         157  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         158  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         159  +
        _status: u16,
         160  +
        _body: &[u8],
         161  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         162  +
        Self::deserialize(deserializer)
         163  +
    }
         164  +
}
  155    165   
impl ToolResultBlock {
  156    166   
    /// Creates a new builder-style object to manufacture [`ToolResultBlock`](crate::types::ToolResultBlock).
  157    167   
    pub fn builder() -> crate::types::builders::ToolResultBlockBuilder {
  158    168   
        crate::types::builders::ToolResultBlockBuilder::default()
  159    169   
    }
  160    170   
}
  161    171   
  162    172   
/// A builder for [`ToolResultBlock`](crate::types::ToolResultBlock).
  163    173   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  164    174   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_result_content_block.rs

@@ -70,70 +0,217 @@
   90     90   
    }
   91     91   
    /// Returns true if this is a [`Video`](crate::types::ToolResultContentBlock::Video).
   92     92   
    pub fn is_video(&self) -> bool {
   93     93   
        self.as_video().is_ok()
   94     94   
    }
   95     95   
    /// Returns true if the enum instance is the `Unknown` variant.
   96     96   
    pub fn is_unknown(&self) -> bool {
   97     97   
        matches!(self, Self::Unknown)
   98     98   
    }
   99     99   
}
         100  +
static TOOLRESULTCONTENTBLOCK_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
         101  +
    "com.amazonaws.bedrockruntime#ToolResultContentBlock",
         102  +
    "com.amazonaws.bedrockruntime",
         103  +
    "ToolResultContentBlock",
         104  +
);
         105  +
static TOOLRESULTCONTENTBLOCK_MEMBER_JSON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         106  +
    ::aws_smithy_schema::ShapeId::from_static(
         107  +
        "com.amazonaws.bedrockruntime#ToolResultContentBlock$json",
         108  +
        "com.amazonaws.bedrockruntime",
         109  +
        "ToolResultContentBlock",
         110  +
    ),
         111  +
    ::aws_smithy_schema::ShapeType::Document,
         112  +
    "json",
         113  +
    0,
         114  +
);
         115  +
static TOOLRESULTCONTENTBLOCK_MEMBER_TEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         116  +
    ::aws_smithy_schema::ShapeId::from_static(
         117  +
        "com.amazonaws.bedrockruntime#ToolResultContentBlock$text",
         118  +
        "com.amazonaws.bedrockruntime",
         119  +
        "ToolResultContentBlock",
         120  +
    ),
         121  +
    ::aws_smithy_schema::ShapeType::String,
         122  +
    "text",
         123  +
    1,
         124  +
);
         125  +
static TOOLRESULTCONTENTBLOCK_MEMBER_IMAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         126  +
    ::aws_smithy_schema::ShapeId::from_static(
         127  +
        "com.amazonaws.bedrockruntime#ToolResultContentBlock$image",
         128  +
        "com.amazonaws.bedrockruntime",
         129  +
        "ToolResultContentBlock",
         130  +
    ),
         131  +
    ::aws_smithy_schema::ShapeType::Structure,
         132  +
    "image",
         133  +
    2,
         134  +
);
         135  +
static TOOLRESULTCONTENTBLOCK_MEMBER_DOCUMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         136  +
    ::aws_smithy_schema::ShapeId::from_static(
         137  +
        "com.amazonaws.bedrockruntime#ToolResultContentBlock$document",
         138  +
        "com.amazonaws.bedrockruntime",
         139  +
        "ToolResultContentBlock",
         140  +
    ),
         141  +
    ::aws_smithy_schema::ShapeType::Structure,
         142  +
    "document",
         143  +
    3,
         144  +
);
         145  +
static TOOLRESULTCONTENTBLOCK_MEMBER_VIDEO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
         146  +
    ::aws_smithy_schema::ShapeId::from_static(
         147  +
        "com.amazonaws.bedrockruntime#ToolResultContentBlock$video",
         148  +
        "com.amazonaws.bedrockruntime",
         149  +
        "ToolResultContentBlock",
         150  +
    ),
         151  +
    ::aws_smithy_schema::ShapeType::Structure,
         152  +
    "video",
         153  +
    4,
         154  +
);
         155  +
static TOOLRESULTCONTENTBLOCK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
         156  +
    TOOLRESULTCONTENTBLOCK_SCHEMA_ID,
         157  +
    ::aws_smithy_schema::ShapeType::Union,
         158  +
    &[
         159  +
        &TOOLRESULTCONTENTBLOCK_MEMBER_JSON,
         160  +
        &TOOLRESULTCONTENTBLOCK_MEMBER_TEXT,
         161  +
        &TOOLRESULTCONTENTBLOCK_MEMBER_IMAGE,
         162  +
        &TOOLRESULTCONTENTBLOCK_MEMBER_DOCUMENT,
         163  +
        &TOOLRESULTCONTENTBLOCK_MEMBER_VIDEO,
         164  +
    ],
         165  +
);
         166  +
impl ToolResultContentBlock {
         167  +
    /// The schema for this shape.
         168  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLRESULTCONTENTBLOCK_SCHEMA;
         169  +
}
         170  +
impl ::aws_smithy_schema::serde::SerializableStruct for ToolResultContentBlock {
         171  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         172  +
    fn serialize_members(
         173  +
        &self,
         174  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         175  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         176  +
        match self {
         177  +
            Self::Json(val) => {
         178  +
                ser.write_document(&TOOLRESULTCONTENTBLOCK_MEMBER_JSON, val)?;
         179  +
            }
         180  +
            Self::Text(val) => {
         181  +
                ser.write_string(&TOOLRESULTCONTENTBLOCK_MEMBER_TEXT, val)?;
         182  +
            }
         183  +
            Self::Image(val) => {
         184  +
                ser.write_struct(&TOOLRESULTCONTENTBLOCK_MEMBER_IMAGE, val)?;
         185  +
            }
         186  +
            Self::Document(val) => {
         187  +
                ser.write_struct(&TOOLRESULTCONTENTBLOCK_MEMBER_DOCUMENT, val)?;
         188  +
            }
         189  +
            Self::Video(val) => {
         190  +
                ser.write_struct(&TOOLRESULTCONTENTBLOCK_MEMBER_VIDEO, val)?;
         191  +
            }
         192  +
            Self::Unknown => return Err(::aws_smithy_schema::serde::SerdeError::custom("cannot serialize unknown union variant")),
         193  +
        }
         194  +
        Ok(())
         195  +
    }
         196  +
}
         197  +
impl ToolResultContentBlock {
         198  +
    /// Deserializes this union from a [`ShapeDeserializer`].
         199  +
    pub fn deserialize(
         200  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         201  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         202  +
        let mut result: ::std::option::Option<Self> = ::std::option::Option::None;
         203  +
        #[allow(unused_variables, unreachable_code, clippy::single_match, clippy::match_single_binding)]
         204  +
        deserializer.read_struct(&TOOLRESULTCONTENTBLOCK_SCHEMA, &mut |member, deser| {
         205  +
            result = ::std::option::Option::Some(match member.member_index() {
         206  +
                Some(0) => Self::Json(deser.read_document(member)?),
         207  +
                Some(1) => Self::Text(deser.read_string(member)?),
         208  +
                Some(2) => Self::Image(crate::types::ImageBlock::deserialize(deser)?),
         209  +
                Some(3) => Self::Document(crate::types::DocumentBlock::deserialize(deser)?),
         210  +
                Some(4) => Self::Video(crate::types::VideoBlock::deserialize(deser)?),
         211  +
                _ => Self::Unknown,
         212  +
            });
         213  +
            Ok(())
         214  +
        })?;
         215  +
        result.ok_or_else(|| ::aws_smithy_schema::serde::SerdeError::custom("expected a union variant"))
         216  +
    }
         217  +
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/types/_tool_specification.rs

@@ -31,31 +162,171 @@
   51     51   
    "description",
   52     52   
    1,
   53     53   
);
   54     54   
static TOOLSPECIFICATION_MEMBER_INPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   55     55   
    ::aws_smithy_schema::ShapeId::from_static(
   56     56   
        "com.amazonaws.bedrockruntime#ToolSpecification$inputSchema",
   57     57   
        "com.amazonaws.bedrockruntime",
   58     58   
        "ToolSpecification",
   59     59   
    ),
   60     60   
    ::aws_smithy_schema::ShapeType::Union,
   61         -
    "input_schema",
          61  +
    "inputSchema",
   62     62   
    2,
   63     63   
);
   64     64   
static TOOLSPECIFICATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   65     65   
    TOOLSPECIFICATION_SCHEMA_ID,
   66     66   
    ::aws_smithy_schema::ShapeType::Structure,
   67     67   
    &[
   68     68   
        &TOOLSPECIFICATION_MEMBER_NAME,
   69     69   
        &TOOLSPECIFICATION_MEMBER_DESCRIPTION,
   70     70   
        &TOOLSPECIFICATION_MEMBER_INPUT_SCHEMA,
   71     71   
    ],
   72     72   
);
   73     73   
impl ToolSpecification {
   74     74   
    /// The schema for this shape.
   75     75   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &TOOLSPECIFICATION_SCHEMA;
   76     76   
}
   77     77   
impl ::aws_smithy_schema::serde::SerializableStruct for ToolSpecification {
   78     78   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   79     79   
    fn serialize_members(
   80     80   
        &self,
   81     81   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   82     82   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   83     83   
        {
   84     84   
            let val = &self.name;
   85     85   
            ser.write_string(&TOOLSPECIFICATION_MEMBER_NAME, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.description {
   88     88   
            ser.write_string(&TOOLSPECIFICATION_MEMBER_DESCRIPTION, val)?;
   89     89   
        }
   90     90   
        if let Some(ref val) = self.input_schema {
   91         -
            ser.write_null(&TOOLSPECIFICATION_MEMBER_INPUT_SCHEMA)?;
          91  +
            ser.write_struct(&TOOLSPECIFICATION_MEMBER_INPUT_SCHEMA, val)?;
   92     92   
        }
   93     93   
        Ok(())
   94     94   
    }
   95     95   
}
   96     96   
impl ToolSpecification {
   97     97   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   98         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   99         -
        deserializer: &mut D,
          98  +
    pub fn deserialize(
          99  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  100    100   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  101    101   
        #[allow(unused_variables, unused_mut)]
  102    102   
        let mut builder = Self::builder();
  103    103   
        #[allow(
  104    104   
            unused_variables,
  105    105   
            unreachable_code,
  106    106   
            clippy::single_match,
  107    107   
            clippy::match_single_binding,
  108    108   
            clippy::diverging_sub_expression
  109    109   
        )]
  110         -
        deserializer.read_struct(&TOOLSPECIFICATION_SCHEMA, (), |_, member, deser| {
         110  +
        deserializer.read_struct(&TOOLSPECIFICATION_SCHEMA, &mut |member, deser| {
  111    111   
            match member.member_index() {
  112    112   
                Some(0) => {
  113    113   
                    builder.name = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(1) => {
  116    116   
                    builder.description = Some(deser.read_string(member)?);
  117    117   
                }
  118    118   
                Some(2) => {
  119         -
                    builder.input_schema = Some({
  120         -
                        let _ = member;
  121         -
                        todo!("deserialize aggregate")
  122         -
                    });
         119  +
                    builder.input_schema = Some(crate::types::ToolInputSchema::deserialize(deser)?);
  123    120   
                }
  124    121   
                _ => {}
  125    122   
            }
  126    123   
            Ok(())
  127    124   
        })?;
         125  +
        builder.name = builder.name.or(Some(String::new()));
  128    126   
        builder
  129    127   
            .build()
  130    128   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  131    129   
    }
  132    130   
}
         131  +
impl ToolSpecification {
         132  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         133  +
    pub fn deserialize_with_response(
         134  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         135  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         136  +
        _status: u16,
         137  +
        _body: &[u8],
         138  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         139  +
        Self::deserialize(deserializer)
         140  +
    }
         141  +
}
  133    142   
impl ToolSpecification {
  134    143   
    /// Creates a new builder-style object to manufacture [`ToolSpecification`](crate::types::ToolSpecification).
  135    144   
    pub fn builder() -> crate::types::builders::ToolSpecificationBuilder {
  136    145   
        crate::types::builders::ToolSpecificationBuilder::default()
  137    146   
    }
  138    147   
}
  139    148   
  140    149   
/// A builder for [`ToolSpecification`](crate::types::ToolSpecification).
  141    150   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  142    151   
#[non_exhaustive]