71 71 | "com.amazonaws.ec2.synthetic",
|
72 72 | "GetReservedInstancesExchangeQuoteOutput",
|
73 73 | );
|
74 74 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_CURRENCY_CODE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
75 75 | ::aws_smithy_schema::ShapeId::from_static(
|
76 76 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$CurrencyCode",
|
77 77 | "com.amazonaws.ec2.synthetic",
|
78 78 | "GetReservedInstancesExchangeQuoteOutput",
|
79 79 | ),
|
80 80 | ::aws_smithy_schema::ShapeType::String,
|
81 - | "currency_code",
|
81 + | "CurrencyCode",
|
82 82 | 0,
|
83 83 | )
|
84 84 | .with_xml_name("currencyCode");
|
85 85 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_IS_VALID_EXCHANGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
86 86 | ::aws_smithy_schema::ShapeId::from_static(
|
87 87 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$IsValidExchange",
|
88 88 | "com.amazonaws.ec2.synthetic",
|
89 89 | "GetReservedInstancesExchangeQuoteOutput",
|
90 90 | ),
|
91 91 | ::aws_smithy_schema::ShapeType::Boolean,
|
92 - | "is_valid_exchange",
|
92 + | "IsValidExchange",
|
93 93 | 1,
|
94 94 | )
|
95 95 | .with_xml_name("isValidExchange");
|
96 96 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_OUTPUT_RESERVED_INSTANCES_WILL_EXPIRE_AT: ::aws_smithy_schema::Schema =
|
97 97 | ::aws_smithy_schema::Schema::new_member(
|
98 98 | ::aws_smithy_schema::ShapeId::from_static(
|
99 99 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$OutputReservedInstancesWillExpireAt",
|
100 100 | "com.amazonaws.ec2.synthetic",
|
101 101 | "GetReservedInstancesExchangeQuoteOutput",
|
102 102 | ),
|
103 103 | ::aws_smithy_schema::ShapeType::Timestamp,
|
104 - | "output_reserved_instances_will_expire_at",
|
104 + | "OutputReservedInstancesWillExpireAt",
|
105 105 | 2,
|
106 106 | )
|
107 107 | .with_xml_name("outputReservedInstancesWillExpireAt");
|
108 108 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_PAYMENT_DUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
109 109 | ::aws_smithy_schema::ShapeId::from_static(
|
110 110 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$PaymentDue",
|
111 111 | "com.amazonaws.ec2.synthetic",
|
112 112 | "GetReservedInstancesExchangeQuoteOutput",
|
113 113 | ),
|
114 114 | ::aws_smithy_schema::ShapeType::String,
|
115 - | "payment_due",
|
115 + | "PaymentDue",
|
116 116 | 3,
|
117 117 | )
|
118 118 | .with_xml_name("paymentDue");
|
119 119 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_RESERVED_INSTANCE_VALUE_ROLLUP: ::aws_smithy_schema::Schema =
|
120 120 | ::aws_smithy_schema::Schema::new_member(
|
121 121 | ::aws_smithy_schema::ShapeId::from_static(
|
122 122 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$ReservedInstanceValueRollup",
|
123 123 | "com.amazonaws.ec2.synthetic",
|
124 124 | "GetReservedInstancesExchangeQuoteOutput",
|
125 125 | ),
|
126 126 | ::aws_smithy_schema::ShapeType::Structure,
|
127 - | "reserved_instance_value_rollup",
|
127 + | "ReservedInstanceValueRollup",
|
128 128 | 4,
|
129 129 | )
|
130 130 | .with_xml_name("reservedInstanceValueRollup");
|
131 131 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_RESERVED_INSTANCE_VALUE_SET: ::aws_smithy_schema::Schema =
|
132 132 | ::aws_smithy_schema::Schema::new_member(
|
133 133 | ::aws_smithy_schema::ShapeId::from_static(
|
134 134 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$ReservedInstanceValueSet",
|
135 135 | "com.amazonaws.ec2.synthetic",
|
136 136 | "GetReservedInstancesExchangeQuoteOutput",
|
137 137 | ),
|
138 138 | ::aws_smithy_schema::ShapeType::List,
|
139 - | "reserved_instance_value_set",
|
139 + | "ReservedInstanceValueSet",
|
140 140 | 5,
|
141 141 | )
|
142 142 | .with_xml_name("reservedInstanceValueSet");
|
143 143 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_TARGET_CONFIGURATION_VALUE_ROLLUP: ::aws_smithy_schema::Schema =
|
144 144 | ::aws_smithy_schema::Schema::new_member(
|
145 145 | ::aws_smithy_schema::ShapeId::from_static(
|
146 146 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$TargetConfigurationValueRollup",
|
147 147 | "com.amazonaws.ec2.synthetic",
|
148 148 | "GetReservedInstancesExchangeQuoteOutput",
|
149 149 | ),
|
150 150 | ::aws_smithy_schema::ShapeType::Structure,
|
151 - | "target_configuration_value_rollup",
|
151 + | "TargetConfigurationValueRollup",
|
152 152 | 6,
|
153 153 | )
|
154 154 | .with_xml_name("targetConfigurationValueRollup");
|
155 155 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_TARGET_CONFIGURATION_VALUE_SET: ::aws_smithy_schema::Schema =
|
156 156 | ::aws_smithy_schema::Schema::new_member(
|
157 157 | ::aws_smithy_schema::ShapeId::from_static(
|
158 158 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$TargetConfigurationValueSet",
|
159 159 | "com.amazonaws.ec2.synthetic",
|
160 160 | "GetReservedInstancesExchangeQuoteOutput",
|
161 161 | ),
|
162 162 | ::aws_smithy_schema::ShapeType::List,
|
163 - | "target_configuration_value_set",
|
163 + | "TargetConfigurationValueSet",
|
164 164 | 7,
|
165 165 | )
|
166 166 | .with_xml_name("targetConfigurationValueSet");
|
167 167 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_VALIDATION_FAILURE_REASON: ::aws_smithy_schema::Schema =
|
168 168 | ::aws_smithy_schema::Schema::new_member(
|
169 169 | ::aws_smithy_schema::ShapeId::from_static(
|
170 170 | "com.amazonaws.ec2.synthetic#GetReservedInstancesExchangeQuoteOutput$ValidationFailureReason",
|
171 171 | "com.amazonaws.ec2.synthetic",
|
172 172 | "GetReservedInstancesExchangeQuoteOutput",
|
173 173 | ),
|
174 174 | ::aws_smithy_schema::ShapeType::String,
|
175 - | "validation_failure_reason",
|
175 + | "ValidationFailureReason",
|
176 176 | 8,
|
177 177 | )
|
178 178 | .with_xml_name("validationFailureReason");
|
179 + | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
180 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
181 + | ::aws_smithy_schema::ShapeType::String,
|
182 + | "request_id",
|
183 + | 9,
|
184 + | )
|
185 + | .with_http_header("x-amzn-requestid");
|
179 186 | static GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
180 187 | GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA_ID,
|
181 188 | ::aws_smithy_schema::ShapeType::Structure,
|
182 189 | &[
|
183 190 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_CURRENCY_CODE,
|
184 191 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_IS_VALID_EXCHANGE,
|
185 192 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_OUTPUT_RESERVED_INSTANCES_WILL_EXPIRE_AT,
|
186 193 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_PAYMENT_DUE,
|
187 194 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_RESERVED_INSTANCE_VALUE_ROLLUP,
|
188 195 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_RESERVED_INSTANCE_VALUE_SET,
|
189 196 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_TARGET_CONFIGURATION_VALUE_ROLLUP,
|
190 197 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_TARGET_CONFIGURATION_VALUE_SET,
|
191 198 | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_VALIDATION_FAILURE_REASON,
|
199 + | &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER__REQUEST_ID,
|
192 200 | ],
|
193 201 | );
|
194 202 | impl GetReservedInstancesExchangeQuoteOutput {
|
195 203 | /// The schema for this shape.
|
196 204 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA;
|
197 205 | }
|
198 206 | impl ::aws_smithy_schema::serde::SerializableStruct for GetReservedInstancesExchangeQuoteOutput {
|
199 207 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
200 208 | fn serialize_members(
|
201 209 | &self,
|
245 253 | )?;
|
246 254 | }
|
247 255 | if let Some(ref val) = self.validation_failure_reason {
|
248 256 | ser.write_string(&GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_MEMBER_VALIDATION_FAILURE_REASON, val)?;
|
249 257 | }
|
250 258 | Ok(())
|
251 259 | }
|
252 260 | }
|
253 261 | impl GetReservedInstancesExchangeQuoteOutput {
|
254 262 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
255 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
256 - | deserializer: &mut D,
|
263 + | pub fn deserialize(
|
264 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
265 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
266 + | #[allow(unused_variables, unused_mut)]
|
267 + | let mut builder = Self::builder();
|
268 + | #[allow(
|
269 + | unused_variables,
|
270 + | unreachable_code,
|
271 + | clippy::single_match,
|
272 + | clippy::match_single_binding,
|
273 + | clippy::diverging_sub_expression
|
274 + | )]
|
275 + | deserializer.read_struct(&GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA, &mut |member, deser| {
|
276 + | match member.member_index() {
|
277 + | Some(0) => {
|
278 + | builder.currency_code = Some(deser.read_string(member)?);
|
279 + | }
|
280 + | Some(1) => {
|
281 + | builder.is_valid_exchange = Some(deser.read_boolean(member)?);
|
282 + | }
|
283 + | Some(2) => {
|
284 + | builder.output_reserved_instances_will_expire_at = Some(deser.read_timestamp(member)?);
|
285 + | }
|
286 + | Some(3) => {
|
287 + | builder.payment_due = Some(deser.read_string(member)?);
|
288 + | }
|
289 + | Some(4) => {
|
290 + | builder.reserved_instance_value_rollup = Some(crate::types::ReservationValue::deserialize(deser)?);
|
291 + | }
|
292 + | Some(5) => {
|
293 + | builder.reserved_instance_value_set = Some({
|
294 + | let mut container = Vec::new();
|
295 + | deser.read_list(member, &mut |deser| {
|
296 + | container.push(crate::types::ReservedInstanceReservationValue::deserialize(deser)?);
|
297 + | Ok(())
|
298 + | })?;
|
299 + | container
|
300 + | });
|
301 + | }
|
302 + | Some(6) => {
|
303 + | builder.target_configuration_value_rollup = Some(crate::types::ReservationValue::deserialize(deser)?);
|
304 + | }
|
305 + | Some(7) => {
|
306 + | builder.target_configuration_value_set = Some({
|
307 + | let mut container = Vec::new();
|
308 + | deser.read_list(member, &mut |deser| {
|
309 + | container.push(crate::types::TargetReservationValue::deserialize(deser)?);
|
310 + | Ok(())
|
311 + | })?;
|
312 + | container
|
313 + | });
|
314 + | }
|
315 + | Some(8) => {
|
316 + | builder.validation_failure_reason = Some(deser.read_string(member)?);
|
317 + | }
|
318 + | Some(9) => {
|
319 + | builder._request_id = Some(deser.read_string(member)?);
|
320 + | }
|
321 + | _ => {}
|
322 + | }
|
323 + | Ok(())
|
324 + | })?;
|
325 + | Ok(builder.build())
|
326 + | }
|
327 + | }
|
328 + | impl GetReservedInstancesExchangeQuoteOutput {
|
329 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
330 + | /// Header-bound members are read directly from headers, avoiding runtime
|
331 + | /// member iteration overhead. Body members are read via the deserializer.
|
332 + | pub fn deserialize_with_response(
|
333 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
334 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
335 + | _status: u16,
|
336 + | _body: &[u8],
|
257 337 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
258 338 | #[allow(unused_variables, unused_mut)]
|
259 339 | let mut builder = Self::builder();
|
340 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
341 + | builder._request_id = Some(val.to_string());
|
342 + | }
|
260 343 | #[allow(
|
261 344 | unused_variables,
|
262 345 | unreachable_code,
|
263 346 | clippy::single_match,
|
264 347 | clippy::match_single_binding,
|
265 348 | clippy::diverging_sub_expression
|
266 349 | )]
|
267 - | deserializer.read_struct(&GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA, (), |_, member, deser| {
|
350 + | deserializer.read_struct(&GETRESERVEDINSTANCESEXCHANGEQUOTEOUTPUT_SCHEMA, &mut |member, deser| {
|
268 351 | match member.member_index() {
|
269 352 | Some(0) => {
|
270 353 | builder.currency_code = Some(deser.read_string(member)?);
|
271 354 | }
|
272 355 | Some(1) => {
|
273 356 | builder.is_valid_exchange = Some(deser.read_boolean(member)?);
|
274 357 | }
|
275 358 | Some(2) => {
|
276 359 | builder.output_reserved_instances_will_expire_at = Some(deser.read_timestamp(member)?);
|
277 360 | }
|
278 361 | Some(3) => {
|
279 362 | builder.payment_due = Some(deser.read_string(member)?);
|
280 363 | }
|
281 364 | Some(4) => {
|
282 365 | builder.reserved_instance_value_rollup = Some(crate::types::ReservationValue::deserialize(deser)?);
|
283 366 | }
|
284 367 | Some(5) => {
|
285 368 | builder.reserved_instance_value_set = Some({
|
286 - | let container = if let Some(cap) = deser.container_size() {
|
287 - | Vec::with_capacity(cap)
|
288 - | } else {
|
289 - | Vec::new()
|
290 - | };
|
291 - | deser.read_list(member, container, |mut list, deser| {
|
292 - | list.push(crate::types::ReservedInstanceReservationValue::deserialize(deser)?);
|
293 - | Ok(list)
|
294 - | })?
|
369 + | let mut container = Vec::new();
|
370 + | deser.read_list(member, &mut |deser| {
|
371 + | container.push(crate::types::ReservedInstanceReservationValue::deserialize(deser)?);
|
372 + | Ok(())
|
373 + | })?;
|
374 + | container
|
295 375 | });
|
296 376 | }
|
297 377 | Some(6) => {
|
298 378 | builder.target_configuration_value_rollup = Some(crate::types::ReservationValue::deserialize(deser)?);
|
299 379 | }
|
300 380 | Some(7) => {
|
301 381 | builder.target_configuration_value_set = Some({
|
302 - | let container = if let Some(cap) = deser.container_size() {
|
303 - | Vec::with_capacity(cap)
|
304 - | } else {
|
305 - | Vec::new()
|
306 - | };
|
307 - | deser.read_list(member, container, |mut list, deser| {
|
308 - | list.push(crate::types::TargetReservationValue::deserialize(deser)?);
|
309 - | Ok(list)
|
310 - | })?
|
382 + | let mut container = Vec::new();
|
383 + | deser.read_list(member, &mut |deser| {
|
384 + | container.push(crate::types::TargetReservationValue::deserialize(deser)?);
|
385 + | Ok(())
|
386 + | })?;
|
387 + | container
|
311 388 | });
|
312 389 | }
|
313 390 | Some(8) => {
|
314 391 | builder.validation_failure_reason = Some(deser.read_string(member)?);
|
315 392 | }
|
316 393 | _ => {}
|
317 394 | }
|
318 395 | Ok(())
|
319 396 | })?;
|
320 397 | Ok(builder.build())
|