Client Test

Client Test

rev. 97ba95e6039d206ffea5b866ddc214d34f7f88c3

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members/_operation_with_required_members_input.rs

@@ -1,1 +27,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct OperationWithRequiredMembersInput {}
           6  +
static OPERATIONWITHREQUIREDMEMBERSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
           7  +
    ::aws_smithy_schema::ShapeId::from_parts(
           8  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersInput",
           9  +
        "aws.protocoltests.json10.synthetic",
          10  +
        "OperationWithRequiredMembersInput",
          11  +
    ),
          12  +
    ::aws_smithy_schema::ShapeType::Structure,
          13  +
    &[],
          14  +
)
          15  +
.with_no_body_members()
          16  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload);
          17  +
impl OperationWithRequiredMembersInput {
          18  +
    /// The schema for this shape.
          19  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHREQUIREDMEMBERSINPUT_SCHEMA;
          20  +
}
          21  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithRequiredMembersInput {
          22  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          23  +
    fn serialize_members(
          24  +
        &self,
          25  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          26  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          27  +
        Ok(())
          28  +
    }
          29  +
}
          30  +
impl OperationWithRequiredMembersInput {
          31  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          32  +
    pub fn deserialize(
          33  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          34  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          35  +
        #[allow(unused_variables, unused_mut)]
          36  +
        let mut builder = Self::builder();
          37  +
        #[allow(
          38  +
            unused_variables,
          39  +
            unreachable_code,
          40  +
            clippy::single_match,
          41  +
            clippy::match_single_binding,
          42  +
            clippy::diverging_sub_expression
          43  +
        )]
          44  +
        deserializer.read_struct(&OPERATIONWITHREQUIREDMEMBERSINPUT_SCHEMA, &mut |member, deser| {
          45  +
            match member.member_index() {
          46  +
                _ => {}
          47  +
            }
          48  +
            Ok(())
          49  +
        })?;
          50  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          51  +
    }
          52  +
}
          53  +
impl OperationWithRequiredMembersInput {
          54  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          55  +
    pub fn deserialize_with_response(
          56  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          57  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          58  +
        _status: u16,
          59  +
        _body: &[u8],
          60  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          61  +
        Self::builder()
          62  +
            .build()
          63  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          64  +
    }
          65  +
}
    6     66   
