AWS SDK

AWS SDK

rev. e063993ca0ab793f44c575dbe707d50a5e3e2406

Files changed:

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

@@ -37,37 +252,267 @@
   57     57   
    "com.amazonaws.cloudwatchlogs.synthetic",
   58     58   
    "CreateExportTaskInput",
   59     59   
);
   60     60   
static CREATEEXPORTTASKINPUT_MEMBER_TASK_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   61     61   
    ::aws_smithy_schema::ShapeId::from_static(
   62     62   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$taskName",
   63     63   
        "com.amazonaws.cloudwatchlogs.synthetic",
   64     64   
        "CreateExportTaskInput",
   65     65   
    ),
   66     66   
    ::aws_smithy_schema::ShapeType::String,
   67         -
    "task_name",
          67  +
    "taskName",
   68     68   
    0,
   69     69   
);
   70     70   
static CREATEEXPORTTASKINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   71     71   
    ::aws_smithy_schema::ShapeId::from_static(
   72     72   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$logGroupName",
   73     73   
        "com.amazonaws.cloudwatchlogs.synthetic",
   74     74   
        "CreateExportTaskInput",
   75     75   
    ),
   76     76   
    ::aws_smithy_schema::ShapeType::String,
   77         -
    "log_group_name",
          77  +
    "logGroupName",
   78     78   
    1,
   79     79   
);
   80     80   
static CREATEEXPORTTASKINPUT_MEMBER_LOG_STREAM_NAME_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   81     81   
    ::aws_smithy_schema::ShapeId::from_static(
   82     82   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$logStreamNamePrefix",
   83     83   
        "com.amazonaws.cloudwatchlogs.synthetic",
   84     84   
        "CreateExportTaskInput",
   85     85   
    ),
   86     86   
    ::aws_smithy_schema::ShapeType::String,
   87         -
    "log_stream_name_prefix",
          87  +
    "logStreamNamePrefix",
   88     88   
    2,
   89     89   
);
   90     90   
static CREATEEXPORTTASKINPUT_MEMBER_FROM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$from",
   93     93   
        "com.amazonaws.cloudwatchlogs.synthetic",
   94     94   
        "CreateExportTaskInput",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Long,
   97     97   
    "from",
   98     98   
    3,
   99     99   
);
  100    100   
static CREATEEXPORTTASKINPUT_MEMBER_TO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$to",
  103    103   
        "com.amazonaws.cloudwatchlogs.synthetic",
  104    104   
        "CreateExportTaskInput",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::Long,
  107    107   
    "to",
  108    108   
    4,
  109    109   
);
  110    110   
static CREATEEXPORTTASKINPUT_MEMBER_DESTINATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$destination",
  113    113   
        "com.amazonaws.cloudwatchlogs.synthetic",
  114    114   
        "CreateExportTaskInput",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::String,
  117    117   
    "destination",
  118    118   
    5,
  119    119   
);
  120    120   
static CREATEEXPORTTASKINPUT_MEMBER_DESTINATION_PREFIX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskInput$destinationPrefix",
  123    123   
        "com.amazonaws.cloudwatchlogs.synthetic",
  124    124   
        "CreateExportTaskInput",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::String,
  127         -
    "destination_prefix",
         127  +
    "destinationPrefix",
  128    128   
    6,
  129    129   
);
  130    130   
static CREATEEXPORTTASKINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  131    131   
    CREATEEXPORTTASKINPUT_SCHEMA_ID,
  132    132   
    ::aws_smithy_schema::ShapeType::Structure,
  133    133   
    &[
  134    134   
        &CREATEEXPORTTASKINPUT_MEMBER_TASK_NAME,
  135    135   
        &CREATEEXPORTTASKINPUT_MEMBER_LOG_GROUP_NAME,
  136    136   
        &CREATEEXPORTTASKINPUT_MEMBER_LOG_STREAM_NAME_PREFIX,
  137    137   
        &CREATEEXPORTTASKINPUT_MEMBER_FROM,
  138    138   
        &CREATEEXPORTTASKINPUT_MEMBER_TO,
  139    139   
        &CREATEEXPORTTASKINPUT_MEMBER_DESTINATION,
  140    140   
        &CREATEEXPORTTASKINPUT_MEMBER_DESTINATION_PREFIX,
  141    141   
    ],
  142    142   
);
  143    143   
