Client Test

Client Test

rev. 18b1dd205ff4335251e6dd0ecb88193de1b1cede

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_defaults/_operation_with_defaults_output.rs

@@ -150,150 +209,824 @@
  170    170   
    }
  171    171   
    #[allow(missing_docs)] // documentation missing in model
  172    172   
    pub fn zero_float(&self) -> f32 {
  173    173   
        self.zero_float
  174    174   
    }
  175    175   
    #[allow(missing_docs)] // documentation missing in model
  176    176   
    pub fn zero_double(&self) -> f64 {
  177    177   
        self.zero_double
  178    178   
    }
  179    179   
}
         180  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_STRING: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         181  +
    ::aws_smithy_schema::ShapeId::from_parts(
         182  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultString",
         183  +
        "aws.protocoltests.json10.synthetic",
         184  +
        "OperationWithDefaultsOutput",
         185  +
    ),
         186  +
    ::aws_smithy_schema::ShapeType::String,
         187  +
    "defaultString",
         188  +
    0,
         189  +
);
         190  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BOOLEAN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         191  +
    ::aws_smithy_schema::ShapeId::from_parts(
         192  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultBoolean",
         193  +
        "aws.protocoltests.json10.synthetic",
         194  +
        "OperationWithDefaultsOutput",
         195  +
    ),
         196  +
    ::aws_smithy_schema::ShapeType::Boolean,
         197  +
    "defaultBoolean",
         198  +
    1,
         199  +
);
         200  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         201  +
    ::aws_smithy_schema::ShapeId::from_parts(
         202  +
        "aws.protocoltests.json10#TestStringList$member",
         203  +
        "aws.protocoltests.json10",
         204  +
        "TestStringList",
         205  +
    ),
         206  +
    ::aws_smithy_schema::ShapeType::String,
         207  +
    "member",
         208  +
    0,
         209  +
);
         210  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         211  +
    ::aws_smithy_schema::ShapeId::from_parts(
         212  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultList",
         213  +
        "aws.protocoltests.json10.synthetic",
         214  +
        "OperationWithDefaultsOutput",
         215  +
    ),
         216  +
    ::aws_smithy_schema::ShapeType::List,
         217  +
    "defaultList",
         218  +
    2,
         219  +
)
         220  +
.with_list_member(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LIST_MEMBER);
         221  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_MAP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         222  +
    ::aws_smithy_schema::ShapeId::from_parts(
         223  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultDocumentMap",
         224  +
        "aws.protocoltests.json10.synthetic",
         225  +
        "OperationWithDefaultsOutput",
         226  +
    ),
         227  +
    ::aws_smithy_schema::ShapeType::Document,
         228  +
    "defaultDocumentMap",
         229  +
    3,
         230  +
);
         231  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_STRING: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         232  +
    ::aws_smithy_schema::ShapeId::from_parts(
         233  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultDocumentString",
         234  +
        "aws.protocoltests.json10.synthetic",
         235  +
        "OperationWithDefaultsOutput",
         236  +
    ),
         237  +
    ::aws_smithy_schema::ShapeType::Document,
         238  +
    "defaultDocumentString",
         239  +
    4,
         240  +
);
         241  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_BOOLEAN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         242  +
    ::aws_smithy_schema::ShapeId::from_parts(
         243  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultDocumentBoolean",
         244  +
        "aws.protocoltests.json10.synthetic",
         245  +
        "OperationWithDefaultsOutput",
         246  +
    ),
         247  +
    ::aws_smithy_schema::ShapeType::Document,
         248  +
    "defaultDocumentBoolean",
         249  +
    5,
         250  +
);
         251  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         252  +
    ::aws_smithy_schema::ShapeId::from_parts(
         253  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultDocumentList",
         254  +
        "aws.protocoltests.json10.synthetic",
         255  +
        "OperationWithDefaultsOutput",
         256  +
    ),
         257  +
    ::aws_smithy_schema::ShapeType::Document,
         258  +
    "defaultDocumentList",
         259  +
    6,
         260  +
);
         261  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_NULL_DOCUMENT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         262  +
    ::aws_smithy_schema::ShapeId::from_parts(
         263  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultNullDocument",
         264  +
        "aws.protocoltests.json10.synthetic",
         265  +
        "OperationWithDefaultsOutput",
         266  +
    ),
         267  +
    ::aws_smithy_schema::ShapeType::Document,
         268  +
    "defaultNullDocument",
         269  +
    7,
         270  +
);
         271  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_TIMESTAMP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         272  +
    ::aws_smithy_schema::ShapeId::from_parts(
         273  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultTimestamp",
         274  +
        "aws.protocoltests.json10.synthetic",
         275  +
        "OperationWithDefaultsOutput",
         276  +
    ),
         277  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         278  +
    "defaultTimestamp",
         279  +
    8,
         280  +
);
         281  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BLOB: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         282  +
    ::aws_smithy_schema::ShapeId::from_parts(
         283  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultBlob",
         284  +
        "aws.protocoltests.json10.synthetic",
         285  +
        "OperationWithDefaultsOutput",
         286  +
    ),
         287  +
    ::aws_smithy_schema::ShapeType::Blob,
         288  +
    "defaultBlob",
         289  +
    9,
         290  +
);
         291  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BYTE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         292  +
    ::aws_smithy_schema::ShapeId::from_parts(
         293  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultByte",
         294  +
        "aws.protocoltests.json10.synthetic",
         295  +
        "OperationWithDefaultsOutput",
         296  +
    ),
         297  +
    ::aws_smithy_schema::ShapeType::Byte,
         298  +
    "defaultByte",
         299  +
    10,
         300  +
);
         301  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_SHORT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         302  +
    ::aws_smithy_schema::ShapeId::from_parts(
         303  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultShort",
         304  +
        "aws.protocoltests.json10.synthetic",
         305  +
        "OperationWithDefaultsOutput",
         306  +
    ),
         307  +
    ::aws_smithy_schema::ShapeType::Short,
         308  +
    "defaultShort",
         309  +
    11,
         310  +
);
         311  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INTEGER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         312  +
    ::aws_smithy_schema::ShapeId::from_parts(
         313  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultInteger",
         314  +
        "aws.protocoltests.json10.synthetic",
         315  +
        "OperationWithDefaultsOutput",
         316  +
    ),
         317  +
    ::aws_smithy_schema::ShapeType::Integer,
         318  +
    "defaultInteger",
         319  +
    12,
         320  +
);
         321  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LONG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         322  +
    ::aws_smithy_schema::ShapeId::from_parts(
         323  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultLong",
         324  +
        "aws.protocoltests.json10.synthetic",
         325  +
        "OperationWithDefaultsOutput",
         326  +
    ),
         327  +
    ::aws_smithy_schema::ShapeType::Long,
         328  +
    "defaultLong",
         329  +
    13,
         330  +
);
         331  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_FLOAT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         332  +
    ::aws_smithy_schema::ShapeId::from_parts(
         333  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultFloat",
         334  +
        "aws.protocoltests.json10.synthetic",
         335  +
        "OperationWithDefaultsOutput",
         336  +
    ),
         337  +
    ::aws_smithy_schema::ShapeType::Float,
         338  +
    "defaultFloat",
         339  +
    14,
         340  +
);
         341  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOUBLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         342  +
    ::aws_smithy_schema::ShapeId::from_parts(
         343  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultDouble",
         344  +
        "aws.protocoltests.json10.synthetic",
         345  +
        "OperationWithDefaultsOutput",
         346  +
    ),
         347  +
    ::aws_smithy_schema::ShapeType::Double,
         348  +
    "defaultDouble",
         349  +
    15,
         350  +
);
         351  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         352  +
    ::aws_smithy_schema::ShapeId::from_parts("aws.protocoltests.json10#TestStringMap$key", "aws.protocoltests.json10", "TestStringMap"),
         353  +
    ::aws_smithy_schema::ShapeType::String,
         354  +
    "key",
         355  +
    0,
         356  +
);
         357  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         358  +
    ::aws_smithy_schema::ShapeId::from_parts(
         359  +
        "aws.protocoltests.json10#TestStringMap$value",
         360  +
        "aws.protocoltests.json10",
         361  +
        "TestStringMap",
         362  +
    ),
         363  +
    ::aws_smithy_schema::ShapeType::String,
         364  +
    "value",
         365  +
    1,
         366  +
);
         367  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         368  +
    ::aws_smithy_schema::ShapeId::from_parts(
         369  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultMap",
         370  +
        "aws.protocoltests.json10.synthetic",
         371  +
        "OperationWithDefaultsOutput",
         372  +
    ),
         373  +
    ::aws_smithy_schema::ShapeType::Map,
         374  +
    "defaultMap",
         375  +
    16,
         376  +
)
         377  +