impl OperationWithRequiredMembersInput {
    7     67   
    /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersInput`](crate::operation::operation_with_required_members::OperationWithRequiredMembersInput).
    8     68   
    pub fn builder() -> crate::operation::operation_with_required_members::builders::OperationWithRequiredMembersInputBuilder {
    9     69   
        crate::operation::operation_with_required_members::builders::OperationWithRequiredMembersInputBuilder::default()
   10     70   
    }
   11     71   
}
   12     72   
   13     73   
/// A builder for [`OperationWithRequiredMembersInput`](crate::operation::operation_with_required_members::OperationWithRequiredMembersInput).
   14     74   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   15     75   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members/_operation_with_required_members_output.rs

@@ -53,53 +112,452 @@
   73     73   
    }
   74     74   
    #[allow(missing_docs)] // documentation missing in model
   75     75   
    pub fn required_double(&self) -> f64 {
   76     76   
        self.required_double
   77     77   
    }
   78     78   
    #[allow(missing_docs)] // documentation missing in model
   79     79   
    pub fn required_map(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
   80     80   
        &self.required_map
   81     81   
    }
   82     82   
}
          83  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_STRING: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          84  +
    ::aws_smithy_schema::ShapeId::from_parts(
          85  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredString",
          86  +
        "aws.protocoltests.json10.synthetic",
          87  +
        "OperationWithRequiredMembersOutput",
          88  +
    ),
          89  +
    ::aws_smithy_schema::ShapeType::String,
          90  +
    "requiredString",
          91  +
    0,
          92  +
);
          93  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BOOLEAN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          94  +
    ::aws_smithy_schema::ShapeId::from_parts(
          95  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredBoolean",
          96  +
        "aws.protocoltests.json10.synthetic",
          97  +
        "OperationWithRequiredMembersOutput",
          98  +
    ),
          99  +
    ::aws_smithy_schema::ShapeType::Boolean,
         100  +
    "requiredBoolean",
         101  +
    1,
         102  +
);
         103  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         104  +
    ::aws_smithy_schema::ShapeId::from_parts(
         105  +
        "aws.protocoltests.json10#RequiredStringList$member",
         106  +
        "aws.protocoltests.json10",
         107  +
        "RequiredStringList",
         108  +
    ),
         109  +
    ::aws_smithy_schema::ShapeType::String,
         110  +
    "member",
         111  +
    0,
         112  +
);
         113  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         114  +
    ::aws_smithy_schema::ShapeId::from_parts(
         115  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredList",
         116  +
        "aws.protocoltests.json10.synthetic",
         117  +
        "OperationWithRequiredMembersOutput",
         118  +
    ),
         119  +
    ::aws_smithy_schema::ShapeType::List,
         120  +
    "requiredList",
         121  +
    2,
         122  +
)
         123  +
.with_list_member(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LIST_MEMBER);
         124  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_TIMESTAMP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         125  +
    ::aws_smithy_schema::ShapeId::from_parts(
         126  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredTimestamp",
         127  +
        "aws.protocoltests.json10.synthetic",
         128  +
        "OperationWithRequiredMembersOutput",
         129  +
    ),
         130  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         131  +
    "requiredTimestamp",
         132  +
    3,
         133  +
);
         134  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BLOB: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         135  +
    ::aws_smithy_schema::ShapeId::from_parts(
         136  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredBlob",
         137  +
        "aws.protocoltests.json10.synthetic",
         138  +
        "OperationWithRequiredMembersOutput",
         139  +
    ),
         140  +
    ::aws_smithy_schema::ShapeType::Blob,
         141  +
    "requiredBlob",
         142  +
    4,
         143  +
);
         144  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BYTE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         145  +
    ::aws_smithy_schema::ShapeId::from_parts(
         146  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredByte",
         147  +
        "aws.protocoltests.json10.synthetic",
         148  +
        "OperationWithRequiredMembersOutput",
         149  +
    ),
         150  +
    ::aws_smithy_schema::ShapeType::Byte,
         151  +
    "requiredByte",
         152  +
    5,
         153  +
);
         154  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_SHORT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         155  +
    ::aws_smithy_schema::ShapeId::from_parts(
         156  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredShort",
         157  +
        "aws.protocoltests.json10.synthetic",
         158  +
        "OperationWithRequiredMembersOutput",
         159  +
    ),
         160  +
    ::aws_smithy_schema::ShapeType::Short,
         161  +
    "requiredShort",
         162  +
    6,
         163  +
);
         164  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_INTEGER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         165  +
    ::aws_smithy_schema::ShapeId::from_parts(
         166  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredInteger",
         167  +
        "aws.protocoltests.json10.synthetic",
         168  +
        "OperationWithRequiredMembersOutput",
         169  +
    ),
         170  +
    ::aws_smithy_schema::ShapeType::Integer,
         171  +
    "requiredInteger",
         172  +
    7,
         173  +
);
         174  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LONG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         175  +
    ::aws_smithy_schema::ShapeId::from_parts(
         176  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredLong",
         177  +
        "aws.protocoltests.json10.synthetic",
         178  +
        "OperationWithRequiredMembersOutput",
         179  +
    ),
         180  +
    ::aws_smithy_schema::ShapeType::Long,
         181  +
    "requiredLong",
         182  +
    8,
         183  +
);
         184  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_FLOAT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         185  +
    ::aws_smithy_schema::ShapeId::from_parts(
         186  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredFloat",
         187  +
        "aws.protocoltests.json10.synthetic",
         188  +
        "OperationWithRequiredMembersOutput",
         189  +
    ),
         190  +
    ::aws_smithy_schema::ShapeType::Float,
         191  +
    "requiredFloat",
         192  +
    9,
         193  +
);
         194  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_DOUBLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         195  +
    ::aws_smithy_schema::ShapeId::from_parts(
         196  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredDouble",
         197  +
        "aws.protocoltests.json10.synthetic",
         198  +
        "OperationWithRequiredMembersOutput",
         199  +
    ),
         200  +
    ::aws_smithy_schema::ShapeType::Double,
         201  +
    "requiredDouble",
         202  +
    10,
         203  +
);
         204  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         205  +
    ::aws_smithy_schema::ShapeId::from_parts(
         206  +
        "aws.protocoltests.json10#RequiredStringMap$key",
         207  +
        "aws.protocoltests.json10",
         208  +
        "RequiredStringMap",
         209  +
    ),
         210  +
    ::aws_smithy_schema::ShapeType::String,
         211  +
    "key",
         212  +
    0,
         213  +
);
         214  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         215  +
    ::aws_smithy_schema::ShapeId::from_parts(
         216  +
        "aws.protocoltests.json10#RequiredStringMap$value",
         217  +
        "aws.protocoltests.json10",
         218  +
        "RequiredStringMap",
         219  +
    ),
         220  +
    ::aws_smithy_schema::ShapeType::String,
         221  +
    "value",
         222  +
    1,
         223  +
);
         224  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         225  +
    ::aws_smithy_schema::ShapeId::from_parts(
         226  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput$requiredMap",
         227  +
        "aws.protocoltests.json10.synthetic",
         228  +
        "OperationWithRequiredMembersOutput",
         229  +
    ),
         230  +
    ::aws_smithy_schema::ShapeType::Map,
         231  +
    "requiredMap",
         232  +
    11,
         233  +
)
         234  +
.with_map_members(
         235  +
    &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP_KEY,
         236  +
    &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP_VALUE,
         237  +
);
         238  +
static OPERATIONWITHREQUIREDMEMBERSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         239  +
    ::aws_smithy_schema::ShapeId::from_parts(
         240  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersOutput",
         241  +
        "aws.protocoltests.json10.synthetic",
         242  +
        "OperationWithRequiredMembersOutput",
         243  +
    ),
         244  +
    ::aws_smithy_schema::ShapeType::Structure,
         245  +
    &[
         246  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_STRING,
         247  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BOOLEAN,
         248  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LIST,
         249  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_TIMESTAMP,
         250  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BLOB,
         251  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BYTE,
         252  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_SHORT,
         253  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_INTEGER,
         254  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LONG,
         255  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_FLOAT,
         256  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_DOUBLE,
         257  +
        &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP,
         258  +
    ],
         259  +
)
         260  +
.with_original_name("OperationWithRequiredMembersOutput");
         261  +
impl OperationWithRequiredMembersOutput {
         262  +
    /// The schema for this shape.
         263  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHREQUIREDMEMBERSOUTPUT_SCHEMA;
         264  +
}
         265  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithRequiredMembersOutput {
         266  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         267  +
    fn serialize_members(
         268  +
        &self,
         269  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         270  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         271  +
        {
         272  +
            let val = &self.required_string;
         273  +
            ser.write_string(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_STRING, val)?;
         274  +
        }
         275  +
        {
         276  +
            let val = &self.required_boolean;
         277  +
            ser.write_boolean(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BOOLEAN, *val)?;
         278  +
        }
         279  +
        {
         280  +
            let val = &self.required_list;
         281  +
         282  +
            ser.write_list(
         283  +
                &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LIST,
         284  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         285  +
                    for item in val {
         286  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         287  +
                    }
         288  +
                    Ok(())
         289  +
                },
         290  +
            )?;
         291  +
        }
         292  +
        {
         293  +
            let val = &self.required_timestamp;
         294  +
            ser.write_timestamp(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_TIMESTAMP, val)?;
         295  +
        }
         296  +
        {
         297  +
            let val = &self.required_blob;
         298  +
            ser.write_blob(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BLOB, val.clone())?;
         299  +
        }
         300  +
        {
         301  +
            let val = &self.required_byte;
         302  +
            ser.write_byte(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_BYTE, *val)?;
         303  +
        }
         304  +
        {
         305  +
            let val = &self.required_short;
         306  +
            ser.write_short(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_SHORT, *val)?;
         307  +
        }
         308  +
        {
         309  +
            let val = &self.required_integer;
         310  +
            ser.write_integer(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_INTEGER, *val)?;
         311  +
        }
         312  +
        {
         313  +
            let val = &self.required_long;
         314  +
            ser.write_long(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_LONG, *val)?;
         315  +
        }
         316  +
        {
         317  +
            let val = &self.required_float;
         318  +
            ser.write_float(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_FLOAT, *val)?;
         319  +
        }
         320  +
        {
         321  +
            let val = &self.required_double;
         322  +
            ser.write_double(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_DOUBLE, *val)?;
         323  +
        }
         324  +
        {
         325  +
            let val = &self.required_map;
         326  +
         327  +
            ser.write_map(
         328  +
                &OPERATIONWITHREQUIREDMEMBERSOUTPUT_MEMBER_REQUIRED_MAP,
         329  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         330  +
                    for (key, value) in val {
         331  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         332  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         333  +
                    }
         334  +
                    Ok(())
         335  +
                },
         336  +
            )?;
         337  +
        }
         338  +
        Ok(())
         339  +
    }
         340  +
}
         341  +
impl OperationWithRequiredMembersOutput {
         342  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         343  +
    pub fn deserialize(
         344  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         345  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         346  +
        #[allow(unused_variables, unused_mut)]
         347  +
        let mut builder = Self::builder();
         348  +
        #[allow(
         349  +
            unused_variables,
         350  +
            unreachable_code,
         351  +
            clippy::single_match,
         352  +
            clippy::match_single_binding,
         353  +
            clippy::diverging_sub_expression
         354  +
        )]
         355  +
        deserializer.read_struct(&OPERATIONWITHREQUIREDMEMBERSOUTPUT_SCHEMA, &mut |member, deser| {
         356  +
            match member.member_index() {
         357  +
                Some(0) => {
         358  +
                    builder.required_string = Some(deser.read_string(member)?);
         359  +
                }
         360  +
                Some(1) => {
         361  +
                    builder.required_boolean = Some(deser.read_boolean(member)?);
         362  +
                }
         363  +
                Some(2) => {
         364  +
                    builder.required_list = Some(deser.read_string_list(member)?);
         365  +
                }
         366  +
                Some(3) => {
         367  +
                    builder.required_timestamp = Some(deser.read_timestamp(member)?);
         368  +
                }
         369  +
                Some(4) => {
         370  +
                    builder.required_blob = Some(deser.read_blob(member)?);
         371  +
                }
         372  +
                Some(5) => {
         373  +
                    builder.required_byte = Some(deser.read_byte(member)?);
         374  +
                }
         375  +
                Some(6) => {
         376  +
                    builder.required_short = Some(deser.read_short(member)?);
         377  +
                }
         378  +
                Some(7) => {
         379  +
                    builder.required_integer = Some(deser.read_integer(member)?);
         380  +
                }
         381  +
                Some(8) => {
         382  +
                    builder.required_long = Some(deser.read_long(member)?);
         383  +
                }
         384  +
                Some(9) => {
         385  +
                    builder.required_float = Some(deser.read_float(member)?);
         386  +
                }
         387  +
                Some(10) => {
         388  +
                    builder.required_double = Some(deser.read_double(member)?);
         389  +
                }
         390  +
                Some(11) => {
         391  +
                    builder.required_map = Some(deser.read_string_string_map(member)?);
         392  +
                }
         393  +
                _ => {}
         394  +
            }
         395  +
            Ok(())
         396  +
        })?;
         397  +
        builder.required_string = builder.required_string.or(Some(String::new()));
         398  +
        builder.required_boolean = builder.required_boolean.or(Some(false));
         399  +
        builder.required_list = builder.required_list.or(Some(Vec::new()));
         400  +
        builder.required_timestamp = builder.required_timestamp.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
         401  +
        builder.required_blob = builder.required_blob.or(Some(::aws_smithy_types::Blob::new("")));
         402  +
        builder.required_byte = builder.required_byte.or(Some(0i8));
         403  +
        builder.required_short = builder.required_short.or(Some(0i16));
         404  +
        builder.required_integer = builder.required_integer.or(Some(0i32));
         405  +
        builder.required_long = builder.required_long.or(Some(0i64));
         406  +
        builder.required_float = builder.required_float.or(Some(0.0f32));
         407  +
        builder.required_double = builder.required_double.or(Some(0.0f64));
         408  +
        builder.required_map = builder.required_map.or(Some(::std::collections::HashMap::new()));
         409  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         410  +
    }
         411  +
}
         412  +
impl OperationWithRequiredMembersOutput {
         413  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         414  +
    pub fn deserialize_with_response(
         415  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         416  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         417  +
        _status: u16,
         418  +
        _body: &[u8],
         419  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         420  +
        Self::deserialize(deserializer)
         421  +
    }
         422  +
}
   83    423   
impl OperationWithRequiredMembersOutput {
   84    424   
    /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersOutput`](crate::operation::operation_with_required_members::OperationWithRequiredMembersOutput).
   85    425   
    pub fn builder() -> crate::operation::operation_with_required_members::builders::OperationWithRequiredMembersOutputBuilder {
   86    426   
        crate::operation::operation_with_required_members::builders::OperationWithRequiredMembersOutputBuilder::default()
   87    427   
    }
   88    428   
}
   89    429   
   90    430   