impl CreateExportTaskInput {
  144    144   
    /// The schema for this shape.
  145    145   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEEXPORTTASKINPUT_SCHEMA;
  146    146   
}
  147    147   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateExportTaskInput {
  148    148   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  149    149   
    fn serialize_members(
  150    150   
        &self,
  151    151   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  152    152   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  153    153   
        if let Some(ref val) = self.task_name {
  154    154   
            ser.write_string(&CREATEEXPORTTASKINPUT_MEMBER_TASK_NAME, val)?;
  155    155   
        }
  156    156   
        if let Some(ref val) = self.log_group_name {
  157    157   
            ser.write_string(&CREATEEXPORTTASKINPUT_MEMBER_LOG_GROUP_NAME, val)?;
  158    158   
        }
  159    159   
        if let Some(ref val) = self.log_stream_name_prefix {
  160    160   
            ser.write_string(&CREATEEXPORTTASKINPUT_MEMBER_LOG_STREAM_NAME_PREFIX, val)?;
  161    161   
        }
  162    162   
        if let Some(ref val) = self.from {
  163    163   
            ser.write_long(&CREATEEXPORTTASKINPUT_MEMBER_FROM, *val)?;
  164    164   
        }
  165    165   
        if let Some(ref val) = self.to {
  166    166   
            ser.write_long(&CREATEEXPORTTASKINPUT_MEMBER_TO, *val)?;
  167    167   
        }
  168    168   
        if let Some(ref val) = self.destination {
  169    169   
            ser.write_string(&CREATEEXPORTTASKINPUT_MEMBER_DESTINATION, val)?;
  170    170   
        }
  171    171   
        if let Some(ref val) = self.destination_prefix {
  172    172   
            ser.write_string(&CREATEEXPORTTASKINPUT_MEMBER_DESTINATION_PREFIX, val)?;
  173    173   
        }
  174    174   
        Ok(())
  175    175   
    }
  176    176   
}
  177    177   
impl CreateExportTaskInput {
  178    178   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  179         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  180         -
        deserializer: &mut D,
         179  +
    pub fn deserialize(
         180  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  181    181   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  182    182   
        #[allow(unused_variables, unused_mut)]
  183    183   
        let mut builder = Self::builder();
  184    184   
        #[allow(
  185    185   
            unused_variables,
  186    186   
            unreachable_code,
  187    187   
            clippy::single_match,
  188    188   
            clippy::match_single_binding,
  189    189   
            clippy::diverging_sub_expression
  190    190   
        )]
  191         -
        deserializer.read_struct(&CREATEEXPORTTASKINPUT_SCHEMA, (), |_, member, deser| {
         191  +
        deserializer.read_struct(&CREATEEXPORTTASKINPUT_SCHEMA, &mut |member, deser| {
  192    192   
            match member.member_index() {
  193    193   
                Some(0) => {
  194    194   
                    builder.task_name = Some(deser.read_string(member)?);
  195    195   
                }
  196    196   
                Some(1) => {
  197    197   
                    builder.log_group_name = Some(deser.read_string(member)?);
  198    198   
                }
  199    199   
                Some(2) => {
  200    200   
                    builder.log_stream_name_prefix = Some(deser.read_string(member)?);
  201    201   
                }
  202    202   
                Some(3) => {
  203    203   
                    builder.from = Some(deser.read_long(member)?);
  204    204   
                }
  205    205   
                Some(4) => {
  206    206   
                    builder.to = Some(deser.read_long(member)?);
  207    207   
                }
  208    208   
                Some(5) => {
  209    209   
                    builder.destination = Some(deser.read_string(member)?);
  210    210   
                }
  211    211   
                Some(6) => {
  212    212   
                    builder.destination_prefix = Some(deser.read_string(member)?);
  213    213   
                }
  214    214   
                _ => {}
  215    215   
            }
  216    216   
            Ok(())
  217    217   
        })?;
         218  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
         219  +
        builder.from = builder.from.or(Some(0i64));
         220  +
        builder.to = builder.to.or(Some(0i64));
         221  +
        builder.destination = builder.destination.or(Some(String::new()));
  218    222   
        builder
  219    223   
            .build()
  220    224   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  221    225   
    }
  222    226   
}
         227  +
impl CreateExportTaskInput {
         228  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         229  +
    pub fn deserialize_with_response(
         230  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         231  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         232  +
        _status: u16,
         233  +
        _body: &[u8],
         234  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         235  +
        Self::deserialize(deserializer)
         236  +
    }
         237  +
}
  223    238   
impl CreateExportTaskInput {
  224    239   
    /// Creates a new builder-style object to manufacture [`CreateExportTaskInput`](crate::operation::create_export_task::CreateExportTaskInput).
  225    240   
    pub fn builder() -> crate::operation::create_export_task::builders::CreateExportTaskInputBuilder {
  226    241   
        crate::operation::create_export_task::builders::CreateExportTaskInputBuilder::default()
  227    242   
    }
  228    243   
}
  229    244   
  230    245   
/// A builder for [`CreateExportTaskInput`](crate::operation::create_export_task::CreateExportTaskInput).
  231    246   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  232    247   
#[non_exhaustive]

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

@@ -1,1 +96,140 @@
   18     18   
    "com.amazonaws.cloudwatchlogs.synthetic",
   19     19   
    "CreateExportTaskOutput",
   20     20   
);
   21     21   
static CREATEEXPORTTASKOUTPUT_MEMBER_TASK_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   22     22   
    ::aws_smithy_schema::ShapeId::from_static(
   23     23   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateExportTaskOutput$taskId",
   24     24   
        "com.amazonaws.cloudwatchlogs.synthetic",
   25     25   
        "CreateExportTaskOutput",
   26     26   
    ),
   27     27   
    ::aws_smithy_schema::ShapeType::String,
   28         -
    "task_id",
          28  +
    "taskId",
   29     29   
    0,
   30     30   
);
          31  +
