AWS SDK

AWS SDK

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_log_groups_for_query/_list_log_groups_for_query_input.rs

@@ -9,9 +156,168 @@
   29     29   
    "com.amazonaws.cloudwatchlogs.synthetic",
   30     30   
    "ListLogGroupsForQueryInput",
   31     31   
);
   32     32   
static LISTLOGGROUPSFORQUERYINPUT_MEMBER_QUERY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   33     33   
    ::aws_smithy_schema::ShapeId::from_static(
   34     34   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsForQueryInput$queryId",
   35     35   
        "com.amazonaws.cloudwatchlogs.synthetic",
   36     36   
        "ListLogGroupsForQueryInput",
   37     37   
    ),
   38     38   
    ::aws_smithy_schema::ShapeType::String,
   39         -
    "query_id",
          39  +
    "queryId",
   40     40   
    0,
   41     41   
);
   42     42   
static LISTLOGGROUPSFORQUERYINPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   43     43   
    ::aws_smithy_schema::ShapeId::from_static(
   44     44   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsForQueryInput$nextToken",
   45     45   
        "com.amazonaws.cloudwatchlogs.synthetic",
   46     46   
        "ListLogGroupsForQueryInput",
   47     47   
    ),
   48     48   
    ::aws_smithy_schema::ShapeType::String,
   49         -
    "next_token",
          49  +
    "nextToken",
   50     50   
    1,
   51     51   
);
   52     52   
static LISTLOGGROUPSFORQUERYINPUT_MEMBER_MAX_RESULTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   53     53   
    ::aws_smithy_schema::ShapeId::from_static(
   54     54   
        "com.amazonaws.cloudwatchlogs.synthetic#ListLogGroupsForQueryInput$maxResults",
   55     55   
        "com.amazonaws.cloudwatchlogs.synthetic",
   56     56   
        "ListLogGroupsForQueryInput",
   57     57   
    ),
   58     58   
    ::aws_smithy_schema::ShapeType::Integer,
   59         -
    "max_results",
          59  +
    "maxResults",
   60     60   
    2,
   61     61   
);
   62     62   
static LISTLOGGROUPSFORQUERYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   63     63   
    LISTLOGGROUPSFORQUERYINPUT_SCHEMA_ID,
   64     64   
    ::aws_smithy_schema::ShapeType::Structure,
   65     65   
    &[
   66     66   
        &LISTLOGGROUPSFORQUERYINPUT_MEMBER_QUERY_ID,
   67     67   
        &LISTLOGGROUPSFORQUERYINPUT_MEMBER_NEXT_TOKEN,
   68     68   
        &LISTLOGGROUPSFORQUERYINPUT_MEMBER_MAX_RESULTS,
   69     69   
    ],
   70     70   
);
   71     71   
impl ListLogGroupsForQueryInput {
   72     72   
    /// The schema for this shape.
   73     73   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTLOGGROUPSFORQUERYINPUT_SCHEMA;
   74     74   
}
   75     75   
impl ::aws_smithy_schema::serde::SerializableStruct for ListLogGroupsForQueryInput {
   76     76   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   77     77   
    fn serialize_members(
   78     78   
        &self,
   79     79   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   80     80   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   81     81   
        if let Some(ref val) = self.query_id {
   82     82   
            ser.write_string(&LISTLOGGROUPSFORQUERYINPUT_MEMBER_QUERY_ID, val)?;
   83     83   
        }
   84     84   
        if let Some(ref val) = self.next_token {
   85     85   
            ser.write_string(&LISTLOGGROUPSFORQUERYINPUT_MEMBER_NEXT_TOKEN, val)?;
   86     86   
        }
   87     87   
        if let Some(ref val) = self.max_results {
   88     88   
            ser.write_integer(&LISTLOGGROUPSFORQUERYINPUT_MEMBER_MAX_RESULTS, *val)?;
   89     89   
        }
   90     90   
        Ok(())
   91     91   
    }
   92     92   
}
   93     93   
impl ListLogGroupsForQueryInput {
   94     94   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   95         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   96         -
        deserializer: &mut D,
          95  +
    pub fn deserialize(
          96  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   97     97   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   98     98   
        #[allow(unused_variables, unused_mut)]
   99     99   
        let mut builder = Self::builder();
  100    100   
        #[allow(
  101    101   
            unused_variables,
  102    102   
            unreachable_code,
  103    103   
            clippy::single_match,
  104    104   
            clippy::match_single_binding,
  105    105   
            clippy::diverging_sub_expression
  106    106   
        )]
  107         -
        deserializer.read_struct(&LISTLOGGROUPSFORQUERYINPUT_SCHEMA, (), |_, member, deser| {
         107  +
        deserializer.read_struct(&LISTLOGGROUPSFORQUERYINPUT_SCHEMA, &mut |member, deser| {
  108    108   
            match member.member_index() {
  109    109   
                Some(0) => {
  110    110   
                    builder.query_id = Some(deser.read_string(member)?);
  111    111   
                }
  112    112   
                Some(1) => {
  113    113   
                    builder.next_token = Some(deser.read_string(member)?);
  114    114   
                }
  115    115   
                Some(2) => {
  116    116   
                    builder.max_results = Some(deser.read_integer(member)?);
  117    117   
                }
  118    118   
                _ => {}
  119    119   
            }
  120    120   
            Ok(())
  121    121   
        })?;
         122  +
        builder.query_id = builder.query_id.or(Some(String::new()));
  122    123   
        builder
  123    124   
            .build()
  124    125   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  125    126   
    }
  126    127   
}
         128  +
impl ListLogGroupsForQueryInput {
         129  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         130  +
    pub fn deserialize_with_response(
         131  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         132  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         133  +
        _status: u16,
         134  +
        _body: &[u8],
         135  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         136  +
        Self::deserialize(deserializer)
         137  +
    }
         138  +
}
  127    139   
impl ListLogGroupsForQueryInput {
  128    140   
    /// Creates a new builder-style object to manufacture [`ListLogGroupsForQueryInput`](crate::operation::list_log_groups_for_query::ListLogGroupsForQueryInput).
  129    141   
    pub fn builder() -> crate::operation::list_log_groups_for_query::builders::ListLogGroupsForQueryInputBuilder {
  130    142   
        crate::operation::list_log_groups_for_query::builders::ListLogGroupsForQueryInputBuilder::default()
  131    143   
    }
  132    144   
}
  133    145   
  134    146   