/// A builder for [`OperationWithRequiredMembersOutput`](crate::operation::operation_with_required_members::OperationWithRequiredMembersOutput).
   91    431   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   92    432   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members_with_defaults.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 `OperationWithRequiredMembersWithDefaults`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct OperationWithRequiredMembersWithDefaults;
    6      6   
impl OperationWithRequiredMembersWithDefaults {
    7      7   
    /// Creates a new `OperationWithRequiredMembersWithDefaults`
    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<'static> =
          13  +
        crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsOutput::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::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -120,126 +247,255 @@
  140    146   
  141    147   
#[derive(Debug)]
  142    148   
struct OperationWithRequiredMembersWithDefaultsResponseDeserializer;
  143    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithRequiredMembersWithDefaultsResponseDeserializer {
  144    150   
    fn deserialize_nonstreaming_with_config(
  145    151   
        &self,
  146    152   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  147    153   
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  148    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  149    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  150         -
        let headers = response.headers();
         156  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         157  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         158  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         159  +
        // loads `body` before firing this hook.
  151    160   
        let body = response.body().bytes().expect("body loaded");
         161  +
        let headers = response.headers();
  152    162   
        #[allow(unused_mut)]
  153    163   
        let mut force_error = false;
  154    164   
  155         -
        let parse_result = if !success && status != 200 || force_error {
  156         -
            crate::protocol_serde::shape_operation_with_required_members_with_defaults::de_operation_with_required_members_with_defaults_http_error(
  157         -
                status, headers, body,
  158         -
            )
         165  +
        if !success && status != 200 || force_error {
         166  +
            let protocol = _cfg
         167  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         168  +
                .expect("a SharedClientProtocol is required");
         169  +
            #[allow(unused_mut)]
         170  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         171  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         172  +
            })?;
         173  +
         174  +
            let generic = generic_builder.build();
         175  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         176  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         177  +
                    crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsError::generic(generic),
         178  +
                ),
         179  +
            ))
  159    180   
        } else {
  160         -
            crate::protocol_serde::shape_operation_with_required_members_with_defaults::de_operation_with_required_members_with_defaults_http_response(
  161         -
                status, headers, body,
  162         -
            )
  163         -
        };
  164         -
        crate::protocol_serde::type_erase_result(parse_result)
         181  +
            let protocol = _cfg
         182  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         183  +
                .expect("a SharedClientProtocol is required");
         184  +
            let mut deser = protocol
         185  +
                .deserialize_response(response, OperationWithRequiredMembersWithDefaults::OUTPUT_SCHEMA, _cfg)
         186  +
                .map_err(|e| {
         187  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         188  +
                })?;
         189  +
            // body and headers are already in scope from the top of the function;
         190  +
            // alias `headers` as `_response_headers` so MutateOutput
         191  +
            // customizations have a stable name to read from.
         192  +
            let _response_headers = headers;
         193  +
            #[allow(unused_mut)]
         194  +
                let mut output = crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsOutput::deserialize_with_response(
         195  +
                    &mut *deser,
         196  +
                    _response_headers,
         197  +
                    response.status().into(),
         198  +
                    body,
         199  +
                ).map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
         200  +
         201  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         202  +
        }
  165    203   
    }
  166    204   
}
  167    205   