static CREATEEXPORTTASKOUTPUT_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 CREATEEXPORTTASKOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   32     39   
    CREATEEXPORTTASKOUTPUT_SCHEMA_ID,
   33     40   
    ::aws_smithy_schema::ShapeType::Structure,
   34         -
    &[&CREATEEXPORTTASKOUTPUT_MEMBER_TASK_ID],
          41  +
    &[&CREATEEXPORTTASKOUTPUT_MEMBER_TASK_ID, &CREATEEXPORTTASKOUTPUT_MEMBER__REQUEST_ID],
   35     42   
);
   36     43   
impl CreateExportTaskOutput {
   37     44   
    /// The schema for this shape.
   38     45   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEEXPORTTASKOUTPUT_SCHEMA;
   39     46   
}
   40     47   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateExportTaskOutput {
   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.task_id {
   47     54   
            ser.write_string(&CREATEEXPORTTASKOUTPUT_MEMBER_TASK_ID, val)?;
   48     55   
        }
   49     56   
        Ok(())
   50     57   
    }
   51     58   
}
   52     59   
impl CreateExportTaskOutput {
   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(&CREATEEXPORTTASKOUTPUT_SCHEMA, (), |_, member, deser| {
          73  +
        deserializer.read_struct(&CREATEEXPORTTASKOUTPUT_SCHEMA, &mut |member, deser| {
          74  +
            match member.member_index() {
          75  +
                Some(0) => {
          76  +
                    builder.task_id = Some(deser.read_string(member)?);
          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 CreateExportTaskOutput {
          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(&CREATEEXPORTTASKOUTPUT_SCHEMA, &mut |member, deser| {
   67    111   
            match member.member_index() {
   68    112   
                Some(0) => {
   69    113   
                    builder.task_id = Some(deser.read_string(member)?);
   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/create_log_anomaly_detector.rs

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

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

@@ -39,39 +149,149 @@
   59     59   
    "com.amazonaws.cloudwatchlogs.synthetic",
   60     60   
    "CreateLogAnomalyDetectorInput",
   61     61   
);
   62     62   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_LOG_GROUP_ARN_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   63     63   
    ::aws_smithy_schema::ShapeId::from_static(
   64     64   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$logGroupArnList",
   65     65   
        "com.amazonaws.cloudwatchlogs.synthetic",
   66     66   
        "CreateLogAnomalyDetectorInput",
   67     67   
    ),
   68     68   
    ::aws_smithy_schema::ShapeType::List,
   69         -
    "log_group_arn_list",
          69  +
    "logGroupArnList",
   70     70   
    0,
   71     71   
);
   72     72   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_DETECTOR_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   73     73   
    ::aws_smithy_schema::ShapeId::from_static(
   74     74   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$detectorName",
   75     75   
        "com.amazonaws.cloudwatchlogs.synthetic",
   76     76   
        "CreateLogAnomalyDetectorInput",
   77     77   
    ),
   78     78   
    ::aws_smithy_schema::ShapeType::String,
   79         -
    "detector_name",
          79  +
    "detectorName",
   80     80   
    1,
   81     81   
);
   82     82   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_EVALUATION_FREQUENCY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   83     83   
    ::aws_smithy_schema::ShapeId::from_static(
   84     84   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$evaluationFrequency",
   85     85   
        "com.amazonaws.cloudwatchlogs.synthetic",
   86     86   
        "CreateLogAnomalyDetectorInput",
   87     87   
    ),
   88     88   
    ::aws_smithy_schema::ShapeType::String,
   89         -
    "evaluation_frequency",
          89  +
    "evaluationFrequency",
   90     90   
    2,
   91     91   
);
   92     92   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_FILTER_PATTERN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   93     93   
    ::aws_smithy_schema::ShapeId::from_static(
   94     94   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$filterPattern",
   95     95   
        "com.amazonaws.cloudwatchlogs.synthetic",
   96     96   
        "CreateLogAnomalyDetectorInput",
   97     97   
    ),
   98     98   
    ::aws_smithy_schema::ShapeType::String,
   99         -
    "filter_pattern",
          99  +
    "filterPattern",
  100    100   
    3,
  101    101   
);
  102    102   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_KMS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  103    103   
    ::aws_smithy_schema::ShapeId::from_static(
  104    104   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$kmsKeyId",
  105    105   
        "com.amazonaws.cloudwatchlogs.synthetic",
  106    106   
        "CreateLogAnomalyDetectorInput",
  107    107   
    ),
  108    108   
    ::aws_smithy_schema::ShapeType::String,
  109         -
    "kms_key_id",
         109  +
    "kmsKeyId",
  110    110   
    4,
  111    111   
);
  112    112   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_ANOMALY_VISIBILITY_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  113    113   
    ::aws_smithy_schema::ShapeId::from_static(
  114    114   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$anomalyVisibilityTime",
  115    115   
        "com.amazonaws.cloudwatchlogs.synthetic",
  116    116   
        "CreateLogAnomalyDetectorInput",
  117    117   
    ),
  118    118   
    ::aws_smithy_schema::ShapeType::Long,
  119         -
    "anomaly_visibility_time",
         119  +
    "anomalyVisibilityTime",
  120    120   
    5,
  121    121   
);
  122    122   
static CREATELOGANOMALYDETECTORINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  123    123   
    ::aws_smithy_schema::ShapeId::from_static(
  124    124   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogAnomalyDetectorInput$tags",
  125    125   
        "com.amazonaws.cloudwatchlogs.synthetic",
  126    126   
        "CreateLogAnomalyDetectorInput",
  127    127   
    ),
  128    128   
    ::aws_smithy_schema::ShapeType::Map,
  129    129   
    "tags",
@@ -168,168 +291,283 @@
  188    188   
                    }
  189    189   
                    Ok(())
  190    190   
                },
  191    191   
            )?;
  192    192   
        }
  193    193   
        Ok(())
  194    194   
    }
  195    195   
}
  196    196   