.with_map_members(
         378  +
    &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP_KEY,
         379  +
    &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP_VALUE,
         380  +
);
         381  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_ENUM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         382  +
    ::aws_smithy_schema::ShapeId::from_parts(
         383  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultEnum",
         384  +
        "aws.protocoltests.json10.synthetic",
         385  +
        "OperationWithDefaultsOutput",
         386  +
    ),
         387  +
    ::aws_smithy_schema::ShapeType::String,
         388  +
    "defaultEnum",
         389  +
    17,
         390  +
);
         391  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INT_ENUM: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         392  +
    ::aws_smithy_schema::ShapeId::from_parts(
         393  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$defaultIntEnum",
         394  +
        "aws.protocoltests.json10.synthetic",
         395  +
        "OperationWithDefaultsOutput",
         396  +
    ),
         397  +
    ::aws_smithy_schema::ShapeType::Integer,
         398  +
    "defaultIntEnum",
         399  +
    18,
         400  +
);
         401  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_STRING: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         402  +
    ::aws_smithy_schema::ShapeId::from_parts(
         403  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$emptyString",
         404  +
        "aws.protocoltests.json10.synthetic",
         405  +
        "OperationWithDefaultsOutput",
         406  +
    ),
         407  +
    ::aws_smithy_schema::ShapeType::String,
         408  +
    "emptyString",
         409  +
    19,
         410  +
);
         411  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_FALSE_BOOLEAN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         412  +
    ::aws_smithy_schema::ShapeId::from_parts(
         413  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$falseBoolean",
         414  +
        "aws.protocoltests.json10.synthetic",
         415  +
        "OperationWithDefaultsOutput",
         416  +
    ),
         417  +
    ::aws_smithy_schema::ShapeType::Boolean,
         418  +
    "falseBoolean",
         419  +
    20,
         420  +
);
         421  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_BLOB: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         422  +
    ::aws_smithy_schema::ShapeId::from_parts(
         423  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$emptyBlob",
         424  +
        "aws.protocoltests.json10.synthetic",
         425  +
        "OperationWithDefaultsOutput",
         426  +
    ),
         427  +
    ::aws_smithy_schema::ShapeType::Blob,
         428  +
    "emptyBlob",
         429  +
    21,
         430  +
);
         431  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_BYTE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         432  +
    ::aws_smithy_schema::ShapeId::from_parts(
         433  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroByte",
         434  +
        "aws.protocoltests.json10.synthetic",
         435  +
        "OperationWithDefaultsOutput",
         436  +
    ),
         437  +
    ::aws_smithy_schema::ShapeType::Byte,
         438  +
    "zeroByte",
         439  +
    22,
         440  +
);
         441  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_SHORT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         442  +
    ::aws_smithy_schema::ShapeId::from_parts(
         443  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroShort",
         444  +
        "aws.protocoltests.json10.synthetic",
         445  +
        "OperationWithDefaultsOutput",
         446  +
    ),
         447  +
    ::aws_smithy_schema::ShapeType::Short,
         448  +
    "zeroShort",
         449  +
    23,
         450  +
);
         451  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_INTEGER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         452  +
    ::aws_smithy_schema::ShapeId::from_parts(
         453  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroInteger",
         454  +
        "aws.protocoltests.json10.synthetic",
         455  +
        "OperationWithDefaultsOutput",
         456  +
    ),
         457  +
    ::aws_smithy_schema::ShapeType::Integer,
         458  +
    "zeroInteger",
         459  +
    24,
         460  +
);
         461  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_LONG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         462  +
    ::aws_smithy_schema::ShapeId::from_parts(
         463  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroLong",
         464  +
        "aws.protocoltests.json10.synthetic",
         465  +
        "OperationWithDefaultsOutput",
         466  +
    ),
         467  +
    ::aws_smithy_schema::ShapeType::Long,
         468  +
    "zeroLong",
         469  +
    25,
         470  +
);
         471  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_FLOAT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         472  +
    ::aws_smithy_schema::ShapeId::from_parts(
         473  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroFloat",
         474  +
        "aws.protocoltests.json10.synthetic",
         475  +
        "OperationWithDefaultsOutput",
         476  +
    ),
         477  +
    ::aws_smithy_schema::ShapeType::Float,
         478  +
    "zeroFloat",
         479  +
    26,
         480  +
);
         481  +
static OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_DOUBLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         482  +
    ::aws_smithy_schema::ShapeId::from_parts(
         483  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput$zeroDouble",
         484  +
        "aws.protocoltests.json10.synthetic",
         485  +
        "OperationWithDefaultsOutput",
         486  +
    ),
         487  +
    ::aws_smithy_schema::ShapeType::Double,
         488  +
    "zeroDouble",
         489  +
    27,
         490  +
);
         491  +
static OPERATIONWITHDEFAULTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         492  +
    ::aws_smithy_schema::ShapeId::from_parts(
         493  +
        "aws.protocoltests.json10.synthetic#OperationWithDefaultsOutput",
         494  +
        "aws.protocoltests.json10.synthetic",
         495  +
        "OperationWithDefaultsOutput",
         496  +
    ),
         497  +
    ::aws_smithy_schema::ShapeType::Structure,
         498  +
    &[
         499  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_STRING,
         500  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BOOLEAN,
         501  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LIST,
         502  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_MAP,
         503  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_STRING,
         504  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_BOOLEAN,
         505  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_LIST,
         506  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_NULL_DOCUMENT,
         507  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_TIMESTAMP,
         508  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BLOB,
         509  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BYTE,
         510  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_SHORT,
         511  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INTEGER,
         512  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LONG,
         513  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_FLOAT,
         514  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOUBLE,
         515  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP,
         516  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_ENUM,
         517  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INT_ENUM,
         518  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_STRING,
         519  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_FALSE_BOOLEAN,
         520  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_BLOB,
         521  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_BYTE,
         522  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_SHORT,
         523  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_INTEGER,
         524  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_LONG,
         525  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_FLOAT,
         526  +
        &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_DOUBLE,
         527  +
    ],
         528  +
)
         529  +
.with_original_name("OperationWithDefaultsOutput");
         530  +
impl OperationWithDefaultsOutput {
         531  +
    /// The schema for this shape.
         532  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHDEFAULTSOUTPUT_SCHEMA;
         533  +
}
         534  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithDefaultsOutput {
         535  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         536  +
    fn serialize_members(
         537  +
        &self,
         538  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         539  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         540  +
        {
         541  +
            let val = &self.default_string;
         542  +
            ser.write_string(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_STRING, val)?;
         543  +
        }
         544  +
        {
         545  +
            let val = &self.default_boolean;
         546  +
            ser.write_boolean(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BOOLEAN, *val)?;
         547  +
        }
         548  +
        {
         549  +
            let val = &self.default_list;
         550  +
         551  +
            ser.write_list(
         552  +
                &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LIST,
         553  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         554  +
                    for item in val {
         555  +
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
         556  +
                    }
         557  +
                    Ok(())
         558  +
                },
         559  +
            )?;
         560  +
        }
         561  +
        {
         562  +
            let val = &self.default_document_map;
         563  +
            ser.write_document(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_MAP, val)?;
         564  +
        }
         565  +
        {
         566  +
            let val = &self.default_document_string;
         567  +
            ser.write_document(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_STRING, val)?;
         568  +
        }
         569  +
        {
         570  +
            let val = &self.default_document_boolean;
         571  +
            ser.write_document(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_BOOLEAN, val)?;
         572  +
        }
         573  +
        {
         574  +
            let val = &self.default_document_list;
         575  +
            ser.write_document(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOCUMENT_LIST, val)?;
         576  +
        }
         577  +
        if let Some(ref val) = self.default_null_document {
         578  +
            ser.write_document(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_NULL_DOCUMENT, val)?;
         579  +
        }
         580  +
        {
         581  +
            let val = &self.default_timestamp;
         582  +
            ser.write_timestamp(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_TIMESTAMP, val)?;
         583  +
        }
         584  +
        {
         585  +
            let val = &self.default_blob;
         586  +
            ser.write_blob(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BLOB, val.clone())?;
         587  +
        }
         588  +
        {
         589  +
            let val = &self.default_byte;
         590  +
            ser.write_byte(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_BYTE, *val)?;
         591  +
        }
         592  +
        {
         593  +
            let val = &self.default_short;
         594  +
            ser.write_short(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_SHORT, *val)?;
         595  +
        }
         596  +
        {
         597  +
            let val = &self.default_integer;
         598  +
            ser.write_integer(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INTEGER, *val)?;
         599  +
        }
         600  +
        {
         601  +
            let val = &self.default_long;
         602  +
            ser.write_long(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_LONG, *val)?;
         603  +
        }
         604  +
        {
         605  +
            let val = &self.default_float;
         606  +
            ser.write_float(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_FLOAT, *val)?;
         607  +
        }
         608  +
        {
         609  +
            let val = &self.default_double;
         610  +
            ser.write_double(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_DOUBLE, *val)?;
         611  +
        }
         612  +
        {
         613  +
            let val = &self.default_map;
         614  +
         615  +
            ser.write_map(
         616  +
                &OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_MAP,
         617  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         618  +
                    for (key, value) in val {
         619  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         620  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, value)?;
         621  +
                    }
         622  +
                    Ok(())
         623  +
                },
         624  +
            )?;
         625  +
        }
         626  +
        {
         627  +
            let val = &self.default_enum;
         628  +
            ser.write_string(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_ENUM, val.as_str())?;
         629  +
        }
         630  +
        {
         631  +
            let val = &self.default_int_enum;
         632  +
            ser.write_integer(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_DEFAULT_INT_ENUM, *val)?;
         633  +
        }
         634  +
        {
         635  +
            let val = &self.empty_string;
         636  +
            ser.write_string(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_STRING, val)?;
         637  +
        }
         638  +
        {
         639  +
            let val = &self.false_boolean;
         640  +
            ser.write_boolean(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_FALSE_BOOLEAN, *val)?;
         641  +
        }
         642  +
        {
         643  +
            let val = &self.empty_blob;
         644  +
            ser.write_blob(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_EMPTY_BLOB, val.clone())?;
         645  +
        }
         646  +
        {
         647  +
            let val = &self.zero_byte;
         648  +
            ser.write_byte(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_BYTE, *val)?;
         649  +
        }
         650  +
        {
         651  +
            let val = &self.zero_short;
         652  +
            ser.write_short(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_SHORT, *val)?;
         653  +
        }
         654  +
        {
         655  +
            let val = &self.zero_integer;
         656  +
            ser.write_integer(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_INTEGER, *val)?;
         657  +
        }
         658  +
        {
         659  +
            let val = &self.zero_long;
         660  +
            ser.write_long(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_LONG, *val)?;
         661  +
        }
         662  +
        {
         663  +
            let val = &self.zero_float;
         664  +
            ser.write_float(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_FLOAT, *val)?;
         665  +
        }
         666  +
        {
         667  +
            let val = &self.zero_double;
         668  +
            ser.write_double(&OPERATIONWITHDEFAULTSOUTPUT_MEMBER_ZERO_DOUBLE, *val)?;
         669  +
        }
         670  +
        Ok(())
         671  +
    }
         672  +
}
         673  +