#[derive(Debug)]
  168    206   
struct OperationWithRequiredMembersWithDefaultsRequestSerializer;
  169    207   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithRequiredMembersWithDefaultsRequestSerializer {
  170    208   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  171    209   
    fn serialize_input(
  172    210   
        &self,
  173    211   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  174    212   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  175    213   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  176    214   
        let input = input
  177    215   
            .downcast::<crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput>()
  178    216   
            .expect("correct type");
  179         -
        let _header_serialization_settings = _cfg
  180         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  181         -
            .cloned()
  182         -
            .unwrap_or_default();
  183         -
        let mut request_builder = {
  184         -
            #[allow(clippy::uninlined_format_args)]
  185         -
            fn uri_base(
  186         -
                _input: &crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput,
  187         -
                output: &mut ::std::string::String,
  188         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  189         -
                use ::std::fmt::Write as _;
  190         -
                ::std::write!(output, "/").expect("formatting should succeed");
  191         -
                ::std::result::Result::Ok(())
  192         -
            }
  193         -
            #[allow(clippy::unnecessary_wraps)]
  194         -
            fn update_http_builder(
  195         -
                input: &crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput,
  196         -
                builder: ::http_1x::request::Builder,
  197         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  198         -
                let mut uri = ::std::string::String::new();
  199         -
                uri_base(input, &mut uri)?;
  200         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  201         -
            }
  202         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  203         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  204         -
            builder = _header_serialization_settings.set_default_header(
  205         -
                builder,
  206         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  207         -
                "JsonRpc10.OperationWithRequiredMembersWithDefaults",
  208         -
            );
  209         -
            builder
  210         -
        };
  211         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  212         -
            crate::protocol_serde::shape_operation_with_required_members_with_defaults::ser_operation_with_required_members_with_defaults_input(
  213         -
                &input,
  214         -
            )?,
  215         -
        );
  216    217   
  217         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         218  +
        let protocol = _cfg
         219  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         220  +
            .expect("a SharedClientProtocol is required");
         221  +
        let mut request = protocol
         222  +
            .serialize_request(&input, OperationWithRequiredMembersWithDefaults::INPUT_SCHEMA, "/", _cfg)
         223  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         224  +
         225  +
        return ::std::result::Result::Ok(request);
  218    226   
    }
  219    227   
}
  220    228   
#[derive(Debug)]
  221    229   
struct OperationWithRequiredMembersWithDefaultsEndpointParamsInterceptor;
  222    230   
  223    231   
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
  224    232   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithRequiredMembersWithDefaultsEndpointParamsInterceptor {
  225    233   
    fn name(&self) -> &'static str {
  226    234   
        "OperationWithRequiredMembersWithDefaultsEndpointParamsInterceptor"
  227    235   
    }
@@ -276,284 +335,350 @@
  296    304   
  297    305   
        let op = crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaults::new();
  298    306   
        let config = op.config().expect("the operation has config");
  299    307   
        let de = config
  300    308   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  301    309   
            .expect("the config must have a deserializer");
  302    310   
  303    311   
        // Build a config bag with the protocol for schema-based deserialization
  304    312   
        #[allow(unused_mut)]
  305    313   
        let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         314  +
        {
         315  +
            let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         316  +
            layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         317  +
                ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_0().with_target_prefix("JsonRpc10"),
         318  +
            ));
         319  +
            test_cfg.push_shared_layer(layer.freeze());
         320  +
        }
  306    321   
  307    322   
        let parsed = de.deserialize_streaming(&mut http_response);
  308    323   
        let parsed = parsed.unwrap_or_else(|| {
  309    324   
            let http_response = http_response.map(|body| {
  310    325   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  311    326   
                    body.bytes().unwrap(),
  312    327   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  313    328   
                )))
  314    329   
            });
  315    330   
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members_with_defaults/_operation_with_required_members_with_defaults_input.rs

@@ -1,1 +28,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5      5   
pub struct OperationWithRequiredMembersWithDefaultsInput {}
           6  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
           7  +
    ::aws_smithy_schema::ShapeId::from_parts(
           8  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsInput",
           9  +
        "aws.protocoltests.json10.synthetic",
          10  +
        "OperationWithRequiredMembersWithDefaultsInput",
          11  +
    ),
          12  +
    ::aws_smithy_schema::ShapeType::Structure,
          13  +
    &[],
          14  +
)
          15  +