impl CreateLogAnomalyDetectorInput {
  197    197   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  198         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  199         -
        deserializer: &mut D,
         198  +
    pub fn deserialize(
         199  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  200    200   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  201    201   
        #[allow(unused_variables, unused_mut)]
  202    202   
        let mut builder = Self::builder();
  203    203   
        #[allow(
  204    204   
            unused_variables,
  205    205   
            unreachable_code,
  206    206   
            clippy::single_match,
  207    207   
            clippy::match_single_binding,
  208    208   
            clippy::diverging_sub_expression
  209    209   
        )]
  210         -
        deserializer.read_struct(&CREATELOGANOMALYDETECTORINPUT_SCHEMA, (), |_, member, deser| {
         210  +
        deserializer.read_struct(&CREATELOGANOMALYDETECTORINPUT_SCHEMA, &mut |member, deser| {
  211    211   
            match member.member_index() {
  212    212   
                Some(0) => {
  213         -
                    builder.log_group_arn_list = Some({
  214         -
                        let container = if let Some(cap) = deser.container_size() {
  215         -
                            Vec::with_capacity(cap)
  216         -
                        } else {
  217         -
                            Vec::new()
  218         -
                        };
  219         -
                        deser.read_list(member, container, |mut list, deser| {
  220         -
                            list.push(deser.read_string(member)?);
  221         -
                            Ok(list)
  222         -
                        })?
  223         -
                    });
         213  +
                    builder.log_group_arn_list = Some(deser.read_string_list(member)?);
  224    214   
                }
  225    215   
                Some(1) => {
  226    216   
                    builder.detector_name = Some(deser.read_string(member)?);
  227    217   
                }
  228    218   
                Some(2) => {
  229    219   
                    builder.evaluation_frequency = Some(crate::types::EvaluationFrequency::from(deser.read_string(member)?.as_str()));
  230    220   
                }
  231    221   
                Some(3) => {
  232    222   
                    builder.filter_pattern = Some(deser.read_string(member)?);
  233    223   
                }
  234    224   
                Some(4) => {
  235    225   
                    builder.kms_key_id = Some(deser.read_string(member)?);
  236    226   
                }
  237    227   
                Some(5) => {
  238    228   
                    builder.anomaly_visibility_time = Some(deser.read_long(member)?);
  239    229   
                }
  240    230   
                Some(6) => {
  241         -
                    builder.tags = Some({
  242         -
                        let container = if let Some(cap) = deser.container_size() {
  243         -
                            std::collections::HashMap::with_capacity(cap)
  244         -
                        } else {
  245         -
                            std::collections::HashMap::new()
  246         -
                        };
  247         -
                        deser.read_map(member, container, |mut map, key, deser| {
  248         -
                            map.insert(key, deser.read_string(member)?);
  249         -
                            Ok(map)
  250         -
                        })?
  251         -
                    });
         231  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  252    232   
                }
  253    233   
                _ => {}
  254    234   
            }
  255    235   
            Ok(())
  256    236   
        })?;
         237  +
        builder.log_group_arn_list = builder.log_group_arn_list.or(Some(Vec::new()));
  257    238   
        builder
  258    239   
            .build()
  259    240   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  260    241   
    }
  261    242   
}
         243  +
impl CreateLogAnomalyDetectorInput {
         244  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         245  +
    pub fn deserialize_with_response(
         246  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         247  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         248  +
        _status: u16,
         249  +
        _body: &[u8],
         250  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         251  +
        Self::deserialize(deserializer)
         252  +
    }
         253  +
}
  262    254   
impl CreateLogAnomalyDetectorInput {
  263    255   
    /// Creates a new builder-style object to manufacture [`CreateLogAnomalyDetectorInput`](crate::operation::create_log_anomaly_detector::CreateLogAnomalyDetectorInput).
  264    256   
    pub fn builder() -> crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorInputBuilder {
  265    257   
        crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorInputBuilder::default()
  266    258   
    }
  267    259   
}
  268    260   
  269    261   
/// A builder for [`CreateLogAnomalyDetectorInput`](crate::operation::create_log_anomaly_detector::CreateLogAnomalyDetectorInput).
  270    262   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  271    263   
#[non_exhaustive]

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

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

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/create_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 `CreateLogGroup`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateLogGroup;
    6      6   