impl OperationWithDefaultsOutput {
         674  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         675  +
    pub fn deserialize(
         676  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         677  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         678  +
        #[allow(unused_variables, unused_mut)]
         679  +
        let mut builder = Self::builder();
         680  +
        #[allow(
         681  +
            unused_variables,
         682  +
            unreachable_code,
         683  +
            clippy::single_match,
         684  +
            clippy::match_single_binding,
         685  +
            clippy::diverging_sub_expression
         686  +
        )]
         687  +
        deserializer.read_struct(&OPERATIONWITHDEFAULTSOUTPUT_SCHEMA, &mut |member, deser| {
         688  +
            match member.member_index() {
         689  +
                Some(0) => {
         690  +
                    builder.default_string = Some(deser.read_string(member)?);
         691  +
                }
         692  +
                Some(1) => {
         693  +
                    builder.default_boolean = Some(deser.read_boolean(member)?);
         694  +
                }
         695  +
                Some(2) => {
         696  +
                    builder.default_list = Some(deser.read_string_list(member)?);
         697  +
                }
         698  +
                Some(3) => {
         699  +
                    builder.default_document_map = Some(deser.read_document(member)?);
         700  +
                }
         701  +
                Some(4) => {
         702  +
                    builder.default_document_string = Some(deser.read_document(member)?);
         703  +
                }
         704  +
                Some(5) => {
         705  +
                    builder.default_document_boolean = Some(deser.read_document(member)?);
         706  +
                }
         707  +
                Some(6) => {
         708  +
                    builder.default_document_list = Some(deser.read_document(member)?);
         709  +
                }
         710  +
                Some(7) => {
         711  +
                    if deser.is_null() {
         712  +
                        deser.read_null()?;
         713  +
                    } else {
         714  +
                        builder.default_null_document = Some(deser.read_document(member)?);
         715  +
                    }
         716  +
                }
         717  +
                Some(8) => {
         718  +
                    builder.default_timestamp = Some(deser.read_timestamp(member)?);
         719  +
                }
         720  +
                Some(9) => {
         721  +
                    builder.default_blob = Some(deser.read_blob(member)?);
         722  +
                }
         723  +
                Some(10) => {
         724  +
                    builder.default_byte = Some(deser.read_byte(member)?);
         725  +
                }
         726  +
                Some(11) => {
         727  +
                    builder.default_short = Some(deser.read_short(member)?);
         728  +
                }
         729  +
                Some(12) => {
         730  +
                    builder.default_integer = Some(deser.read_integer(member)?);
         731  +
                }
         732  +
                Some(13) => {
         733  +
                    builder.default_long = Some(deser.read_long(member)?);
         734  +
                }
         735  +
                Some(14) => {
         736  +
                    builder.default_float = Some(deser.read_float(member)?);
         737  +
                }
         738  +
                Some(15) => {
         739  +
                    builder.default_double = Some(deser.read_double(member)?);
         740  +
                }
         741  +
                Some(16) => {
         742  +
                    builder.default_map = Some(deser.read_string_string_map(member)?);
         743  +
                }
         744  +
                Some(17) => {
         745  +
                    builder.default_enum = Some(crate::types::TestEnum::from(deser.read_string(member)?.as_str()));
         746  +
                }
         747  +
                Some(18) => {
         748  +
                    builder.default_int_enum = Some(deser.read_integer(member)?);
         749  +
                }
         750  +
                Some(19) => {
         751  +
                    builder.empty_string = Some(deser.read_string(member)?);
         752  +
                }
         753  +
                Some(20) => {
         754  +
                    builder.false_boolean = Some(deser.read_boolean(member)?);
         755  +
                }
         756  +
                Some(21) => {
         757  +
                    builder.empty_blob = Some(deser.read_blob(member)?);
         758  +
                }
         759  +
                Some(22) => {
         760  +
                    builder.zero_byte = Some(deser.read_byte(member)?);
         761  +
                }
         762  +
                Some(23) => {
         763  +
                    builder.zero_short = Some(deser.read_short(member)?);
         764  +
                }
         765  +
                Some(24) => {
         766  +
                    builder.zero_integer = Some(deser.read_integer(member)?);
         767  +
                }
         768  +
                Some(25) => {
         769  +
                    builder.zero_long = Some(deser.read_long(member)?);
         770  +
                }
         771  +
                Some(26) => {
         772  +
                    builder.zero_float = Some(deser.read_float(member)?);
         773  +
                }
         774  +
                Some(27) => {
         775  +
                    builder.zero_double = Some(deser.read_double(member)?);
         776  +
                }
         777  +
                _ => {}
         778  +
            }
         779  +
            Ok(())
         780  +
        })?;
         781  +
        Ok(builder.build())
         782  +
    }
         783  +
}
         784  +