.with_no_body_members()
          16  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload);
          17  +
impl OperationWithRequiredMembersWithDefaultsInput {
          18  +
    /// The schema for this shape.
          19  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSINPUT_SCHEMA;
          20  +
}
          21  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithRequiredMembersWithDefaultsInput {
          22  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          23  +
    fn serialize_members(
          24  +
        &self,
          25  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          26  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          27  +
        Ok(())
          28  +
    }
          29  +
}
          30  +
impl OperationWithRequiredMembersWithDefaultsInput {
          31  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          32  +
    pub fn deserialize(
          33  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          34  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          35  +
        #[allow(unused_variables, unused_mut)]
          36  +
        let mut builder = Self::builder();
          37  +
        #[allow(
          38  +
            unused_variables,
          39  +
            unreachable_code,
          40  +
            clippy::single_match,
          41  +
            clippy::match_single_binding,
          42  +
            clippy::diverging_sub_expression
          43  +
        )]
          44  +
        deserializer.read_struct(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSINPUT_SCHEMA, &mut |member, deser| {
          45  +
            match member.member_index() {
          46  +
                _ => {}
          47  +
            }
          48  +
            Ok(())
          49  +
        })?;
          50  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          51  +
    }
          52  +
}
          53  +
impl OperationWithRequiredMembersWithDefaultsInput {
          54  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          55  +
    pub fn deserialize_with_response(
          56  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          57  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          58  +
        _status: u16,
          59  +
        _body: &[u8],
          60  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          61  +
        Self::builder()
          62  +
            .build()
          63  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          64  +
    }
          65  +
}
    6     66   