impl CreateLogGroup {
    7      7   
    /// Creates a new `CreateLogGroup`
    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::create_log_group::CreateLogGroupInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_log_group::CreateLogGroupOutput::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::create_log_group::CreateLogGroupInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_log_group::CreateLogGroupOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_log_group::CreateLogGroupError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,382 @@
  138    142   
                crate::operation::create_log_group::CreateLogGroupError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateLogGroupResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateLogGroupResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  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_create_log_group::de_create_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::create_log_group::CreateLogGroupError::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::create_log_group::CreateLogGroupError::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::create_log_group::CreateLogGroupError::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::create_log_group::CreateLogGroupError::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  +
                "ResourceAlreadyExistsException" => crate::operation::create_log_group::CreateLogGroupError::ResourceAlreadyExistsException({
         258  +
                    let mut tmp = match protocol
         259  +
                        .deserialize_response(response, crate::types::error::ResourceAlreadyExistsException::SCHEMA, _cfg)
         260  +
                        .and_then(|mut deser| {
         261  +
                            crate::types::error::ResourceAlreadyExistsException::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  +
                "ServiceUnavailableException" => crate::operation::create_log_group::CreateLogGroupError::ServiceUnavailableException({
         282  +
                    let mut tmp = match protocol
         283  +
                        .deserialize_response(response, crate::types::error::ServiceUnavailableException::SCHEMA, _cfg)
         284  +
                        .and_then(|mut deser| {
         285  +
                            crate::types::error::ServiceUnavailableException::deserialize_with_response(
         286  +
                                &mut *deser,
         287  +
                                response.headers(),
         288  +
                                response.status().into(),
         289  +
                                body,
         290  +
                            )
         291  +
                        }) {
         292  +
                        ::std::result::Result::Ok(val) => val,
         293  +
                        ::std::result::Result::Err(e) => {
         294  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         295  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         296  +
                            ))
         297  +
                        }
         298  +
                    };
         299  +
                    tmp.meta = generic;
         300  +
                    if tmp.message.is_none() {
         301  +
                        tmp.message = _error_message;
         302  +
                    }
         303  +
                    tmp
         304  +
                }),
         305  +
                _ => crate::operation::create_log_group::CreateLogGroupError::generic(generic),
         306  +
            };
         307  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         308  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         309  +
            ))
  160    310   
        } else {
  161         -
            crate::protocol_serde::shape_create_log_group::de_create_log_group_http_response(status, headers, body)
  162         -
        };
  163         -
        crate::protocol_serde::type_erase_result(parse_result)
         311  +
            let protocol = _cfg
         312  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         313  +
                .expect("a SharedClientProtocol is required");
         314  +
            let mut deser = protocol
         315  +
                .deserialize_response(response, CreateLogGroup::OUTPUT_SCHEMA, _cfg)
         316  +
                .map_err(|e| {
         317  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         318  +
                })?;
         319  +
            let body = response.body().bytes().expect("body loaded");
         320  +
            let output = crate::operation::create_log_group::CreateLogGroupOutput::deserialize_with_response(
         321  +
                &mut *deser,
         322  +
                response.headers(),
         323  +
                response.status().into(),
         324  +
                body,
         325  +
            )
         326  +
            .map_err(|e| {
         327  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         328  +
            })?;
         329  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         330  +
        }
  164    331   
    }
  165    332   
}
  166    333   
#[derive(Debug)]
  167    334   
struct CreateLogGroupRequestSerializer;
  168    335   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateLogGroupRequestSerializer {
  169    336   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  170    337   
    fn serialize_input(
  171    338   
        &self,
  172    339   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  173    340   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  174    341   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  175    342   
        let input = input
  176    343   
            .downcast::<crate::operation::create_log_group::CreateLogGroupInput>()
  177    344   
            .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::create_log_group::CreateLogGroupInput,
  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::create_log_group::CreateLogGroupInput,
  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.CreateLogGroup",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_log_group::ser_create_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())
         345  +
        let protocol = _cfg
         346  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         347  +
            .expect("a SharedClientProtocol is required");
         348  +
        let mut request = protocol
         349  +
            .serialize_request(&input, CreateLogGroup::INPUT_SCHEMA, "", _cfg)
         350  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         351  +
         352  +
        return ::std::result::Result::Ok(request);
  216    353   
    }
  217    354   
}
  218    355   
#[derive(Debug)]
  219    356   
struct CreateLogGroupEndpointParamsInterceptor;
  220    357   
  221    358   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateLogGroupEndpointParamsInterceptor {
  222    359   
    fn name(&self) -> &'static str {
  223    360   
        "CreateLogGroupEndpointParamsInterceptor"
  224    361   
    }
  225    362   

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

@@ -41,41 +224,226 @@
   61     61   
    "com.amazonaws.cloudwatchlogs.synthetic",
   62     62   
    "CreateLogGroupInput",
   63     63   
);
   64     64   
static CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   65     65   
    ::aws_smithy_schema::ShapeId::from_static(
   66     66   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogGroupInput$logGroupName",
   67     67   
        "com.amazonaws.cloudwatchlogs.synthetic",
   68     68   
        "CreateLogGroupInput",
   69     69   
    ),
   70     70   
    ::aws_smithy_schema::ShapeType::String,
   71         -
    "log_group_name",
          71  +
    "logGroupName",
   72     72   
    0,
   73     73   
);
   74     74   
static CREATELOGGROUPINPUT_MEMBER_KMS_KEY_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   75     75   
    ::aws_smithy_schema::ShapeId::from_static(
   76     76   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogGroupInput$kmsKeyId",
   77     77   
        "com.amazonaws.cloudwatchlogs.synthetic",
   78     78   
        "CreateLogGroupInput",
   79     79   
    ),
   80     80   
    ::aws_smithy_schema::ShapeType::String,
   81         -
    "kms_key_id",
          81  +
    "kmsKeyId",
   82     82   
    1,
   83     83   
);
   84     84   
static CREATELOGGROUPINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   85     85   
    ::aws_smithy_schema::ShapeId::from_static(
   86     86   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogGroupInput$tags",
   87     87   
        "com.amazonaws.cloudwatchlogs.synthetic",
   88     88   
        "CreateLogGroupInput",
   89     89   
    ),
   90     90   
    ::aws_smithy_schema::ShapeType::Map,
   91     91   
    "tags",
   92     92   
    2,
   93     93   
);
   94     94   
static CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_CLASS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   95     95   
    ::aws_smithy_schema::ShapeId::from_static(
   96     96   
        "com.amazonaws.cloudwatchlogs.synthetic#CreateLogGroupInput$logGroupClass",
   97     97   
        "com.amazonaws.cloudwatchlogs.synthetic",
   98     98   
        "CreateLogGroupInput",
   99     99   
    ),
  100    100   
    ::aws_smithy_schema::ShapeType::String,
  101         -
    "log_group_class",
         101  +
    "logGroupClass",
  102    102   
    3,
  103    103   
);
  104    104   
static CREATELOGGROUPINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  105    105   
    CREATELOGGROUPINPUT_SCHEMA_ID,
  106    106   
    ::aws_smithy_schema::ShapeType::Structure,
  107    107   
    &[
  108    108   
        &CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_NAME,
  109    109   
        &CREATELOGGROUPINPUT_MEMBER_KMS_KEY_ID,
  110    110   
        &CREATELOGGROUPINPUT_MEMBER_TAGS,
  111    111   
        &CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_CLASS,
  112    112   
    ],
  113    113   
);
  114    114   
impl CreateLogGroupInput {
  115    115   
    /// The schema for this shape.
  116    116   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATELOGGROUPINPUT_SCHEMA;
  117    117   
}
  118    118   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateLogGroupInput {
  119    119   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  120    120   
    fn serialize_members(
  121    121   
        &self,
  122    122   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  123    123   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  124    124   
        if let Some(ref val) = self.log_group_name {
  125    125   
            ser.write_string(&CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_NAME, val)?;
  126    126   
        }
  127    127   
        if let Some(ref val) = self.kms_key_id {
  128    128   
            ser.write_string(&CREATELOGGROUPINPUT_MEMBER_KMS_KEY_ID, val)?;
  129    129   
        }
  130    130   
        if let Some(ref val) = self.tags {
  131    131   
            ser.write_map(
  132    132   
                &CREATELOGGROUPINPUT_MEMBER_TAGS,
  133    133   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  134    134   
                    for (key, value) in val {
  135    135   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  136    136   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
  137    137   
                    }
  138    138   
                    Ok(())
  139    139   
                },
  140    140   
            )?;
  141    141   
        }
  142    142   
        if let Some(ref val) = self.log_group_class {
  143    143   
            ser.write_string(&CREATELOGGROUPINPUT_MEMBER_LOG_GROUP_CLASS, val.as_str())?;
  144    144   
        }
  145    145   
        Ok(())
  146    146   
    }
  147    147   
}
  148    148   
impl CreateLogGroupInput {
  149    149   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  150         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  151         -
        deserializer: &mut D,
         150  +
    pub fn deserialize(
         151  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  152    152   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  153    153   
        #[allow(unused_variables, unused_mut)]
  154    154   
        let mut builder = Self::builder();
  155    155   
        #[allow(
  156    156   
            unused_variables,
  157    157   
            unreachable_code,
  158    158   
            clippy::single_match,
  159    159   
            clippy::match_single_binding,
  160    160   
            clippy::diverging_sub_expression
  161    161   
        )]
  162         -
        deserializer.read_struct(&CREATELOGGROUPINPUT_SCHEMA, (), |_, member, deser| {
         162  +
        deserializer.read_struct(&CREATELOGGROUPINPUT_SCHEMA, &mut |member, deser| {
  163    163   
            match member.member_index() {
  164    164   
                Some(0) => {
  165    165   
                    builder.log_group_name = Some(deser.read_string(member)?);
  166    166   
                }
  167    167   
                Some(1) => {
  168    168   
                    builder.kms_key_id = Some(deser.read_string(member)?);
  169    169   
                }
  170    170   
                Some(2) => {
  171         -
                    builder.tags = Some({
  172         -
                        let container = if let Some(cap) = deser.container_size() {
  173         -
                            std::collections::HashMap::with_capacity(cap)
  174         -
                        } else {
  175         -
                            std::collections::HashMap::new()
  176         -
                        };
  177         -
                        deser.read_map(member, container, |mut map, key, deser| {
  178         -
                            map.insert(key, deser.read_string(member)?);
  179         -
                            Ok(map)
  180         -
                        })?
  181         -
                    });
         171  +
                    builder.tags = Some(deser.read_string_string_map(member)?);
  182    172   
                }
  183    173   
                Some(3) => {
  184    174   
                    builder.log_group_class = Some(crate::types::LogGroupClass::from(deser.read_string(member)?.as_str()));
  185    175   
                }
  186    176   
                _ => {}
  187    177   
            }
  188    178   
            Ok(())
  189    179   
        })?;
         180  +
        builder.log_group_name = builder.log_group_name.or(Some(String::new()));
  190    181   
        builder
  191    182   
            .build()
  192    183   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  193    184   
    }
  194    185   
}
         186  +