impl OperationWithDefaultsOutput {
         785  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         786  +
    pub fn deserialize_with_response(
         787  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         788  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         789  +
        _status: u16,
         790  +
        _body: &[u8],
         791  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         792  +
        Self::deserialize(deserializer)
         793  +
    }
         794  +
}
  180    795   
impl OperationWithDefaultsOutput {
  181    796   
    /// Creates a new builder-style object to manufacture [`OperationWithDefaultsOutput`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput).
  182    797   
    pub fn builder() -> crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder {
  183    798   
        crate::operation::operation_with_defaults::builders::OperationWithDefaultsOutputBuilder::default()
  184    799   
    }
  185    800   
}
  186    801   
  187    802   
/// A builder for [`OperationWithDefaultsOutput`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput).
  188    803   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  189    804   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_nested_structure.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 `OperationWithNestedStructure`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct OperationWithNestedStructure;
    6      6   
impl OperationWithNestedStructure {
    7      7   
    /// Creates a new `OperationWithNestedStructure`
    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_nested_structure::OperationWithNestedStructureInput::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_nested_structure::OperationWithNestedStructureOutput::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_nested_structure::OperationWithNestedStructureInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -120,126 +244,258 @@
  140    146   
  141    147   
#[derive(Debug)]
  142    148   
struct OperationWithNestedStructureResponseDeserializer;
  143    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithNestedStructureResponseDeserializer {
  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_nested_structure::de_operation_with_nested_structure_http_error(status, headers, body)
         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_nested_structure::OperationWithNestedStructureError::generic(generic),
         178  +
                ),
         179  +
            ))
  157    180   
        } else {
  158         -
            crate::protocol_serde::shape_operation_with_nested_structure::de_operation_with_nested_structure_http_response(status, headers, body)
  159         -
        };
  160         -
        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, OperationWithNestedStructure::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_nested_structure::OperationWithNestedStructureOutput::deserialize_with_response(
         195  +
                &mut *deser,
         196  +
                _response_headers,
         197  +
                response.status().into(),
         198  +
                body,
         199  +
            )
         200  +
            .map_err(|e| {
         201  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         202  +
            })?;
         203  +
         204  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         205  +
        }
  161    206   
    }
  162    207   
}
  163    208   
#[derive(Debug)]
  164    209   
struct OperationWithNestedStructureRequestSerializer;
  165    210   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithNestedStructureRequestSerializer {
  166    211   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    212   
    fn serialize_input(
  168    213   
        &self,
  169    214   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    215   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    216   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    217   
        let input = input
  173    218   
            .downcast::<crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput>()
  174    219   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            #[allow(clippy::unnecessary_wraps)]
  190         -
            fn update_http_builder(
  191         -
                input: &crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
  192         -
                builder: ::http_1x::request::Builder,
  193         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  194         -
                let mut uri = ::std::string::String::new();
  195         -
                uri_base(input, &mut uri)?;
  196         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  197         -
            }
  198         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  199         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  200         -
            builder = _header_serialization_settings.set_default_header(
  201         -
                builder,
  202         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  203         -
                "JsonRpc10.OperationWithNestedStructure",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  208         -
            crate::protocol_serde::shape_operation_with_nested_structure::ser_operation_with_nested_structure_input(&input)?,
  209         -
        );
  210         -
        if let Some(content_length) = body.content_length() {
  211         -
            let content_length = content_length.to_string();
  212         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  213         -
        }
  214         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         220  +
         221  +
        let protocol = _cfg
         222  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         223  +
            .expect("a SharedClientProtocol is required");
         224  +
        let mut request = protocol
         225  +
            .serialize_request(&input, OperationWithNestedStructure::INPUT_SCHEMA, "/", _cfg)
         226  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         227  +
         228  +
        return ::std::result::Result::Ok(request);
  215    229   
    }
  216    230   
}
  217    231   
#[derive(Debug)]
  218    232   
struct OperationWithNestedStructureEndpointParamsInterceptor;
  219    233   
  220    234   
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
  221    235   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithNestedStructureEndpointParamsInterceptor {
  222    236   
    fn name(&self) -> &'static str {
  223    237   
        "OperationWithNestedStructureEndpointParamsInterceptor"
  224    238   
    }