impl OperationWithRequiredMembersWithDefaultsInput {
    7     67   
    /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersWithDefaultsInput`](crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput).
    8     68   
    pub fn builder() -> crate::operation::operation_with_required_members_with_defaults::builders::OperationWithRequiredMembersWithDefaultsInputBuilder
    9     69   
    {
   10     70   
        crate::operation::operation_with_required_members_with_defaults::builders::OperationWithRequiredMembersWithDefaultsInputBuilder::default()
   11     71   
    }
   12     72   
}
   13     73   
   14     74   
/// A builder for [`OperationWithRequiredMembersWithDefaultsInput`](crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsInput).
   15     75   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members_with_defaults/_operation_with_required_members_with_defaults_output.rs

@@ -65,65 +124,505 @@
   85     85   
    }
   86     86   
    #[allow(missing_docs)] // documentation missing in model
   87     87   
    pub fn required_enum(&self) -> &crate::types::RequiredEnum {
   88     88   
        &self.required_enum
   89     89   
    }
   90     90   
    #[allow(missing_docs)] // documentation missing in model
   91     91   
    pub fn required_int_enum(&self) -> i32 {
   92     92   
        self.required_int_enum
   93     93   
    }
   94     94   
}
          95  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_STRING: ::aws_smithy_schema::Schema<'static> =
          96  +
    ::aws_smithy_schema::Schema::new_member(
          97  +
        ::aws_smithy_schema::ShapeId::from_parts(
          98  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredString",
          99  +
            "aws.protocoltests.json10.synthetic",
         100  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         101  +
        ),
         102  +
        ::aws_smithy_schema::ShapeType::String,
         103  +
        "requiredString",
         104  +
        0,
         105  +
    );
         106  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BOOLEAN: ::aws_smithy_schema::Schema<'static> =
         107  +
    ::aws_smithy_schema::Schema::new_member(
         108  +
        ::aws_smithy_schema::ShapeId::from_parts(
         109  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredBoolean",
         110  +
            "aws.protocoltests.json10.synthetic",
         111  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         112  +
        ),
         113  +
        ::aws_smithy_schema::ShapeType::Boolean,
         114  +
        "requiredBoolean",
         115  +
        1,
         116  +
    );
         117  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> =
         118  +
    ::aws_smithy_schema::Schema::new_member(
         119  +
        ::aws_smithy_schema::ShapeId::from_parts(
         120  +
            "aws.protocoltests.json10#RequiredStringList$member",
         121  +
            "aws.protocoltests.json10",
         122  +
            "RequiredStringList",
         123  +
        ),
         124  +
        ::aws_smithy_schema::ShapeType::String,
         125  +
        "member",
         126  +
        0,
         127  +
    );
         128  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LIST: ::aws_smithy_schema::Schema<'static> =
         129  +
    ::aws_smithy_schema::Schema::new_member(
         130  +
        ::aws_smithy_schema::ShapeId::from_parts(
         131  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredList",
         132  +
            "aws.protocoltests.json10.synthetic",
         133  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         134  +
        ),
         135  +
        ::aws_smithy_schema::ShapeType::List,
         136  +
        "requiredList",
         137  +
        2,
         138  +
    )
         139  +
    .with_list_member(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LIST_MEMBER);
         140  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_TIMESTAMP: ::aws_smithy_schema::Schema<'static> =
         141  +
    ::aws_smithy_schema::Schema::new_member(
         142  +
        ::aws_smithy_schema::ShapeId::from_parts(
         143  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredTimestamp",
         144  +
            "aws.protocoltests.json10.synthetic",
         145  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         146  +
        ),
         147  +
        ::aws_smithy_schema::ShapeType::Timestamp,
         148  +
        "requiredTimestamp",
         149  +
        3,
         150  +
    );
         151  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BLOB: ::aws_smithy_schema::Schema<'static> =
         152  +
    ::aws_smithy_schema::Schema::new_member(
         153  +
        ::aws_smithy_schema::ShapeId::from_parts(
         154  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredBlob",
         155  +
            "aws.protocoltests.json10.synthetic",
         156  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         157  +
        ),
         158  +
        ::aws_smithy_schema::ShapeType::Blob,
         159  +
        "requiredBlob",
         160  +
        4,
         161  +
    );
         162  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BYTE: ::aws_smithy_schema::Schema<'static> =
         163  +
    ::aws_smithy_schema::Schema::new_member(
         164  +
        ::aws_smithy_schema::ShapeId::from_parts(
         165  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredByte",
         166  +
            "aws.protocoltests.json10.synthetic",
         167  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         168  +
        ),
         169  +
        ::aws_smithy_schema::ShapeType::Byte,
         170  +
        "requiredByte",
         171  +
        5,
         172  +
    );
         173  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_SHORT: ::aws_smithy_schema::Schema<'static> =
         174  +
    ::aws_smithy_schema::Schema::new_member(
         175  +
        ::aws_smithy_schema::ShapeId::from_parts(
         176  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredShort",
         177  +
            "aws.protocoltests.json10.synthetic",
         178  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         179  +
        ),
         180  +
        ::aws_smithy_schema::ShapeType::Short,
         181  +
        "requiredShort",
         182  +
        6,
         183  +
    );
         184  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INTEGER: ::aws_smithy_schema::Schema<'static> =
         185  +
    ::aws_smithy_schema::Schema::new_member(
         186  +
        ::aws_smithy_schema::ShapeId::from_parts(
         187  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredInteger",
         188  +
            "aws.protocoltests.json10.synthetic",
         189  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         190  +
        ),
         191  +
        ::aws_smithy_schema::ShapeType::Integer,
         192  +
        "requiredInteger",
         193  +
        7,
         194  +
    );
         195  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LONG: ::aws_smithy_schema::Schema<'static> =
         196  +
    ::aws_smithy_schema::Schema::new_member(
         197  +
        ::aws_smithy_schema::ShapeId::from_parts(
         198  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredLong",
         199  +
            "aws.protocoltests.json10.synthetic",
         200  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         201  +
        ),
         202  +
        ::aws_smithy_schema::ShapeType::Long,
         203  +
        "requiredLong",
         204  +
        8,
         205  +
    );
         206  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_FLOAT: ::aws_smithy_schema::Schema<'static> =
         207  +
    ::aws_smithy_schema::Schema::new_member(
         208  +
        ::aws_smithy_schema::ShapeId::from_parts(
         209  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredFloat",
         210  +
            "aws.protocoltests.json10.synthetic",
         211  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         212  +
        ),
         213  +
        ::aws_smithy_schema::ShapeType::Float,
         214  +
        "requiredFloat",
         215  +
        9,
         216  +
    );
         217  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_DOUBLE: ::aws_smithy_schema::Schema<'static> =
         218  +
    ::aws_smithy_schema::Schema::new_member(
         219  +
        ::aws_smithy_schema::ShapeId::from_parts(
         220  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredDouble",
         221  +
            "aws.protocoltests.json10.synthetic",
         222  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         223  +
        ),
         224  +
        ::aws_smithy_schema::ShapeType::Double,
         225  +
        "requiredDouble",
         226  +
        10,
         227  +
    );
         228  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP_KEY: ::aws_smithy_schema::Schema<'static> =
         229  +
    ::aws_smithy_schema::Schema::new_member(
         230  +
        ::aws_smithy_schema::ShapeId::from_parts(
         231  +
            "aws.protocoltests.json10#RequiredStringMap$key",
         232  +
            "aws.protocoltests.json10",
         233  +
            "RequiredStringMap",
         234  +
        ),
         235  +
        ::aws_smithy_schema::ShapeType::String,
         236  +
        "key",
         237  +
        0,
         238  +
    );
         239  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP_VALUE: ::aws_smithy_schema::Schema<'static> =
         240  +
    ::aws_smithy_schema::Schema::new_member(
         241  +
        ::aws_smithy_schema::ShapeId::from_parts(
         242  +
            "aws.protocoltests.json10#RequiredStringMap$value",
         243  +
            "aws.protocoltests.json10",
         244  +
            "RequiredStringMap",
         245  +
        ),
         246  +
        ::aws_smithy_schema::ShapeType::String,
         247  +
        "value",
         248  +
        1,
         249  +
    );
         250  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP: ::aws_smithy_schema::Schema<'static> =
         251  +
    ::aws_smithy_schema::Schema::new_member(
         252  +
        ::aws_smithy_schema::ShapeId::from_parts(
         253  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredMap",
         254  +
            "aws.protocoltests.json10.synthetic",
         255  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         256  +
        ),
         257  +
        ::aws_smithy_schema::ShapeType::Map,
         258  +
        "requiredMap",
         259  +
        11,
         260  +
    )
         261  +
    .with_map_members(
         262  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP_KEY,
         263  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP_VALUE,
         264  +
    );
         265  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_ENUM: ::aws_smithy_schema::Schema<'static> =
         266  +
    ::aws_smithy_schema::Schema::new_member(
         267  +
        ::aws_smithy_schema::ShapeId::from_parts(
         268  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredEnum",
         269  +
            "aws.protocoltests.json10.synthetic",
         270  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         271  +
        ),
         272  +
        ::aws_smithy_schema::ShapeType::String,
         273  +
        "requiredEnum",
         274  +
        12,
         275  +
    );
         276  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INT_ENUM: ::aws_smithy_schema::Schema<'static> =
         277  +
    ::aws_smithy_schema::Schema::new_member(
         278  +
        ::aws_smithy_schema::ShapeId::from_parts(
         279  +
            "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput$requiredIntEnum",
         280  +
            "aws.protocoltests.json10.synthetic",
         281  +
            "OperationWithRequiredMembersWithDefaultsOutput",
         282  +
        ),
         283  +
        ::aws_smithy_schema::ShapeType::Integer,
         284  +
        "requiredIntEnum",
         285  +
        13,
         286  +
    );
         287  +
static OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         288  +
    ::aws_smithy_schema::ShapeId::from_parts(
         289  +
        "aws.protocoltests.json10.synthetic#OperationWithRequiredMembersWithDefaultsOutput",
         290  +
        "aws.protocoltests.json10.synthetic",
         291  +
        "OperationWithRequiredMembersWithDefaultsOutput",
         292  +
    ),
         293  +
    ::aws_smithy_schema::ShapeType::Structure,
         294  +
    &[
         295  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_STRING,
         296  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BOOLEAN,
         297  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LIST,
         298  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_TIMESTAMP,
         299  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BLOB,
         300  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BYTE,
         301  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_SHORT,
         302  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INTEGER,
         303  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LONG,
         304  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_FLOAT,
         305  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_DOUBLE,
         306  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP,
         307  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_ENUM,
         308  +
        &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INT_ENUM,
         309  +
    ],
         310  +
)
         311  +
.with_original_name("OperationWithRequiredMembersWithDefaultsOutput");
         312  +
impl OperationWithRequiredMembersWithDefaultsOutput {
         313  +
    /// The schema for this shape.
         314  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_SCHEMA;
         315  +
}
         316  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithRequiredMembersWithDefaultsOutput {
         317  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         318  +
    fn serialize_members(
         319  +
        &self,
         320  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         321  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         322  +
        {
         323  +
            let val = &self.required_string;
         324  +
            ser.write_string(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_STRING, val)?;
         325  +
        }
         326  +
        {
         327  +
            let val = &self.required_boolean;
         328  +
            ser.write_boolean(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BOOLEAN, *val)?;
         329  +
        }
         330  +
        {
         331  +
            let val = &self.required_list;
         332  +
         333  +
            ser.write_list(
         334  +
                &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LIST,
         335  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         336  +
                    for item in val {
         337  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         338  +
                    }
         339  +
                    Ok(())
         340  +
                },
         341  +
            )?;
         342  +
        }
         343  +
        {
         344  +
            let val = &self.required_timestamp;
         345  +
            ser.write_timestamp(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_TIMESTAMP, val)?;
         346  +
        }
         347  +
        {
         348  +
            let val = &self.required_blob;
         349  +
            ser.write_blob(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BLOB, val.clone())?;
         350  +
        }
         351  +
        {
         352  +
            let val = &self.required_byte;
         353  +
            ser.write_byte(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_BYTE, *val)?;
         354  +
        }
         355  +
        {
         356  +
            let val = &self.required_short;
         357  +
            ser.write_short(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_SHORT, *val)?;
         358  +
        }
         359  +
        {
         360  +
            let val = &self.required_integer;
         361  +
            ser.write_integer(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INTEGER, *val)?;
         362  +
        }
         363  +
        {
         364  +
            let val = &self.required_long;
         365  +
            ser.write_long(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_LONG, *val)?;
         366  +
        }
         367  +
        {
         368  +
            let val = &self.required_float;
         369  +
            ser.write_float(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_FLOAT, *val)?;
         370  +
        }
         371  +
        {
         372  +
            let val = &self.required_double;
         373  +
            ser.write_double(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_DOUBLE, *val)?;
         374  +
        }
         375  +
        {
         376  +
            let val = &self.required_map;
         377  +
         378  +
            ser.write_map(
         379  +
                &OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_MAP,
         380  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         381  +
                    for (key, value) in val {
         382  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         383  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         384  +
                    }
         385  +
                    Ok(())
         386  +
                },
         387  +
            )?;
         388  +
        }
         389  +
        {
         390  +
            let val = &self.required_enum;
         391  +
            ser.write_string(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_ENUM, val.as_str())?;
         392  +
        }
         393  +
        {
         394  +
            let val = &self.required_int_enum;
         395  +
            ser.write_integer(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_MEMBER_REQUIRED_INT_ENUM, *val)?;
         396  +
        }
         397  +
        Ok(())
         398  +
    }
         399  +
}
         400  +
impl OperationWithRequiredMembersWithDefaultsOutput {
         401  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         402  +
    pub fn deserialize(
         403  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         404  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         405  +
        #[allow(unused_variables, unused_mut)]
         406  +
        let mut builder = Self::builder();
         407  +
        #[allow(
         408  +
            unused_variables,
         409  +
            unreachable_code,
         410  +
            clippy::single_match,
         411  +
            clippy::match_single_binding,
         412  +
            clippy::diverging_sub_expression
         413  +
        )]
         414  +
        deserializer.read_struct(&OPERATIONWITHREQUIREDMEMBERSWITHDEFAULTSOUTPUT_SCHEMA, &mut |member, deser| {
         415  +
            match member.member_index() {
         416  +
                Some(0) => {
         417  +
                    builder.required_string = Some(deser.read_string(member)?);
         418  +
                }
         419  +
                Some(1) => {
         420  +
                    builder.required_boolean = Some(deser.read_boolean(member)?);
         421  +
                }
         422  +
                Some(2) => {
         423  +
                    builder.required_list = Some(deser.read_string_list(member)?);
         424  +
                }
         425  +
                Some(3) => {
         426  +
                    builder.required_timestamp = Some(deser.read_timestamp(member)?);
         427  +
                }
         428  +
                Some(4) => {
         429  +
                    builder.required_blob = Some(deser.read_blob(member)?);
         430  +
                }
         431  +
                Some(5) => {
         432  +
                    builder.required_byte = Some(deser.read_byte(member)?);
         433  +
                }
         434  +
                Some(6) => {
         435  +
                    builder.required_short = Some(deser.read_short(member)?);
         436  +
                }
         437  +
                Some(7) => {
         438  +
                    builder.required_integer = Some(deser.read_integer(member)?);
         439  +
                }
         440  +
                Some(8) => {
         441  +
                    builder.required_long = Some(deser.read_long(member)?);
         442  +
                }
         443  +
                Some(9) => {
         444  +
                    builder.required_float = Some(deser.read_float(member)?);
         445  +
                }
         446  +
                Some(10) => {
         447  +
                    builder.required_double = Some(deser.read_double(member)?);
         448  +
                }
         449  +
                Some(11) => {
         450  +
                    builder.required_map = Some(deser.read_string_string_map(member)?);
         451  +
                }
         452  +
                Some(12) => {
         453  +
                    builder.required_enum = Some(crate::types::RequiredEnum::from(deser.read_string(member)?.as_str()));
         454  +
                }
         455  +
                Some(13) => {
         456  +
                    builder.required_int_enum = Some(deser.read_integer(member)?);
         457  +
                }
         458  +
                _ => {}
         459  +
            }
         460  +
            Ok(())
         461  +
        })?;
         462  +
        Ok(builder.build())
         463  +
    }
         464  +
}
         465  +
impl OperationWithRequiredMembersWithDefaultsOutput {
         466  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         467  +
    pub fn deserialize_with_response(
         468  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         469  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         470  +
        _status: u16,
         471  +
        _body: &[u8],
         472  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         473  +
        Self::deserialize(deserializer)
         474  +
    }
         475  +
}
   95    476   
impl OperationWithRequiredMembersWithDefaultsOutput {
   96    477   
    /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersWithDefaultsOutput`](crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsOutput).
   97    478   
    pub fn builder(
   98    479   
    ) -> crate::operation::operation_with_required_members_with_defaults::builders::OperationWithRequiredMembersWithDefaultsOutputBuilder {
   99    480   
        crate::operation::operation_with_required_members_with_defaults::builders::OperationWithRequiredMembersWithDefaultsOutputBuilder::default()
  100    481   
    }
  101    482   
}
  102    483   
  103    484   