/// A builder for [`ListLogGroupsForQueryInput`](crate::operation::list_log_groups_for_query::ListLogGroupsForQueryInput).
  135    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  136    148   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_log_groups_for_query/_list_log_groups_for_query_output.rs

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

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListTagsForResource`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTagsForResource;
    6      6   
impl ListTagsForResource {
    7      7   
    /// Creates a new `ListTagsForResource`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_for_resource::ListTagsForResourceInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_for_resource::ListTagsForResourceOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_tags_for_resource::ListTagsForResourceInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tags_for_resource::ListTagsForResourceError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -127,131 +253,340 @@
  147    151   
        ::std::borrow::Cow::Owned(rcb)
  148    152   
    }
  149    153   
}
  150    154   
  151    155   
#[derive(Debug)]
  152    156   
struct ListTagsForResourceResponseDeserializer;
  153    157   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsForResourceResponseDeserializer {
  154    158   
    fn deserialize_nonstreaming(
  155    159   
        &self,
  156    160   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         161  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    162   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    163   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    164   
        #[allow(unused_mut)]
  162    165   
        let mut force_error = false;
  163    166   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource_http_error(status, headers, body)
         167  +
        if !success && status != 200 || force_error {
         168  +
            let headers = response.headers();
         169  +
            let body = response.body().bytes().expect("body loaded");
         170  +
            #[allow(unused_mut)]
         171  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         172  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         173  +
            })?;
         174  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         175  +
            let generic = generic_builder.build();
         176  +
            let error_code = match generic.code() {
         177  +
                ::std::option::Option::Some(code) => code,
         178  +
                ::std::option::Option::None => {
         179  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         180  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         181  +
                            crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled(generic),
         182  +
                        ),
         183  +
                    ))
         184  +
                }
         185  +
            };
         186  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         187  +
            let protocol = _cfg
         188  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         189  +
                .expect("a SharedClientProtocol is required");
         190  +
            let err = match error_code {
         191  +
                "InvalidParameterException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidParameterException({
         192  +
                    let mut tmp = match protocol
         193  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         194  +
                        .and_then(|mut deser| {
         195  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         196  +
                                &mut *deser,
         197  +
                                response.headers(),
         198  +
                                response.status().into(),
         199  +
                                body,
         200  +
                            )
         201  +
                        }) {
         202  +
                        ::std::result::Result::Ok(val) => val,
         203  +
                        ::std::result::Result::Err(e) => {
         204  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         205  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         206  +
                            ))
         207  +
                        }
         208  +
                    };
         209  +
                    tmp.meta = generic;
         210  +
                    if tmp.message.is_none() {
         211  +
                        tmp.message = _error_message;
         212  +
                    }
         213  +
                    tmp
         214  +
                }),
         215  +
                "ResourceNotFoundException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException({
         216  +
                    let mut tmp = match protocol
         217  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         218  +
                        .and_then(|mut deser| {
         219  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         220  +
                                &mut *deser,
         221  +
                                response.headers(),
         222  +
                                response.status().into(),
         223  +
                                body,
         224  +
                            )
         225  +
                        }) {
         226  +
                        ::std::result::Result::Ok(val) => val,
         227  +
                        ::std::result::Result::Err(e) => {
         228  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         229  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         230  +
                            ))
         231  +
                        }
         232  +
                    };
         233  +
                    tmp.meta = generic;
         234  +
                    if tmp.message.is_none() {
         235  +
                        tmp.message = _error_message;
         236  +
                    }
         237  +
                    tmp
         238  +
                }),
         239  +
                "ServiceUnavailableException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException({
         240  +
                    let mut tmp = match protocol
         241  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         242  +
                        .and_then(|mut deser| {
         243  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         244  +
                                &mut *deser,
         245  +
                                response.headers(),
         246  +
                                response.status().into(),
         247  +
                                body,
         248  +
                            )
         249  +
                        }) {
         250  +
                        ::std::result::Result::Ok(val) => val,
         251  +
                        ::std::result::Result::Err(e) => {
         252  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         253  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         254  +
                            ))
         255  +
                        }
         256  +
                    };
         257  +
                    tmp.meta = generic;
         258  +
                    if tmp.message.is_none() {
         259  +
                        tmp.message = _error_message;
         260  +
                    }
         261  +
                    tmp
         262  +
                }),
         263  +
                _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic),
         264  +
            };
         265  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         266  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         267  +
            ))
  166    268   
        } else {
  167         -
            crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         269  +
            let protocol = _cfg
         270  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         271  +
                .expect("a SharedClientProtocol is required");
         272  +
            let mut deser = protocol
         273  +
                .deserialize_response(response, ListTagsForResource::OUTPUT_SCHEMA, _cfg)
         274  +
                .map_err(|e| {
         275  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         276  +
                })?;
         277  +
            let body = response.body().bytes().expect("body loaded");
         278  +
            let output = crate::operation::list_tags_for_resource::ListTagsForResourceOutput::deserialize_with_response(
         279  +
                &mut *deser,
         280  +
                response.headers(),
         281  +
                response.status().into(),
         282  +
                body,
         283  +
            )
         284  +
            .map_err(|e| {
         285  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         286  +
            })?;
         287  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         288  +
        }
  170    289   
    }
  171    290   
}
  172    291   
#[derive(Debug)]
  173    292   
struct ListTagsForResourceRequestSerializer;
  174    293   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsForResourceRequestSerializer {
  175    294   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    295   
    fn serialize_input(
  177    296   
        &self,
  178    297   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    298   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    299   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    300   
        let input = input
  182    301   
            .downcast::<crate::operation::list_tags_for_resource::ListTagsForResourceInput>()
  183    302   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::list_tags_for_resource::ListTagsForResourceInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Logs_20140328.ListTagsForResource",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tags_for_resource::ser_list_tags_for_resource_input(
  217         -
            &input,
  218         -
        )?);
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         303  +
        let protocol = _cfg
         304  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         305  +
            .expect("a SharedClientProtocol is required");
         306  +
        let mut request = protocol
         307  +
            .serialize_request(&input, ListTagsForResource::INPUT_SCHEMA, "", _cfg)
         308  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         309  +
         310  +
        return ::std::result::Result::Ok(request);
  224    311   
    }
  225    312   
}
  226    313   
#[derive(Debug)]
  227    314   
struct ListTagsForResourceEndpointParamsInterceptor;
  228    315   
  229    316   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsForResourceEndpointParamsInterceptor {
  230    317   
    fn name(&self) -> &'static str {
  231    318   
        "ListTagsForResourceEndpointParamsInterceptor"
  232    319   
    }
  233    320   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_tags_for_resource/_list_tags_for_resource_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_tags_for_resource/_list_tags_for_resource_output.rs

@@ -1,1 +118,152 @@
   21     21   
static LISTTAGSFORRESOURCEOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.cloudwatchlogs.synthetic#ListTagsForResourceOutput$tags",
   24     24   
        "com.amazonaws.cloudwatchlogs.synthetic",
   25     25   
        "ListTagsForResourceOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Map,
   28     28   
    "tags",
   29     29   
    0,
   30     30   
);
          31  +
static LISTTAGSFORRESOURCEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static LISTTAGSFORRESOURCEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    LISTTAGSFORRESOURCEOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&LISTTAGSFORRESOURCEOUTPUT_MEMBER_TAGS],
          41  +
    &[&LISTTAGSFORRESOURCEOUTPUT_MEMBER_TAGS, &LISTTAGSFORRESOURCEOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl ListTagsForResourceOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSFORRESOURCEOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsForResourceOutput {
   41     48   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     49   
    fn serialize_members(
   43     50   
        &self,
   44     51   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     52   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     53   
        if let Some(ref val) = self.tags {
   47     54   
            ser.write_map(
   48     55   
                &LISTTAGSFORRESOURCEOUTPUT_MEMBER_TAGS,
   49     56   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   50     57   
                    for (key, value) in val {
   51     58   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   52     59   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   53     60   
                    }
   54     61   
                    Ok(())
   55     62   
                },
   56     63   
            )?;
   57     64   
        }
   58     65   
        Ok(())
   59     66   
    }
   60     67   
}
   61     68   
impl ListTagsForResourceOutput {
   62     69   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   63         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   64         -
        deserializer: &mut D,
          70  +
    pub fn deserialize(
          71  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   65     72   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   66     73   
        #[allow(unused_variables, unused_mut)]
   67     74   
        let mut builder = Self::builder();
   68     75   
        #[allow(
   69     76   
            unused_variables,
   70     77   
            unreachable_code,
   71     78   
            clippy::single_match,
   72     79   
            clippy::match_single_binding,
   73     80   
            clippy::diverging_sub_expression
   74     81   
        )]
   75         -
        deserializer.read_struct(&LISTTAGSFORRESOURCEOUTPUT_SCHEMA, (), |_, member, deser| {
          82  +
        deserializer.read_struct(&LISTTAGSFORRESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
   76     83   
            match member.member_index() {
   77     84   
                Some(0) => {
   78         -
                    builder.tags = Some({
   79         -
                        let container = if let Some(cap) = deser.container_size() {
   80         -
                            std::collections::HashMap::with_capacity(cap)
   81         -
                        } else {
   82         -
                            std::collections::HashMap::new()
   83         -
                        };
   84         -
                        deser.read_map(member, container, |mut map, key, deser| {
   85         -
                            map.insert(key, deser.read_string(member)?);
   86         -
                            Ok(map)
   87         -
                        })?
   88         -
                    });
          85  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
          86  +
                }
          87  +
                Some(1) => {
          88  +
                    builder._request_id = Some(deser.read_string(member)?);
          89  +
                }
          90  +
                _ => {}
          91  +
            }
          92  +
            Ok(())
          93  +
        })?;
          94  +
        Ok(builder.build())
          95  +
    }
          96  +
}
          97  +
impl ListTagsForResourceOutput {
          98  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          99  +
    /// Header-bound members are read directly from headers, avoiding runtime
         100  +
    /// member iteration overhead. Body members are read via the deserializer.
         101  +
    pub fn deserialize_with_response(
         102  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         103  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         104  +
        _status: u16,
         105  +
        _body: &[u8],
         106  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         107  +
        #[allow(unused_variables, unused_mut)]
         108  +
        let mut builder = Self::builder();
         109  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         110  +
            builder._request_id = Some(val.to_string());
         111  +
        }
         112  +
        #[allow(
         113  +
            unused_variables,
         114  +
            unreachable_code,
         115  +
            clippy::single_match,
         116  +
            clippy::match_single_binding,
         117  +
            clippy::diverging_sub_expression
         118  +
        )]
         119  +
        deserializer.read_struct(&LISTTAGSFORRESOURCEOUTPUT_SCHEMA, &mut |member, deser| {
         120  +
            match member.member_index() {
         121  +
                Some(0) => {
         122  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
   89    123   
                }
   90    124   
                _ => {}
   91    125   
            }
   92    126   
            Ok(())
   93    127   
        })?;
   94    128   
        Ok(builder.build())
   95    129   
    }
   96    130   
}
   97    131   
impl ::aws_types::request_id::RequestId for ListTagsForResourceOutput {
   98    132   
    fn request_id(&self) -> Option<&str> {

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `ListTagsLogGroup`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct ListTagsLogGroup;
    6      6   
impl ListTagsLogGroup {
    7      7   
    /// Creates a new `ListTagsLogGroup`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_log_group::ListTagsLogGroupInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::list_tags_log_group::ListTagsLogGroupOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::list_tags_log_group::ListTagsLogGroupInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::list_tags_log_group::ListTagsLogGroupOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::list_tags_log_group::ListTagsLogGroupError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,310 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct ListTagsLogGroupResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListTagsLogGroupResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_list_tags_log_group::de_list_tags_log_group_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::list_tags_log_group::ListTagsLogGroupError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "ResourceNotFoundException" => crate::operation::list_tags_log_group::ListTagsLogGroupError::ResourceNotFoundException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::ResourceNotFoundException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "ServiceUnavailableException" => crate::operation::list_tags_log_group::ListTagsLogGroupError::ServiceUnavailableException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                _ => crate::operation::list_tags_log_group::ListTagsLogGroupError::generic(generic),
         234  +
            };
         235  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         236  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         237  +
            ))
  160    238   
        } else {
  161         -
            crate::protocol_serde::shape_list_tags_log_group::de_list_tags_log_group_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         239  +
            let protocol = _cfg
         240  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         241  +
                .expect("a SharedClientProtocol is required");
         242  +
            let mut deser = protocol
         243  +
                .deserialize_response(response, ListTagsLogGroup::OUTPUT_SCHEMA, _cfg)
         244  +
                .map_err(|e| {
         245  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         246  +
                })?;
         247  +
            let body = response.body().bytes().expect("body loaded");
         248  +
            let output = crate::operation::list_tags_log_group::ListTagsLogGroupOutput::deserialize_with_response(
         249  +
                &mut *deser,
         250  +
                response.headers(),
         251  +
                response.status().into(),
         252  +
                body,
         253  +
            )
         254  +
            .map_err(|e| {
         255  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         256  +
            })?;
         257  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         258  +
        }
  164    259   
    }
  165    260   
}
  166    261   
#[derive(Debug)]
  167    262   
struct ListTagsLogGroupRequestSerializer;
  168    263   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListTagsLogGroupRequestSerializer {
  169    264   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    265   
    fn serialize_input(
  171    266   
        &self,
  172    267   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    268   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    269   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    270   
        let input = input
  176    271   
            .downcast::<crate::operation::list_tags_log_group::ListTagsLogGroupInput>()
  177    272   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::list_tags_log_group::ListTagsLogGroupInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::list_tags_log_group::ListTagsLogGroupInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Logs_20140328.ListTagsLogGroup",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_list_tags_log_group::ser_list_tags_log_group_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         273  +
        let protocol = _cfg
         274  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         275  +
            .expect("a SharedClientProtocol is required");
         276  +
        let mut request = protocol
         277  +
            .serialize_request(&input, ListTagsLogGroup::INPUT_SCHEMA, "", _cfg)
         278  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         279  +
         280  +
        return ::std::result::Result::Ok(request);
  216    281   
    }
  217    282   
}
  218    283   
#[derive(Debug)]
  219    284   
struct ListTagsLogGroupEndpointParamsInterceptor;
  220    285   
  221    286   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListTagsLogGroupEndpointParamsInterceptor {
  222    287   
    fn name(&self) -> &'static str {
  223    288   
        "ListTagsLogGroupEndpointParamsInterceptor"
  224    289   
    }
  225    290   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_tags_log_group/_list_tags_log_group_input.rs

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/list_tags_log_group/_list_tags_log_group_output.rs

@@ -2,2 +119,153 @@
   22     22   
static LISTTAGSLOGGROUPOUTPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   23     23   
    ::aws_smithy_schema::ShapeId::from_static(
   24     24   
        "com.amazonaws.cloudwatchlogs.synthetic#ListTagsLogGroupOutput$tags",
   25     25   
        "com.amazonaws.cloudwatchlogs.synthetic",
   26     26   
        "ListTagsLogGroupOutput",
   27     27   
    ),
   28     28   
    ::aws_smithy_schema::ShapeType::Map,
   29     29   
    "tags",
   30     30   
    0,
   31     31   
);
          32  +
static LISTTAGSLOGGROUPOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          34  +
    ::aws_smithy_schema::ShapeType::String,
          35  +
    "request_id",
          36  +
    1,
          37  +
)
          38  +
.with_http_header("x-amzn-requestid");
   32     39   
static LISTTAGSLOGGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   33     40   
    LISTTAGSLOGGROUPOUTPUT_SCHEMA_ID,
   34     41   
    ::aws_smithy_schema::ShapeType::Structure,
   35         -
    &[&LISTTAGSLOGGROUPOUTPUT_MEMBER_TAGS],
          42  +
    &[&LISTTAGSLOGGROUPOUTPUT_MEMBER_TAGS, &LISTTAGSLOGGROUPOUTPUT_MEMBER__REQUEST_ID],
   36     43   
);
   37     44   
impl ListTagsLogGroupOutput {
   38     45   
    /// The schema for this shape.
   39     46   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LISTTAGSLOGGROUPOUTPUT_SCHEMA;
   40     47   
}
   41     48   
impl ::aws_smithy_schema::serde::SerializableStruct for ListTagsLogGroupOutput {
   42     49   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   43     50   
    fn serialize_members(
   44     51   
        &self,
   45     52   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   46     53   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   47     54   
        if let Some(ref val) = self.tags {
   48     55   
            ser.write_map(
   49     56   
                &LISTTAGSLOGGROUPOUTPUT_MEMBER_TAGS,
   50     57   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
   51     58   
                    for (key, value) in val {
   52     59   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
   53     60   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
   54     61   
                    }
   55     62   
                    Ok(())
   56     63   
                },
   57     64   
            )?;
   58     65   
        }
   59     66   
        Ok(())
   60     67   
    }
   61     68   
}
   62     69   
impl ListTagsLogGroupOutput {
   63     70   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   64         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   65         -
        deserializer: &mut D,
          71  +
    pub fn deserialize(
          72  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   66     73   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   67     74   
        #[allow(unused_variables, unused_mut)]
   68     75   
        let mut builder = Self::builder();
   69     76   
        #[allow(
   70     77   
            unused_variables,
   71     78   
            unreachable_code,
   72     79   
            clippy::single_match,
   73     80   
            clippy::match_single_binding,
   74     81   
            clippy::diverging_sub_expression
   75     82   
        )]
   76         -
        deserializer.read_struct(&LISTTAGSLOGGROUPOUTPUT_SCHEMA, (), |_, member, deser| {
          83  +
        deserializer.read_struct(&LISTTAGSLOGGROUPOUTPUT_SCHEMA, &mut |member, deser| {
   77     84   
            match member.member_index() {
   78     85   
                Some(0) => {
   79         -
                    builder.tags = Some({
   80         -
                        let container = if let Some(cap) = deser.container_size() {
   81         -
                            std::collections::HashMap::with_capacity(cap)
   82         -
                        } else {
   83         -
                            std::collections::HashMap::new()
   84         -
                        };
   85         -
                        deser.read_map(member, container, |mut map, key, deser| {
   86         -
                            map.insert(key, deser.read_string(member)?);
   87         -
                            Ok(map)
   88         -
                        })?
   89         -
                    });
          86  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
          87  +
                }
          88  +
                Some(1) => {
          89  +
                    builder._request_id = Some(deser.read_string(member)?);
          90  +
                }
          91  +
                _ => {}
          92  +
            }
          93  +
            Ok(())
          94  +
        })?;
          95  +
        Ok(builder.build())
          96  +
    }
          97  +
}
          98  +
impl ListTagsLogGroupOutput {
          99  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         100  +
    /// Header-bound members are read directly from headers, avoiding runtime
         101  +
    /// member iteration overhead. Body members are read via the deserializer.
         102  +
    pub fn deserialize_with_response(
         103  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         104  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         105  +
        _status: u16,
         106  +
        _body: &[u8],
         107  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         108  +
        #[allow(unused_variables, unused_mut)]
         109  +
        let mut builder = Self::builder();
         110  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         111  +
            builder._request_id = Some(val.to_string());
         112  +
        }
         113  +
        #[allow(
         114  +
            unused_variables,
         115  +
            unreachable_code,
         116  +
            clippy::single_match,
         117  +
            clippy::match_single_binding,
         118  +
            clippy::diverging_sub_expression
         119  +
        )]
         120  +
        deserializer.read_struct(&LISTTAGSLOGGROUPOUTPUT_SCHEMA, &mut |member, deser| {
         121  +
            match member.member_index() {
         122  +
                Some(0) => {
         123  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
   90    124   
                }
   91    125   
                _ => {}
   92    126   
            }
   93    127   
            Ok(())
   94    128   
        })?;
   95    129   
        Ok(builder.build())
   96    130   
    }
   97    131   
}
   98    132   
impl ::aws_types::request_id::RequestId for ListTagsLogGroupOutput {
   99    133   
    fn request_id(&self) -> Option<&str> {

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

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutAccountPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutAccountPolicy;
    6      6   
impl PutAccountPolicy {
    7      7   
    /// Creates a new `PutAccountPolicy`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_account_policy::PutAccountPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_account_policy::PutAccountPolicyOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::put_account_policy::PutAccountPolicyInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::put_account_policy::PutAccountPolicyOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::put_account_policy::PutAccountPolicyError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -121,125 +245,358 @@
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct PutAccountPolicyResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutAccountPolicyResponseDeserializer {
  148    152   
    fn deserialize_nonstreaming(
  149    153   
        &self,
  150    154   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         155  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  151    156   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  152    157   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  153         -
        let headers = response.headers();
  154         -
        let body = response.body().bytes().expect("body loaded");
  155    158   
        #[allow(unused_mut)]
  156    159   
        let mut force_error = false;
  157    160   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  158         -
        let parse_result = if !success && status != 200 || force_error {
  159         -
            crate::protocol_serde::shape_put_account_policy::de_put_account_policy_http_error(status, headers, body)
         161  +
        if !success && status != 200 || force_error {
         162  +
            let headers = response.headers();
         163  +
            let body = response.body().bytes().expect("body loaded");
         164  +
            #[allow(unused_mut)]
         165  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         166  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         167  +
            })?;
         168  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         169  +
            let generic = generic_builder.build();
         170  +
            let error_code = match generic.code() {
         171  +
                ::std::option::Option::Some(code) => code,
         172  +
                ::std::option::Option::None => {
         173  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         174  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::put_account_policy::PutAccountPolicyError::unhandled(
         175  +
                            generic,
         176  +
                        )),
         177  +
                    ))
         178  +
                }
         179  +
            };
         180  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let err = match error_code {
         185  +
                "InvalidParameterException" => crate::operation::put_account_policy::PutAccountPolicyError::InvalidParameterException({
         186  +
                    let mut tmp = match protocol
         187  +
                        .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         188  +
                        .and_then(|mut deser| {
         189  +
                            crate::types::error::InvalidParameterException::deserialize_with_response(
         190  +
                                &mut *deser,
         191  +
                                response.headers(),
         192  +
                                response.status().into(),
         193  +
                                body,
         194  +
                            )
         195  +
                        }) {
         196  +
                        ::std::result::Result::Ok(val) => val,
         197  +
                        ::std::result::Result::Err(e) => {
         198  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         199  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         200  +
                            ))
         201  +
                        }
         202  +
                    };
         203  +
                    tmp.meta = generic;
         204  +
                    if tmp.message.is_none() {
         205  +
                        tmp.message = _error_message;
         206  +
                    }
         207  +
                    tmp
         208  +
                }),
         209  +
                "LimitExceededException" => crate::operation::put_account_policy::PutAccountPolicyError::LimitExceededException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         214  +
                                &mut *deser,
         215  +
                                response.headers(),
         216  +
                                response.status().into(),
         217  +
                                body,
         218  +
                            )
         219  +
                        }) {
         220  +
                        ::std::result::Result::Ok(val) => val,
         221  +
                        ::std::result::Result::Err(e) => {
         222  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         223  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         224  +
                            ))
         225  +
                        }
         226  +
                    };
         227  +
                    tmp.meta = generic;
         228  +
                    if tmp.message.is_none() {
         229  +
                        tmp.message = _error_message;
         230  +
                    }
         231  +
                    tmp
         232  +
                }),
         233  +
                "OperationAbortedException" => crate::operation::put_account_policy::PutAccountPolicyError::OperationAbortedException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::OperationAbortedException::deserialize_with_response(
         238  +
                                &mut *deser,
         239  +
                                response.headers(),
         240  +
                                response.status().into(),
         241  +
                                body,
         242  +
                            )
         243  +
                        }) {
         244  +
                        ::std::result::Result::Ok(val) => val,
         245  +
                        ::std::result::Result::Err(e) => {
         246  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         247  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         248  +
                            ))
         249  +
                        }
         250  +
                    };
         251  +
                    tmp.meta = generic;
         252  +
                    if tmp.message.is_none() {
         253  +
                        tmp.message = _error_message;
         254  +
                    }
         255  +
                    tmp
         256  +
                }),
         257  +
                "ServiceUnavailableException" => crate::operation::put_account_policy::PutAccountPolicyError::ServiceUnavailableException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         262  +
                                &mut *deser,
         263  +
                                response.headers(),
         264  +
                                response.status().into(),
         265  +
                                body,
         266  +
                            )
         267  +
                        }) {
         268  +
                        ::std::result::Result::Ok(val) => val,
         269  +
                        ::std::result::Result::Err(e) => {
         270  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         271  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         272  +
                            ))
         273  +
                        }
         274  +
                    };
         275  +
                    tmp.meta = generic;
         276  +
                    if tmp.message.is_none() {
         277  +
                        tmp.message = _error_message;
         278  +
                    }
         279  +
                    tmp
         280  +
                }),
         281  +
                _ => crate::operation::put_account_policy::PutAccountPolicyError::generic(generic),
         282  +
            };
         283  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         284  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         285  +
            ))
  160    286   
        } else {
  161         -
            crate::protocol_serde::shape_put_account_policy::de_put_account_policy_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         287  +
            let protocol = _cfg
         288  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         289  +
                .expect("a SharedClientProtocol is required");
         290  +
            let mut deser = protocol
         291  +
                .deserialize_response(response, PutAccountPolicy::OUTPUT_SCHEMA, _cfg)
         292  +
                .map_err(|e| {
         293  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         294  +
                })?;
         295  +
            let body = response.body().bytes().expect("body loaded");
         296  +
            let output = crate::operation::put_account_policy::PutAccountPolicyOutput::deserialize_with_response(
         297  +
                &mut *deser,
         298  +
                response.headers(),
         299  +
                response.status().into(),
         300  +
                body,
         301  +
            )
         302  +
            .map_err(|e| {
         303  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         304  +
            })?;
         305  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         306  +
        }
  164    307   
    }
  165    308   
}
  166    309   
#[derive(Debug)]
  167    310   
struct PutAccountPolicyRequestSerializer;
  168    311   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutAccountPolicyRequestSerializer {
  169    312   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    313   
    fn serialize_input(
  171    314   
        &self,
  172    315   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    316   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    317   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    318   
        let input = input
  176    319   
            .downcast::<crate::operation::put_account_policy::PutAccountPolicyInput>()
  177    320   
            .expect("correct type");
  178         -
        let _header_serialization_settings = _cfg
  179         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  180         -
            .cloned()
  181         -
            .unwrap_or_default();
  182         -
        let mut request_builder = {
  183         -
            #[allow(clippy::uninlined_format_args)]
  184         -
            fn uri_base(
  185         -
                _input: &crate::operation::put_account_policy::PutAccountPolicyInput,
  186         -
                output: &mut ::std::string::String,
  187         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  188         -
                use ::std::fmt::Write as _;
  189         -
                ::std::write!(output, "/").expect("formatting should succeed");
  190         -
                ::std::result::Result::Ok(())
  191         -
            }
  192         -
            #[allow(clippy::unnecessary_wraps)]
  193         -
            fn update_http_builder(
  194         -
                input: &crate::operation::put_account_policy::PutAccountPolicyInput,
  195         -
                builder: ::http_1x::request::Builder,
  196         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  197         -
                let mut uri = ::std::string::String::new();
  198         -
                uri_base(input, &mut uri)?;
  199         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  200         -
            }
  201         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  202         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  203         -
            builder = _header_serialization_settings.set_default_header(
  204         -
                builder,
  205         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  206         -
                "Logs_20140328.PutAccountPolicy",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_put_account_policy::ser_put_account_policy_input(&input)?);
  211         -
        if let Some(content_length) = body.content_length() {
  212         -
            let content_length = content_length.to_string();
  213         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  214         -
        }
  215         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         321  +
        let protocol = _cfg
         322  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         323  +
            .expect("a SharedClientProtocol is required");
         324  +
        let mut request = protocol
         325  +
            .serialize_request(&input, PutAccountPolicy::INPUT_SCHEMA, "", _cfg)
         326  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         327  +
         328  +
        return ::std::result::Result::Ok(request);
  216    329   
    }
  217    330   
}
  218    331   
#[derive(Debug)]
  219    332   
struct PutAccountPolicyEndpointParamsInterceptor;
  220    333   
  221    334   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutAccountPolicyEndpointParamsInterceptor {
  222    335   
    fn name(&self) -> &'static str {
  223    336   
        "PutAccountPolicyEndpointParamsInterceptor"
  224    337   
    }
  225    338   

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_account_policy/_put_account_policy_input.rs

@@ -127,127 +308,321 @@
  147    147   
    "com.amazonaws.cloudwatchlogs.synthetic",
  148    148   
    "PutAccountPolicyInput",
  149    149   
);
  150    150   
static PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyInput$policyName",
  153    153   
        "com.amazonaws.cloudwatchlogs.synthetic",
  154    154   
        "PutAccountPolicyInput",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::String,
  157         -
    "policy_name",
         157  +
    "policyName",
  158    158   
    0,
  159    159   
);
  160    160   
static PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_DOCUMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  161    161   
    ::aws_smithy_schema::ShapeId::from_static(
  162    162   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyInput$policyDocument",
  163    163   
        "com.amazonaws.cloudwatchlogs.synthetic",
  164    164   
        "PutAccountPolicyInput",
  165    165   
    ),
  166    166   
    ::aws_smithy_schema::ShapeType::String,
  167         -
    "policy_document",
         167  +
    "policyDocument",
  168    168   
    1,
  169    169   
);
  170    170   
static PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  171    171   
    ::aws_smithy_schema::ShapeId::from_static(
  172    172   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyInput$policyType",
  173    173   
        "com.amazonaws.cloudwatchlogs.synthetic",
  174    174   
        "PutAccountPolicyInput",
  175    175   
    ),
  176    176   
    ::aws_smithy_schema::ShapeType::String,
  177         -
    "policy_type",
         177  +
    "policyType",
  178    178   
    2,
  179    179   
);
  180    180   
static PUTACCOUNTPOLICYINPUT_MEMBER_SCOPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  181    181   
    ::aws_smithy_schema::ShapeId::from_static(
  182    182   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyInput$scope",
  183    183   
        "com.amazonaws.cloudwatchlogs.synthetic",
  184    184   
        "PutAccountPolicyInput",
  185    185   
    ),
  186    186   
    ::aws_smithy_schema::ShapeType::String,
  187    187   
    "scope",
  188    188   
    3,
  189    189   
);
  190    190   
static PUTACCOUNTPOLICYINPUT_MEMBER_SELECTION_CRITERIA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  191    191   
    ::aws_smithy_schema::ShapeId::from_static(
  192    192   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyInput$selectionCriteria",
  193    193   
        "com.amazonaws.cloudwatchlogs.synthetic",
  194    194   
        "PutAccountPolicyInput",
  195    195   
    ),
  196    196   
    ::aws_smithy_schema::ShapeType::String,
  197         -
    "selection_criteria",
         197  +
    "selectionCriteria",
  198    198   
    4,
  199    199   
);
  200    200   
static PUTACCOUNTPOLICYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  201    201   
    PUTACCOUNTPOLICYINPUT_SCHEMA_ID,
  202    202   
    ::aws_smithy_schema::ShapeType::Structure,
  203    203   
    &[
  204    204   
        &PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_NAME,
  205    205   
        &PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_DOCUMENT,
  206    206   
        &PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_TYPE,
  207    207   
        &PUTACCOUNTPOLICYINPUT_MEMBER_SCOPE,
  208    208   
        &PUTACCOUNTPOLICYINPUT_MEMBER_SELECTION_CRITERIA,
  209    209   
    ],
  210    210   
);
  211    211   
impl PutAccountPolicyInput {
  212    212   
    /// The schema for this shape.
  213    213   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTACCOUNTPOLICYINPUT_SCHEMA;
  214    214   
}
  215    215   
impl ::aws_smithy_schema::serde::SerializableStruct for PutAccountPolicyInput {
  216    216   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  217    217   
    fn serialize_members(
  218    218   
        &self,
  219    219   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  220    220   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  221    221   
        if let Some(ref val) = self.policy_name {
  222    222   
            ser.write_string(&PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_NAME, val)?;
  223    223   
        }
  224    224   
        if let Some(ref val) = self.policy_document {
  225    225   
            ser.write_string(&PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_DOCUMENT, val)?;
  226    226   
        }
  227    227   
        if let Some(ref val) = self.policy_type {
  228    228   
            ser.write_string(&PUTACCOUNTPOLICYINPUT_MEMBER_POLICY_TYPE, val.as_str())?;
  229    229   
        }
  230    230   
        if let Some(ref val) = self.scope {
  231    231   
            ser.write_string(&PUTACCOUNTPOLICYINPUT_MEMBER_SCOPE, val.as_str())?;
  232    232   
        }
  233    233   
        if let Some(ref val) = self.selection_criteria {
  234    234   
            ser.write_string(&PUTACCOUNTPOLICYINPUT_MEMBER_SELECTION_CRITERIA, val)?;
  235    235   
        }
  236    236   
        Ok(())
  237    237   
    }
  238    238   
}
  239    239   
impl PutAccountPolicyInput {
  240    240   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  241         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  242         -
        deserializer: &mut D,
         241  +
    pub fn deserialize(
         242  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  243    243   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  244    244   
        #[allow(unused_variables, unused_mut)]
  245    245   
        let mut builder = Self::builder();
  246    246   
        #[allow(
  247    247   
            unused_variables,
  248    248   
            unreachable_code,
  249    249   
            clippy::single_match,
  250    250   
            clippy::match_single_binding,
  251    251   
            clippy::diverging_sub_expression
  252    252   
        )]
  253         -
        deserializer.read_struct(&PUTACCOUNTPOLICYINPUT_SCHEMA, (), |_, member, deser| {
         253  +
        deserializer.read_struct(&PUTACCOUNTPOLICYINPUT_SCHEMA, &mut |member, deser| {
  254    254   
            match member.member_index() {
  255    255   
                Some(0) => {
  256    256   
                    builder.policy_name = Some(deser.read_string(member)?);
  257    257   
                }
  258    258   
                Some(1) => {
  259    259   
                    builder.policy_document = Some(deser.read_string(member)?);
  260    260   
                }
  261    261   
                Some(2) => {
  262    262   
                    builder.policy_type = Some(crate::types::PolicyType::from(deser.read_string(member)?.as_str()));
  263    263   
                }
  264    264   
                Some(3) => {
  265    265   
                    builder.scope = Some(crate::types::Scope::from(deser.read_string(member)?.as_str()));
  266    266   
                }
  267    267   
                Some(4) => {
  268    268   
                    builder.selection_criteria = Some(deser.read_string(member)?);
  269    269   
                }
  270    270   
                _ => {}
  271    271   
            }
  272    272   
            Ok(())
  273    273   
        })?;
         274  +
        builder.policy_name = builder.policy_name.or(Some(String::new()));
         275  +
        builder.policy_document = builder.policy_document.or(Some(String::new()));
  274    276   
        builder
  275    277   
            .build()
  276    278   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  277    279   
    }
  278    280   
}
         281  +
impl PutAccountPolicyInput {
         282  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         283  +
    pub fn deserialize_with_response(
         284  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         285  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         286  +
        _status: u16,
         287  +
        _body: &[u8],
         288  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         289  +
        Self::deserialize(deserializer)
         290  +
    }
         291  +
}
  279    292   
impl PutAccountPolicyInput {
  280    293   
    /// Creates a new builder-style object to manufacture [`PutAccountPolicyInput`](crate::operation::put_account_policy::PutAccountPolicyInput).
  281    294   
    pub fn builder() -> crate::operation::put_account_policy::builders::PutAccountPolicyInputBuilder {
  282    295   
        crate::operation::put_account_policy::builders::PutAccountPolicyInputBuilder::default()
  283    296   
    }
  284    297   
}
  285    298   
  286    299   
/// A builder for [`PutAccountPolicyInput`](crate::operation::put_account_policy::PutAccountPolicyInput).
  287    300   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  288    301   
#[non_exhaustive]

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/put_account_policy/_put_account_policy_output.rs

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.cloudwatchlogs.synthetic",
   19     19   
    "PutAccountPolicyOutput",
   20     20   
);
   21     21   
static PUTACCOUNTPOLICYOUTPUT_MEMBER_ACCOUNT_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.cloudwatchlogs.synthetic#PutAccountPolicyOutput$accountPolicy",
   24     24   
        "com.amazonaws.cloudwatchlogs.synthetic",
   25     25   
        "PutAccountPolicyOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::Structure,
   28         -
    "account_policy",
          28  +
    "accountPolicy",
   29     29   
    0,
   30     30   
);
          31  +
static PUTACCOUNTPOLICYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          32  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          33  +
    ::aws_smithy_schema::ShapeType::String,
          34  +
    "request_id",
          35  +
    1,
          36  +
)
          37  +
.with_http_header("x-amzn-requestid");
   31     38   
static PUTACCOUNTPOLICYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    PUTACCOUNTPOLICYOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&PUTACCOUNTPOLICYOUTPUT_MEMBER_ACCOUNT_POLICY],
          41  +
    &[&PUTACCOUNTPOLICYOUTPUT_MEMBER_ACCOUNT_POLICY, &PUTACCOUNTPOLICYOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl PutAccountPolicyOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTACCOUNTPOLICYOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for PutAccountPolicyOutput {
   41     48   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   42     49   
    fn serialize_members(
   43     50   
        &self,
   44     51   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   45     52   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   46     53   
        if let Some(ref val) = self.account_policy {
   47     54   
            ser.write_struct(&PUTACCOUNTPOLICYOUTPUT_MEMBER_ACCOUNT_POLICY, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl PutAccountPolicyOutput {
   53     60   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          61  +
    pub fn deserialize(
          62  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     63   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     64   
        #[allow(unused_variables, unused_mut)]
   58     65   
        let mut builder = Self::builder();
   59     66   
        #[allow(
   60     67   
            unused_variables,
   61     68   
            unreachable_code,
   62     69   
            clippy::single_match,
   63     70   
            clippy::match_single_binding,
   64     71   
            clippy::diverging_sub_expression
   65     72   
        )]
   66         -
        deserializer.read_struct(&PUTACCOUNTPOLICYOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&PUTACCOUNTPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.account_policy = Some(crate::types::AccountPolicy::deserialize(deser)?);
          77  +
                }
          78  +
                Some(1) => {
          79  +
                    builder._request_id = Some(deser.read_string(member)?);
          80  +
                }
          81  +
                _ => {}
          82  +
            }
          83  +
            Ok(())
          84  +
        })?;
          85  +
        Ok(builder.build())
          86  +
    }
          87  +
}
          88  +
impl PutAccountPolicyOutput {
          89  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          90  +
    /// Header-bound members are read directly from headers, avoiding runtime
          91  +
    /// member iteration overhead. Body members are read via the deserializer.
          92  +
    pub fn deserialize_with_response(
          93  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          94  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          95  +
        _status: u16,
          96  +
        _body: &[u8],
          97  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          98  +
        #[allow(unused_variables, unused_mut)]
          99  +
        let mut builder = Self::builder();
         100  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         101  +
            builder._request_id = Some(val.to_string());
         102  +
        }
         103  +
        #[allow(
         104  +
            unused_variables,
         105  +
            unreachable_code,
         106  +
            clippy::single_match,
         107  +
            clippy::match_single_binding,
         108  +
            clippy::diverging_sub_expression
         109  +
        )]
         110  +
        deserializer.read_struct(&PUTACCOUNTPOLICYOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.account_policy = Some(crate::types::AccountPolicy::deserialize(deser)?);
   70    114   
                }
   71    115   
                _ => {}
   72    116   
            }
   73    117   
            Ok(())
   74    118   
        })?;
   75    119   
        Ok(builder.build())
   76    120   
    }

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

@@ -1,1 +40,45 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `PutDataProtectionPolicy`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutDataProtectionPolicy;
    6      6   
impl PutDataProtectionPolicy {
    7      7   
    /// Creates a new `PutDataProtectionPolicy`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::put_data_protection_policy::PutDataProtectionPolicyInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          15  +
        crate::operation::put_data_protection_policy::PutDataProtectionPolicyOutput::SCHEMA;
   11     16   
    pub(crate) async fn orchestrate(
   12     17   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     18   
        input: crate::operation::put_data_protection_policy::PutDataProtectionPolicyInput,
   14     19   
    ) -> ::std::result::Result<
   15     20   
        crate::operation::put_data_protection_policy::PutDataProtectionPolicyOutput,
   16     21   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     22   
            crate::operation::put_data_protection_policy::PutDataProtectionPolicyError,
   18     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     24   
        >,
   20     25   
    > {
@@ -127,132 +253,397 @@
  147    152   
        ::std::borrow::Cow::Owned(rcb)
  148    153   
    }
  149    154   
}
  150    155   
  151    156   
#[derive(Debug)]
  152    157   
struct PutDataProtectionPolicyResponseDeserializer;
  153    158   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutDataProtectionPolicyResponseDeserializer {
  154    159   
    fn deserialize_nonstreaming(
  155    160   
        &self,
  156    161   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         162  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  157    163   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  158    164   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  159         -
        let headers = response.headers();
  160         -
        let body = response.body().bytes().expect("body loaded");
  161    165   
        #[allow(unused_mut)]
  162    166   
        let mut force_error = false;
  163    167   
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  164         -
        let parse_result = if !success && status != 200 || force_error {
  165         -
            crate::protocol_serde::shape_put_data_protection_policy::de_put_data_protection_policy_http_error(status, headers, body)
         168  +
        if !success && status != 200 || force_error {
         169  +
            let headers = response.headers();
         170  +
            let body = response.body().bytes().expect("body loaded");
         171  +
            #[allow(unused_mut)]
         172  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         173  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         174  +
            })?;
         175  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         176  +
            let generic = generic_builder.build();
         177  +
            let error_code = match generic.code() {
         178  +
                ::std::option::Option::Some(code) => code,
         179  +
                ::std::option::Option::None => {
         180  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         181  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         182  +
                            crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::unhandled(generic),
         183  +
                        ),
         184  +
                    ))
         185  +
                }
         186  +
            };
         187  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         188  +
            let protocol = _cfg
         189  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         190  +
                .expect("a SharedClientProtocol is required");
         191  +
            let err = match error_code {
         192  +
                "InvalidParameterException" => {
         193  +
                    crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::InvalidParameterException({
         194  +
                        let mut tmp = match protocol
         195  +
                            .deserialize_response(response, crate::types::error::InvalidParameterException::SCHEMA, _cfg)
         196  +
                            .and_then(|mut deser| {
         197  +
                                crate::types::error::InvalidParameterException::deserialize_with_response(
         198  +
                                    &mut *deser,
         199  +
                                    response.headers(),
         200  +
                                    response.status().into(),
         201  +
                                    body,
         202  +
                                )
         203  +
                            }) {
         204  +
                            ::std::result::Result::Ok(val) => val,
         205  +
                            ::std::result::Result::Err(e) => {
         206  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         207  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         208  +
                                ))
         209  +
                            }
         210  +
                        };
         211  +
                        tmp.meta = generic;
         212  +
                        if tmp.message.is_none() {
         213  +
                            tmp.message = _error_message;
         214  +
                        }
         215  +
                        tmp
         216  +
                    })
         217  +
                }
         218  +
                "LimitExceededException" => crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::LimitExceededException({
         219  +
                    let mut tmp = match protocol
         220  +
                        .deserialize_response(response, crate::types::error::LimitExceededException::SCHEMA, _cfg)
         221  +
                        .and_then(|mut deser| {
         222  +
                            crate::types::error::LimitExceededException::deserialize_with_response(
         223  +
                                &mut *deser,
         224  +
                                response.headers(),
         225  +
                                response.status().into(),
         226  +
                                body,
         227  +
                            )
         228  +
                        }) {
         229  +
                        ::std::result::Result::Ok(val) => val,
         230  +
                        ::std::result::Result::Err(e) => {
         231  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         232  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         233  +
                            ))
         234  +
                        }
         235  +
                    };
         236  +
                    tmp.meta = generic;
         237  +
                    if tmp.message.is_none() {
         238  +
                        tmp.message = _error_message;
         239  +
                    }
         240  +
                    tmp
         241  +
                }),
         242  +
                "OperationAbortedException" => {
         243  +
                    crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::OperationAbortedException({
         244  +
                        let mut tmp = match protocol
         245  +
                            .deserialize_response(response, crate::types::error::OperationAbortedException::SCHEMA, _cfg)
         246  +
                            .and_then(|mut deser| {
         247  +
                                crate::types::error::OperationAbortedException::deserialize_with_response(
         248  +
                                    &mut *deser,
         249  +
                                    response.headers(),
         250  +
                                    response.status().into(),
         251  +
                                    body,
         252  +
                                )
         253  +
                            }) {
         254  +
                            ::std::result::Result::Ok(val) => val,
         255  +
                            ::std::result::Result::Err(e) => {
         256  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         257  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         258  +
                                ))
         259  +
                            }
         260  +
                        };
         261  +
                        tmp.meta = generic;
         262  +
                        if tmp.message.is_none() {
         263  +
                            tmp.message = _error_message;
         264  +
                        }
         265  +
                        tmp
         266  +
                    })
         267  +
                }
         268  +
                "ResourceNotFoundException" => {
         269  +
                    crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::ResourceNotFoundException({
         270  +
                        let mut tmp = match protocol
         271  +
                            .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         272  +
                            .and_then(|mut deser| {
         273  +
                                crate::types::error::ResourceNotFoundException::deserialize_with_response(
         274  +
                                    &mut *deser,
         275  +
                                    response.headers(),
         276  +
                                    response.status().into(),
         277  +
                                    body,
         278  +
                                )
         279  +
                            }) {
         280  +
                            ::std::result::Result::Ok(val) => val,
         281  +
                            ::std::result::Result::Err(e) => {
         282  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         283  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         284  +
                                ))
         285  +
                            }
         286  +
                        };
         287  +
                        tmp.meta = generic;
         288  +
                        if tmp.message.is_none() {
         289  +
                            tmp.message = _error_message;
         290  +
                        }
         291  +
                        tmp
         292  +
                    })
         293  +
                }
         294  +
                "ServiceUnavailableException" => {
         295  +
                    crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::ServiceUnavailableException({
         296  +
                        let mut tmp = match protocol
         297  +
                            .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         298  +
                            .and_then(|mut deser| {
         299  +
                                crate::types::error::ServiceUnavailableException::deserialize_with_response(
         300  +
                                    &mut *deser,
         301  +
                                    response.headers(),
         302  +
                                    response.status().into(),
         303  +
                                    body,
         304  +
                                )
         305  +
                            }) {
         306  +
                            ::std::result::Result::Ok(val) => val,
         307  +
                            ::std::result::Result::Err(e) => {
         308  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         309  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         310  +
                                ))
         311  +
                            }
         312  +
                        };
         313  +
                        tmp.meta = generic;
         314  +
                        if tmp.message.is_none() {
         315  +
                            tmp.message = _error_message;
         316  +
                        }
         317  +
                        tmp
         318  +
                    })
         319  +
                }
         320  +
                _ => crate::operation::put_data_protection_policy::PutDataProtectionPolicyError::generic(generic),
         321  +
            };
         322  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         323  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         324  +
            ))
  166    325   
        } else {
  167         -
            crate::protocol_serde::shape_put_data_protection_policy::de_put_data_protection_policy_http_response(status, headers, body)
  168         -
        };
  169         -
        crate::protocol_serde::type_erase_result(parse_result)
         326  +
            let protocol = _cfg
         327  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         328  +
                .expect("a SharedClientProtocol is required");
         329  +
            let mut deser = protocol
         330  +
                .deserialize_response(response, PutDataProtectionPolicy::OUTPUT_SCHEMA, _cfg)
         331  +
                .map_err(|e| {
         332  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         333  +
                })?;
         334  +
            let body = response.body().bytes().expect("body loaded");
         335  +
            let output = crate::operation::put_data_protection_policy::PutDataProtectionPolicyOutput::deserialize_with_response(
         336  +
                &mut *deser,
         337  +
                response.headers(),
         338  +
                response.status().into(),
         339  +
                body,
         340  +
            )
         341  +
            .map_err(|e| {
         342  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         343  +
            })?;
         344  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         345  +
        }
  170    346   
    }
  171    347   
}
  172    348   
#[derive(Debug)]
  173    349   
struct PutDataProtectionPolicyRequestSerializer;
  174    350   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutDataProtectionPolicyRequestSerializer {
  175    351   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  176    352   
    fn serialize_input(
  177    353   
        &self,
  178    354   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  179    355   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  180    356   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  181    357   
        let input = input
  182    358   
            .downcast::<crate::operation::put_data_protection_policy::PutDataProtectionPolicyInput>()
  183    359   
            .expect("correct type");
  184         -
        let _header_serialization_settings = _cfg
  185         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  186         -
            .cloned()
  187         -
            .unwrap_or_default();
  188         -
        let mut request_builder = {
  189         -
            #[allow(clippy::uninlined_format_args)]
  190         -
            fn uri_base(
  191         -
                _input: &crate::operation::put_data_protection_policy::PutDataProtectionPolicyInput,
  192         -
                output: &mut ::std::string::String,
  193         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  194         -
                use ::std::fmt::Write as _;
  195         -
                ::std::write!(output, "/").expect("formatting should succeed");
  196         -
                ::std::result::Result::Ok(())
  197         -
            }
  198         -
            #[allow(clippy::unnecessary_wraps)]
  199         -
            fn update_http_builder(
  200         -
                input: &crate::operation::put_data_protection_policy::PutDataProtectionPolicyInput,
  201         -
                builder: ::http_1x::request::Builder,
  202         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  203         -
                let mut uri = ::std::string::String::new();
  204         -
                uri_base(input, &mut uri)?;
  205         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  206         -
            }
  207         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  208         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  209         -
            builder = _header_serialization_settings.set_default_header(
  210         -
                builder,
  211         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  212         -
                "Logs_20140328.PutDataProtectionPolicy",
  213         -
            );
  214         -
            builder
  215         -
        };
  216         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  217         -
            crate::protocol_serde::shape_put_data_protection_policy::ser_put_data_protection_policy_input(&input)?,
  218         -
        );
  219         -
        if let Some(content_length) = body.content_length() {
  220         -
            let content_length = content_length.to_string();
  221         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  222         -
        }
  223         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         360  +
        let protocol = _cfg
         361  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         362  +
            .expect("a SharedClientProtocol is required");
         363  +
        let mut request = protocol
         364  +
            .serialize_request(&input, PutDataProtectionPolicy::INPUT_SCHEMA, "", _cfg)
         365  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         366  +
         367  +
        return ::std::result::Result::Ok(request);
  224    368   
    }
  225    369   
}
  226    370   
#[derive(Debug)]
  227    371   
struct PutDataProtectionPolicyEndpointParamsInterceptor;
  228    372   
  229    373   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutDataProtectionPolicyEndpointParamsInterceptor {
  230    374   
    fn name(&self) -> &'static str {
  231    375   
        "PutDataProtectionPolicyEndpointParamsInterceptor"
  232    376   
    }
  233    377