@@ -393,407 +452,473 @@
  413    427   
  414    428   
        let op = crate::operation::operation_with_nested_structure::OperationWithNestedStructure::new();
  415    429   
        let config = op.config().expect("the operation has config");
  416    430   
        let de = config
  417    431   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  418    432   
            .expect("the config must have a deserializer");
  419    433   
  420    434   
        // Build a config bag with the protocol for schema-based deserialization
  421    435   
        #[allow(unused_mut)]
  422    436   
        let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         437  +
        {
         438  +
            let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         439  +
            layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         440  +
                ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_0().with_target_prefix("JsonRpc10"),
         441  +
            ));
         442  +
            test_cfg.push_shared_layer(layer.freeze());
         443  +
        }
  423    444   
  424    445   
        let parsed = de.deserialize_streaming(&mut http_response);
  425    446   
        let parsed = parsed.unwrap_or_else(|| {
  426    447   
            let http_response = http_response.map(|body| {
  427    448   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  428    449   
                    body.bytes().unwrap(),
  429    450   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  430    451   
                )))
  431    452   
            });
  432    453   
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_nested_structure/_operation_with_nested_structure_input.rs

@@ -1,1 +44,122 @@
    5      5   
pub struct OperationWithNestedStructureInput {
    6      6   
    #[allow(missing_docs)] // documentation missing in model
    7      7   
    pub top_level: ::std::option::Option<crate::types::TopLevel>,
    8      8   
}
    9      9   
impl OperationWithNestedStructureInput {
   10     10   
    #[allow(missing_docs)] // documentation missing in model
   11     11   
    pub fn top_level(&self) -> ::std::option::Option<&crate::types::TopLevel> {
   12     12   
        self.top_level.as_ref()
   13     13   
    }
   14     14   
}
          15  +
static OPERATIONWITHNESTEDSTRUCTUREINPUT_MEMBER_TOP_LEVEL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          16  +
    ::aws_smithy_schema::ShapeId::from_parts(
          17  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureInput$topLevel",
          18  +
        "aws.protocoltests.json10.synthetic",
          19  +
        "OperationWithNestedStructureInput",
          20  +
    ),
          21  +
    ::aws_smithy_schema::ShapeType::Structure,
          22  +
    "topLevel",
          23  +
    0,
          24  +
);
          25  +
static OPERATIONWITHNESTEDSTRUCTUREINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          26  +
    ::aws_smithy_schema::ShapeId::from_parts(
          27  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureInput",
          28  +
        "aws.protocoltests.json10.synthetic",
          29  +
        "OperationWithNestedStructureInput",
          30  +
    ),
          31  +
    ::aws_smithy_schema::ShapeType::Structure,
          32  +
    &[&OPERATIONWITHNESTEDSTRUCTUREINPUT_MEMBER_TOP_LEVEL],
          33  +
)
          34  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
          35  +
.with_original_name("OperationWithNestedStructureInput");
          36  +
impl OperationWithNestedStructureInput {
          37  +
    /// The schema for this shape.
          38  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHNESTEDSTRUCTUREINPUT_SCHEMA;
          39  +
}
          40  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithNestedStructureInput {
          41  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          42  +
    fn serialize_members(
          43  +
        &self,
          44  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          45  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          46  +
        if let Some(ref val) = self.top_level {
          47  +
            ser.write_struct(&OPERATIONWITHNESTEDSTRUCTUREINPUT_MEMBER_TOP_LEVEL, val)?;
          48  +
        }
          49  +
        Ok(())
          50  +
    }
          51  +
}
          52  +
impl OperationWithNestedStructureInput {
          53  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          54  +
    pub fn deserialize(
          55  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          56  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          57  +
        #[allow(unused_variables, unused_mut)]
          58  +
        let mut builder = Self::builder();
          59  +
        #[allow(
          60  +
            unused_variables,
          61  +
            unreachable_code,
          62  +
            clippy::single_match,
          63  +
            clippy::match_single_binding,
          64  +
            clippy::diverging_sub_expression
          65  +
        )]
          66  +
        deserializer.read_struct(&OPERATIONWITHNESTEDSTRUCTUREINPUT_SCHEMA, &mut |member, deser| {
          67  +
            match member.member_index() {
          68  +
                Some(0) => {
          69  +
                    if deser.is_null() {
          70  +
                        deser.read_null()?;
          71  +
                    } else {
          72  +
                        builder.top_level = Some(crate::types::TopLevel::deserialize(deser)?);
          73  +
                    }
          74  +
                }
          75  +
                _ => {}
          76  +
            }
          77  +
            Ok(())
          78  +
        })?;
          79  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
          80  +
    }
          81  +
}
          82  +
impl OperationWithNestedStructureInput {
          83  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          84  +
    pub fn deserialize_with_response(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          87  +
        _status: u16,
          88  +
        _body: &[u8],
          89  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          90  +
        Self::deserialize(deserializer)
          91  +
    }
          92  +
}
   15     93   
impl OperationWithNestedStructureInput {
   16     94   
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput).
   17     95   
    pub fn builder() -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder {
   18     96   
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder::default()
   19     97   
    }
   20     98   
}
   21     99   
   22    100   
/// A builder for [`OperationWithNestedStructureInput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput).
   23    101   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   24    102   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_nested_structure/_operation_with_nested_structure_output.rs

@@ -1,1 +57,225 @@
   18     18   
    #[allow(missing_docs)] // documentation missing in model
   19     19   
    pub fn dialog_list(&self) -> &[crate::types::Dialog] {
   20     20   
        use std::ops::Deref;
   21     21   
        self.dialog_list.deref()
   22     22   
    }
   23     23   
    #[allow(missing_docs)] // documentation missing in model
   24     24   
    pub fn dialog_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::Dialog> {
   25     25   
        &self.dialog_map
   26     26   
    }
   27     27   
}
          28  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          29  +
    ::aws_smithy_schema::ShapeId::from_parts(
          30  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureOutput$dialog",
          31  +
        "aws.protocoltests.json10.synthetic",
          32  +
        "OperationWithNestedStructureOutput",
          33  +
    ),
          34  +
    ::aws_smithy_schema::ShapeType::Structure,
          35  +
    "dialog",
          36  +
    0,
          37  +
);
          38  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_LIST_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          39  +
    ::aws_smithy_schema::ShapeId::from_parts("aws.protocoltests.json10#DialogList$member", "aws.protocoltests.json10", "DialogList"),
          40  +
    ::aws_smithy_schema::ShapeType::Structure,
          41  +
    "member",
          42  +
    0,
          43  +
);
          44  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_LIST: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          45  +
    ::aws_smithy_schema::ShapeId::from_parts(
          46  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureOutput$dialogList",
          47  +
        "aws.protocoltests.json10.synthetic",
          48  +
        "OperationWithNestedStructureOutput",
          49  +
    ),
          50  +
    ::aws_smithy_schema::ShapeType::List,
          51  +
    "dialogList",
          52  +
    1,
          53  +
)
          54  +