/// A builder for [`OperationWithRequiredMembersWithDefaultsOutput`](crate::operation::operation_with_required_members_with_defaults::OperationWithRequiredMembersWithDefaultsOutput).
  104    485   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/put_with_content_encoding.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 `PutWithContentEncoding`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct PutWithContentEncoding;
    6      6   
impl PutWithContentEncoding {
    7      7   
    /// Creates a new `PutWithContentEncoding`
    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<'static> =
          13  +
        crate::operation::put_with_content_encoding::PutWithContentEncodingInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput::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::put_with_content_encoding::PutWithContentEncodingInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::put_with_content_encoding::PutWithContentEncodingOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::put_with_content_encoding::PutWithContentEncodingError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -171,177 +295,309 @@
  191    197   
}
  192    198   
#[derive(Debug)]
  193    199   
struct PutWithContentEncodingResponseDeserializer;
  194    200   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PutWithContentEncodingResponseDeserializer {
  195    201   
    fn deserialize_nonstreaming_with_config(
  196    202   
        &self,
  197    203   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  198    204   
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  199    205   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  200    206   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  201         -
        let headers = response.headers();
         207  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         208  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         209  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         210  +
        // loads `body` before firing this hook.
  202    211   
        let body = response.body().bytes().expect("body loaded");
         212  +
        let headers = response.headers();
  203    213   
        #[allow(unused_mut)]
  204    214   
        let mut force_error = false;
  205    215   
  206         -
        let parse_result = if !success && status != 200 || force_error {
  207         -
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_error(status, headers, body)
         216  +
        if !success && status != 200 || force_error {
         217  +
            let protocol = _cfg
         218  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         219  +
                .expect("a SharedClientProtocol is required");
         220  +
            #[allow(unused_mut)]
         221  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         222  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         223  +
            })?;
         224  +
         225  +
            let generic = generic_builder.build();
         226  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         227  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         228  +
                    crate::operation::put_with_content_encoding::PutWithContentEncodingError::generic(generic),
         229  +
                ),
         230  +
            ))
  208    231   
        } else {
  209         -
            crate::protocol_serde::shape_put_with_content_encoding::de_put_with_content_encoding_http_response(status, headers, body)
  210         -
        };
  211         -
        crate::protocol_serde::type_erase_result(parse_result)
         232  +
            let protocol = _cfg
         233  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         234  +
                .expect("a SharedClientProtocol is required");
         235  +
            let mut deser = protocol
         236  +
                .deserialize_response(response, PutWithContentEncoding::OUTPUT_SCHEMA, _cfg)
         237  +
                .map_err(|e| {
         238  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         239  +
                })?;
         240  +
            // body and headers are already in scope from the top of the function;
         241  +
            // alias `headers` as `_response_headers` so MutateOutput
         242  +
            // customizations have a stable name to read from.
         243  +
            let _response_headers = headers;
         244  +
            #[allow(unused_mut)]
         245  +
            let mut output = crate::operation::put_with_content_encoding::PutWithContentEncodingOutput::deserialize_with_response(
         246  +
                &mut *deser,
         247  +
                _response_headers,
         248  +
                response.status().into(),
         249  +
                body,
         250  +
            )
         251  +
            .map_err(|e| {
         252  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         253  +
            })?;
         254  +
         255  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         256  +
        }
  212    257   
    }
  213    258   
}
  214    259   