impl CreateLogGroupInput {
         187  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         188  +
    pub fn deserialize_with_response(
         189  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         190  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         191  +
        _status: u16,
         192  +
        _body: &[u8],
         193  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         194  +
        Self::deserialize(deserializer)
         195  +
    }
         196  +
}
  195    197   
impl CreateLogGroupInput {
  196    198   
    /// Creates a new builder-style object to manufacture [`CreateLogGroupInput`](crate::operation::create_log_group::CreateLogGroupInput).
  197    199   
    pub fn builder() -> crate::operation::create_log_group::builders::CreateLogGroupInputBuilder {
  198    200   
        crate::operation::create_log_group::builders::CreateLogGroupInputBuilder::default()
  199    201   
    }
  200    202   
}
  201    203   
  202    204   
/// A builder for [`CreateLogGroupInput`](crate::operation::create_log_group::CreateLogGroupInput).
  203    205   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  204    206   
#[non_exhaustive]

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct CreateLogGroupOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static CREATELOGGROUPOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#CreateLogGroupOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "CreateLogGroupOutput",
   12     12   
);
   13         -
static CREATELOGGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(CREATELOGGROUPOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static CREATELOGGROUPOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static CREATELOGGROUPOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    CREATELOGGROUPOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&CREATELOGGROUPOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl CreateLogGroupOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATELOGGROUPOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateLogGroupOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl CreateLogGroupOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&CREATELOGGROUPOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&CREATELOGGROUPOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl CreateLogGroupOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for CreateLogGroupOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl CreateLogGroupOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`CreateLogGroupOutput`](crate::operation::create_log_group::CreateLogGroupOutput).
   58     89   
    pub fn builder() -> crate::operation::create_log_group::builders::CreateLogGroupOutputBuilder {
   59     90   
        crate::operation::create_log_group::builders::CreateLogGroupOutputBuilder::default()
   60     91   
    }

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/src/operation/create_log_stream.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 `CreateLogStream`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct CreateLogStream;
    6      6   
impl CreateLogStream {
    7      7   
    /// Creates a new `CreateLogStream`
    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::create_log_stream::CreateLogStreamInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::create_log_stream::CreateLogStreamOutput::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::create_log_stream::CreateLogStreamInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::create_log_stream::CreateLogStreamOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::create_log_stream::CreateLogStreamError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -118,122 +245,358 @@
  138    142   
                crate::operation::create_log_stream::CreateLogStreamError,
  139    143   
            >::new());
  140    144   
  141    145   
        ::std::borrow::Cow::Owned(rcb)
  142    146   
    }
  143    147   
}
  144    148   
  145    149   
#[derive(Debug)]
  146    150   