.with_list_member(&OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_LIST_MEMBER);
          55  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          56  +
    ::aws_smithy_schema::ShapeId::from_parts("aws.protocoltests.json10#DialogMap$key", "aws.protocoltests.json10", "DialogMap"),
          57  +
    ::aws_smithy_schema::ShapeType::String,
          58  +
    "key",
          59  +
    0,
          60  +
);
          61  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          62  +
    ::aws_smithy_schema::ShapeId::from_parts("aws.protocoltests.json10#DialogMap$value", "aws.protocoltests.json10", "DialogMap"),
          63  +
    ::aws_smithy_schema::ShapeType::Structure,
          64  +
    "value",
          65  +
    1,
          66  +
);
          67  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          68  +
    ::aws_smithy_schema::ShapeId::from_parts(
          69  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureOutput$dialogMap",
          70  +
        "aws.protocoltests.json10.synthetic",
          71  +
        "OperationWithNestedStructureOutput",
          72  +
    ),
          73  +
    ::aws_smithy_schema::ShapeType::Map,
          74  +
    "dialogMap",
          75  +
    2,
          76  +
)
          77  +
.with_map_members(
          78  +
    &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP_KEY,
          79  +
    &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP_VALUE,
          80  +
);
          81  +
static OPERATIONWITHNESTEDSTRUCTUREOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          82  +
    ::aws_smithy_schema::ShapeId::from_parts(
          83  +
        "aws.protocoltests.json10.synthetic#OperationWithNestedStructureOutput",
          84  +
        "aws.protocoltests.json10.synthetic",
          85  +
        "OperationWithNestedStructureOutput",
          86  +
    ),
          87  +
    ::aws_smithy_schema::ShapeType::Structure,
          88  +
    &[
          89  +
        &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG,
          90  +
        &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_LIST,
          91  +
        &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP,
          92  +
    ],
          93  +
)
          94  +
.with_original_name("OperationWithNestedStructureOutput");
          95  +
impl OperationWithNestedStructureOutput {
          96  +
    /// The schema for this shape.
          97  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_SCHEMA;
          98  +
}
          99  +
impl ::aws_smithy_schema::serde::SerializableStruct for OperationWithNestedStructureOutput {
         100  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         101  +
    fn serialize_members(
         102  +
        &self,
         103  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         104  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         105  +
        {
         106  +
            let val = &self.dialog;
         107  +
            ser.write_struct(&OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG, val)?;
         108  +
        }
         109  +
        {
         110  +
            let val = &self.dialog_list;
         111  +
         112  +
            ser.write_list(
         113  +
                &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_LIST,
         114  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         115  +
                    for item in val {
         116  +
                        ser.write_struct(crate::types::Dialog::SCHEMA, item)?;
         117  +
                    }
         118  +
                    Ok(())
         119  +
                },
         120  +
            )?;
         121  +
        }
         122  +
        {
         123  +
            let val = &self.dialog_map;
         124  +
         125  +
            ser.write_map(
         126  +
                &OPERATIONWITHNESTEDSTRUCTUREOUTPUT_MEMBER_DIALOG_MAP,
         127  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         128  +
                    for (key, value) in val {
         129  +
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         130  +
                        ser.write_struct(crate::types::Dialog::SCHEMA, value)?;
         131  +
                    }
         132  +
                    Ok(())
         133  +
                },
         134  +
            )?;
         135  +
        }
         136  +
        Ok(())
         137  +
    }
         138  +
}
         139  +
impl OperationWithNestedStructureOutput {
         140  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         141  +
    pub fn deserialize(
         142  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         143  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         144  +
        #[allow(unused_variables, unused_mut)]
         145  +
        let mut builder = Self::builder();
         146  +
        #[allow(
         147  +
            unused_variables,
         148  +
            unreachable_code,
         149  +
            clippy::single_match,
         150  +
            clippy::match_single_binding,
         151  +
            clippy::diverging_sub_expression
         152  +
        )]
         153  +
        deserializer.read_struct(&OPERATIONWITHNESTEDSTRUCTUREOUTPUT_SCHEMA, &mut |member, deser| {
         154  +
            match member.member_index() {
         155  +
                Some(0) => {
         156  +
                    builder.dialog = Some(crate::types::Dialog::deserialize(deser)?);
         157  +
                }
         158  +
                Some(1) => {
         159  +
                    builder.dialog_list = Some({
         160  +
                        let mut container = Vec::new();
         161  +
                        deser.read_list(member, &mut |deser| {
         162  +
                            container.push(crate::types::Dialog::deserialize(deser)?);
         163  +
                            Ok(())
         164  +
                        })?;
         165  +
                        container
         166  +
                    });
         167  +
                }
         168  +
                Some(2) => {
         169  +
                    builder.dialog_map = Some({
         170  +
                        let mut container = std::collections::HashMap::new();
         171  +
                        deser.read_map(member, &mut |key, deser| {
         172  +
                            container.insert(key, crate::types::Dialog::deserialize(deser)?);
         173  +
                            Ok(())
         174  +
                        })?;
         175  +
                        container
         176  +
                    });
         177  +
                }
         178  +
                _ => {}
         179  +
            }
         180  +
            Ok(())
         181  +
        })?;
         182  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         183  +
    }
         184  +
}
         185  +