#[derive(Debug)]
  215    260   
struct PutWithContentEncodingRequestSerializer;
  216    261   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PutWithContentEncodingRequestSerializer {
  217    262   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  218    263   
    fn serialize_input(
  219    264   
        &self,
  220    265   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  221    266   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    267   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  223    268   
        let input = input
  224    269   
            .downcast::<crate::operation::put_with_content_encoding::PutWithContentEncodingInput>()
  225    270   
            .expect("correct type");
  226         -
        let _header_serialization_settings = _cfg
  227         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  228         -
            .cloned()
  229         -
            .unwrap_or_default();
  230         -
        let mut request_builder = {
  231         -
            #[allow(clippy::uninlined_format_args)]
  232         -
            fn uri_base(
  233         -
                _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  234         -
                output: &mut ::std::string::String,
  235         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  236         -
                use ::std::fmt::Write as _;
  237         -
                ::std::write!(output, "/").expect("formatting should succeed");
  238         -
                ::std::result::Result::Ok(())
  239         -
            }
  240         -
            #[allow(clippy::unnecessary_wraps)]
  241         -
            fn update_http_builder(
  242         -
                input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  243         -
                builder: ::http_1x::request::Builder,
  244         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  245         -
                let mut uri = ::std::string::String::new();
  246         -
                uri_base(input, &mut uri)?;
  247         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  248         -
            }
  249         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  250         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  251         -
            builder = _header_serialization_settings.set_default_header(
  252         -
                builder,
  253         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  254         -
                "JsonRpc10.PutWithContentEncoding",
  255         -
            );
  256         -
            builder
  257         -
        };
  258         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  259         -
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_input(&input)?,
  260         -
        );
  261         -
        if let Some(content_length) = body.content_length() {
  262         -
            let content_length = content_length.to_string();
  263         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  264         -
        }
  265         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         271  +
         272  +
        let protocol = _cfg
         273  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         274  +
            .expect("a SharedClientProtocol is required");
         275  +
        let mut request = protocol
         276  +
            .serialize_request(&input, PutWithContentEncoding::INPUT_SCHEMA, "/", _cfg)
         277  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         278  +
         279  +
        return ::std::result::Result::Ok(request);
  266    280   
    }
  267    281   
}
  268    282   
#[derive(Debug)]
  269    283   
struct PutWithContentEncodingEndpointParamsInterceptor;
  270    284   
  271    285   
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
  272    286   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  273    287   
    fn name(&self) -> &'static str {
  274    288   
        "PutWithContentEncodingEndpointParamsInterceptor"
  275    289   
    }