struct CreateLogStreamResponseDeserializer;
  147    151   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateLogStreamResponseDeserializer {
  148         -
    fn deserialize_nonstreaming(
         152  +
    fn deserialize_nonstreaming_with_config(
  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_create_log_stream::de_create_log_stream_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::create_log_stream::CreateLogStreamError::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::create_log_stream::CreateLogStreamError::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  +
                "ResourceAlreadyExistsException" => crate::operation::create_log_stream::CreateLogStreamError::ResourceAlreadyExistsException({
         210  +
                    let mut tmp = match protocol
         211  +
                        .deserialize_response(response, crate::types::error::ResourceAlreadyExistsException::SCHEMA, _cfg)
         212  +
                        .and_then(|mut deser| {
         213  +
                            crate::types::error::ResourceAlreadyExistsException::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  +
                "ResourceNotFoundException" => crate::operation::create_log_stream::CreateLogStreamError::ResourceNotFoundException({
         234  +
                    let mut tmp = match protocol
         235  +
                        .deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
         236  +
                        .and_then(|mut deser| {
         237  +
                            crate::types::error::ResourceNotFoundException::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::create_log_stream::CreateLogStreamError::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::create_log_stream::CreateLogStreamError::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_create_log_stream::de_create_log_stream_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, CreateLogStream::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::create_log_stream::CreateLogStreamOutput::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 CreateLogStreamRequestSerializer;
  168    311   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateLogStreamRequestSerializer {
  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::create_log_stream::CreateLogStreamInput>()
  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::create_log_stream::CreateLogStreamInput,
  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::create_log_stream::CreateLogStreamInput,
  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.CreateLogStream",
  207         -
            );
  208         -
            builder
  209         -
        };
  210         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_log_stream::ser_create_log_stream_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, CreateLogStream::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 CreateLogStreamEndpointParamsInterceptor;
  220    333   
  221    334   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateLogStreamEndpointParamsInterceptor {
  222    335   
    fn name(&self) -> &'static str {
  223    336   
        "CreateLogStreamEndpointParamsInterceptor"
  224    337   
    }
  225    338   

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

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

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

@@ -1,1 +80,111 @@
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct CreateLogStreamOutput {
    6      6   
    _request_id: Option<String>,
    7      7   
}
    8      8   
static CREATELOGSTREAMOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
    9      9   
    "com.amazonaws.cloudwatchlogs.synthetic#CreateLogStreamOutput",
   10     10   
    "com.amazonaws.cloudwatchlogs.synthetic",
   11     11   
    "CreateLogStreamOutput",
   12     12   
);
   13         -
static CREATELOGSTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema =
   14         -
    ::aws_smithy_schema::Schema::new_struct(CREATELOGSTREAMOUTPUT_SCHEMA_ID, ::aws_smithy_schema::ShapeType::Structure, &[]);
          13  +
static CREATELOGSTREAMOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
          14  +
    ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
          15  +
    ::aws_smithy_schema::ShapeType::String,
          16  +
    "request_id",
          17  +
    0,
          18  +
)
          19  +
.with_http_header("x-amzn-requestid");
          20  +
static CREATELOGSTREAMOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
          21  +
    CREATELOGSTREAMOUTPUT_SCHEMA_ID,
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    &[&CREATELOGSTREAMOUTPUT_MEMBER__REQUEST_ID],
          24  +
);
   15     25   
impl CreateLogStreamOutput {
   16     26   
    /// The schema for this shape.
   17     27   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATELOGSTREAMOUTPUT_SCHEMA;
   18     28   
}
   19     29   
impl ::aws_smithy_schema::serde::SerializableStruct for CreateLogStreamOutput {
   20     30   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   21     31   
    fn serialize_members(
   22     32   
        &self,
   23     33   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   24     34   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   25     35   
        Ok(())
   26     36   
    }
   27     37   
}
   28     38   
impl CreateLogStreamOutput {
   29     39   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   30         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   31         -
        deserializer: &mut D,
          40  +
    pub fn deserialize(
          41  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   32     42   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   33     43   
        #[allow(unused_variables, unused_mut)]
   34     44   
        let mut builder = Self::builder();
   35     45   
        #[allow(
   36     46   
            unused_variables,
   37     47   
            unreachable_code,
   38     48   
            clippy::single_match,
   39     49   
            clippy::match_single_binding,
   40     50   
            clippy::diverging_sub_expression
   41     51   
        )]
   42         -
        deserializer.read_struct(&CREATELOGSTREAMOUTPUT_SCHEMA, (), |_, member, deser| {
          52  +
        deserializer.read_struct(&CREATELOGSTREAMOUTPUT_SCHEMA, &mut |member, deser| {
   43     53   
            match member.member_index() {
          54  +
                Some(0) => {
          55  +
                    builder._request_id = Some(deser.read_string(member)?);
          56  +
                }
   44     57   
                _ => {}
   45     58   
            }
   46     59   
            Ok(())
   47     60   
        })?;
   48     61   
        Ok(builder.build())
   49     62   
    }
   50     63   
}
          64  +
impl CreateLogStreamOutput {
          65  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          66  +
    /// Header-bound members are read directly from headers, avoiding runtime
          67  +
    /// member iteration overhead. Body members are read via the deserializer.
          68  +
    pub fn deserialize_with_response(
          69  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          70  +
        headers: &::aws_smithy_runtime_api::http::Headers,
          71  +
        _status: u16,
          72  +
        _body: &[u8],
          73  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          74  +
        #[allow(unused_variables, unused_mut)]
          75  +
        let mut builder = Self::builder();
          76  +
        if let Some(val) = headers.get("x-amzn-requestid") {
          77  +
            builder._request_id = Some(val.to_string());
          78  +
        }
          79  +
        Ok(builder.build())
          80  +
    }
          81  +
}
   51     82   
impl ::aws_types::request_id::RequestId for CreateLogStreamOutput {
   52     83   
    fn request_id(&self) -> Option<&str> {
   53     84   
        self._request_id.as_deref()
   54     85   
    }
   55     86   
}
   56     87   
impl CreateLogStreamOutput {
   57     88   
    /// Creates a new builder-style object to manufacture [`CreateLogStreamOutput`](crate::operation::create_log_stream::CreateLogStreamOutput).
   58     89   
    pub fn builder() -> crate::operation::create_log_stream::builders::CreateLogStreamOutputBuilder {
   59     90   
        crate::operation::create_log_stream::builders::CreateLogStreamOutputBuilder::default()
   60     91   
    }