impl OperationWithNestedStructureOutput {
         186  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         187  +
    pub fn deserialize_with_response(
         188  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         189  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         190  +
        _status: u16,
         191  +
        _body: &[u8],
         192  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         193  +
        Self::deserialize(deserializer)
         194  +
    }
         195  +
}
   28    196   
impl OperationWithNestedStructureOutput {
   29    197   
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
   30    198   
    pub fn builder() -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder {
   31    199   
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::default()
   32    200   
    }
   33    201   
}
   34    202   
   35    203   
/// A builder for [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
   36    204   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   37    205   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc10/rust-client-codegen/src/operation/operation_with_required_members.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 `OperationWithRequiredMembers`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct OperationWithRequiredMembers;
    6      6   
impl OperationWithRequiredMembers {
    7      7   
    /// Creates a new `OperationWithRequiredMembers`
    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::OperationWithRequiredMembersInput::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::OperationWithRequiredMembersOutput::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::OperationWithRequiredMembersInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::operation_with_required_members::OperationWithRequiredMembersOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::operation_with_required_members::OperationWithRequiredMembersError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -120,126 +241,258 @@
  140    146   
  141    147   
#[derive(Debug)]
  142    148   
struct OperationWithRequiredMembersResponseDeserializer;
  143    149   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for OperationWithRequiredMembersResponseDeserializer {
  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::de_operation_with_required_members_http_error(status, headers, body)
         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::OperationWithRequiredMembersError::generic(generic),
         178  +
                ),
         179  +
            ))
  157    180   
        } else {
  158         -
            crate::protocol_serde::shape_operation_with_required_members::de_operation_with_required_members_http_response(status, headers, body)
  159         -
        };
  160         -
        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, OperationWithRequiredMembers::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::OperationWithRequiredMembersOutput::deserialize_with_response(
         195  +
                &mut *deser,
         196  +
                _response_headers,
         197  +
                response.status().into(),
         198  +
                body,
         199  +
            )
         200  +
            .map_err(|e| {
         201  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         202  +
            })?;
         203  +
         204  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         205  +
        }
  161    206   
    }
  162    207   
}
  163    208   
#[derive(Debug)]
  164    209   
struct OperationWithRequiredMembersRequestSerializer;
  165    210   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for OperationWithRequiredMembersRequestSerializer {
  166    211   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  167    212   
    fn serialize_input(
  168    213   
        &self,
  169    214   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  170    215   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  171    216   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  172    217   
        let input = input
  173    218   
            .downcast::<crate::operation::operation_with_required_members::OperationWithRequiredMembersInput>()
  174    219   
            .expect("correct type");
  175         -
        let _header_serialization_settings = _cfg
  176         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  177         -
            .cloned()
  178         -
            .unwrap_or_default();
  179         -
        let mut request_builder = {
  180         -
            #[allow(clippy::uninlined_format_args)]
  181         -
            fn uri_base(
  182         -
                _input: &crate::operation::operation_with_required_members::OperationWithRequiredMembersInput,
  183         -
                output: &mut ::std::string::String,
  184         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  185         -
                use ::std::fmt::Write as _;
  186         -
                ::std::write!(output, "/").expect("formatting should succeed");
  187         -
                ::std::result::Result::Ok(())
  188         -
            }
  189         -
            #[allow(clippy::unnecessary_wraps)]
  190         -
            fn update_http_builder(
  191         -
                input: &crate::operation::operation_with_required_members::OperationWithRequiredMembersInput,
  192         -
                builder: ::http_1x::request::Builder,
  193         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  194         -
                let mut uri = ::std::string::String::new();
  195         -
                uri_base(input, &mut uri)?;
  196         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  197         -
            }
  198         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  199         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  200         -
            builder = _header_serialization_settings.set_default_header(
  201         -
                builder,
  202         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  203         -
                "JsonRpc10.OperationWithRequiredMembers",
  204         -
            );
  205         -
            builder
  206         -
        };
  207         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  208         -
            crate::protocol_serde::shape_operation_with_required_members::ser_operation_with_required_members_input(&input)?,
  209         -
        );
  210    220   
  211         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         221  +
        let protocol = _cfg
         222  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         223  +
            .expect("a SharedClientProtocol is required");
         224  +
        let mut request = protocol
         225  +
            .serialize_request(&input, OperationWithRequiredMembers::INPUT_SCHEMA, "/", _cfg)
         226  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         227  +
         228  +
        return ::std::result::Result::Ok(request);
  212    229   
    }
  213    230   
}
  214    231   
#[derive(Debug)]
  215    232   
struct OperationWithRequiredMembersEndpointParamsInterceptor;
  216    233   
  217    234   
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
  218    235   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithRequiredMembersEndpointParamsInterceptor {
  219    236   
    fn name(&self) -> &'static str {
  220    237   
        "OperationWithRequiredMembersEndpointParamsInterceptor"
  221    238   
    }
@@ -265,282 +324,348 @@
  285    302   
  286    303   
        let op = crate::operation::operation_with_required_members::OperationWithRequiredMembers::new();
  287    304   
        let config = op.config().expect("the operation has config");
  288    305   
        let de = config
  289    306   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  290    307   
            .expect("the config must have a deserializer");
  291    308   
  292    309   
        // Build a config bag with the protocol for schema-based deserialization
  293    310   
        #[allow(unused_mut)]
  294    311   
        let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         312  +
        {
         313  +
            let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         314  +
            layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         315  +
                ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_0().with_target_prefix("JsonRpc10"),
         316  +
            ));
         317  +
            test_cfg.push_shared_layer(layer.freeze());
         318  +
        }
  295    319   
  296    320   
        let parsed = de.deserialize_streaming(&mut http_response);
  297    321   
        let parsed = parsed.unwrap_or_else(|| {
  298    322   
            let http_response = http_response.map(|body| {
  299    323   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  300    324   
                    body.bytes().unwrap(),
  301    325   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  302    326   
                )))
  303    327   
            });
  304    328   
            de.deserialize_nonstreaming_with_config(&http_response, &test_cfg)