122 122 | "com.amazonaws.ec2.synthetic",
|
123 123 | "RequestSpotInstancesInput",
|
124 124 | );
|
125 125 | static REQUESTSPOTINSTANCESINPUT_MEMBER_LAUNCH_SPECIFICATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
126 126 | ::aws_smithy_schema::ShapeId::from_static(
|
127 127 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$LaunchSpecification",
|
128 128 | "com.amazonaws.ec2.synthetic",
|
129 129 | "RequestSpotInstancesInput",
|
130 130 | ),
|
131 131 | ::aws_smithy_schema::ShapeType::Structure,
|
132 - | "launch_specification",
|
132 + | "LaunchSpecification",
|
133 133 | 0,
|
134 134 | );
|
135 135 | static REQUESTSPOTINSTANCESINPUT_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$TagSpecifications",
|
138 138 | "com.amazonaws.ec2.synthetic",
|
139 139 | "RequestSpotInstancesInput",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::List,
|
142 - | "tag_specifications",
|
142 + | "TagSpecifications",
|
143 143 | 1,
|
144 144 | )
|
145 145 | .with_xml_name("TagSpecification");
|
146 146 | static REQUESTSPOTINSTANCESINPUT_MEMBER_INSTANCE_INTERRUPTION_BEHAVIOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
147 147 | ::aws_smithy_schema::ShapeId::from_static(
|
148 148 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$InstanceInterruptionBehavior",
|
149 149 | "com.amazonaws.ec2.synthetic",
|
150 150 | "RequestSpotInstancesInput",
|
151 151 | ),
|
152 152 | ::aws_smithy_schema::ShapeType::String,
|
153 - | "instance_interruption_behavior",
|
153 + | "InstanceInterruptionBehavior",
|
154 154 | 2,
|
155 155 | );
|
156 156 | static REQUESTSPOTINSTANCESINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
157 157 | ::aws_smithy_schema::ShapeId::from_static(
|
158 158 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$DryRun",
|
159 159 | "com.amazonaws.ec2.synthetic",
|
160 160 | "RequestSpotInstancesInput",
|
161 161 | ),
|
162 162 | ::aws_smithy_schema::ShapeType::Boolean,
|
163 - | "dry_run",
|
163 + | "DryRun",
|
164 164 | 3,
|
165 165 | )
|
166 166 | .with_xml_name("dryRun");
|
167 167 | static REQUESTSPOTINSTANCESINPUT_MEMBER_SPOT_PRICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
168 168 | ::aws_smithy_schema::ShapeId::from_static(
|
169 169 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$SpotPrice",
|
170 170 | "com.amazonaws.ec2.synthetic",
|
171 171 | "RequestSpotInstancesInput",
|
172 172 | ),
|
173 173 | ::aws_smithy_schema::ShapeType::String,
|
174 - | "spot_price",
|
174 + | "SpotPrice",
|
175 175 | 4,
|
176 176 | )
|
177 177 | .with_xml_name("spotPrice");
|
178 178 | static REQUESTSPOTINSTANCESINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
179 179 | ::aws_smithy_schema::ShapeId::from_static(
|
180 180 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$ClientToken",
|
181 181 | "com.amazonaws.ec2.synthetic",
|
182 182 | "RequestSpotInstancesInput",
|
183 183 | ),
|
184 184 | ::aws_smithy_schema::ShapeType::String,
|
185 - | "client_token",
|
185 + | "ClientToken",
|
186 186 | 5,
|
187 187 | )
|
188 188 | .with_xml_name("clientToken");
|
189 189 | static REQUESTSPOTINSTANCESINPUT_MEMBER_INSTANCE_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
190 190 | ::aws_smithy_schema::ShapeId::from_static(
|
191 191 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$InstanceCount",
|
192 192 | "com.amazonaws.ec2.synthetic",
|
193 193 | "RequestSpotInstancesInput",
|
194 194 | ),
|
195 195 | ::aws_smithy_schema::ShapeType::Integer,
|
196 - | "instance_count",
|
196 + | "InstanceCount",
|
197 197 | 6,
|
198 198 | )
|
199 199 | .with_xml_name("instanceCount");
|
200 200 | static REQUESTSPOTINSTANCESINPUT_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
201 201 | ::aws_smithy_schema::ShapeId::from_static(
|
202 202 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$Type",
|
203 203 | "com.amazonaws.ec2.synthetic",
|
204 204 | "RequestSpotInstancesInput",
|
205 205 | ),
|
206 206 | ::aws_smithy_schema::ShapeType::String,
|
207 - | "r##type",
|
207 + | "Type",
|
208 208 | 7,
|
209 209 | )
|
210 210 | .with_xml_name("type");
|
211 211 | static REQUESTSPOTINSTANCESINPUT_MEMBER_VALID_FROM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
212 212 | ::aws_smithy_schema::ShapeId::from_static(
|
213 213 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$ValidFrom",
|
214 214 | "com.amazonaws.ec2.synthetic",
|
215 215 | "RequestSpotInstancesInput",
|
216 216 | ),
|
217 217 | ::aws_smithy_schema::ShapeType::Timestamp,
|
218 - | "valid_from",
|
218 + | "ValidFrom",
|
219 219 | 8,
|
220 220 | )
|
221 221 | .with_xml_name("validFrom");
|
222 222 | static REQUESTSPOTINSTANCESINPUT_MEMBER_VALID_UNTIL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
223 223 | ::aws_smithy_schema::ShapeId::from_static(
|
224 224 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$ValidUntil",
|
225 225 | "com.amazonaws.ec2.synthetic",
|
226 226 | "RequestSpotInstancesInput",
|
227 227 | ),
|
228 228 | ::aws_smithy_schema::ShapeType::Timestamp,
|
229 - | "valid_until",
|
229 + | "ValidUntil",
|
230 230 | 9,
|
231 231 | )
|
232 232 | .with_xml_name("validUntil");
|
233 233 | static REQUESTSPOTINSTANCESINPUT_MEMBER_LAUNCH_GROUP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
234 234 | ::aws_smithy_schema::ShapeId::from_static(
|
235 235 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$LaunchGroup",
|
236 236 | "com.amazonaws.ec2.synthetic",
|
237 237 | "RequestSpotInstancesInput",
|
238 238 | ),
|
239 239 | ::aws_smithy_schema::ShapeType::String,
|
240 - | "launch_group",
|
240 + | "LaunchGroup",
|
241 241 | 10,
|
242 242 | )
|
243 243 | .with_xml_name("launchGroup");
|
244 244 | static REQUESTSPOTINSTANCESINPUT_MEMBER_AVAILABILITY_ZONE_GROUP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
245 245 | ::aws_smithy_schema::ShapeId::from_static(
|
246 246 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$AvailabilityZoneGroup",
|
247 247 | "com.amazonaws.ec2.synthetic",
|
248 248 | "RequestSpotInstancesInput",
|
249 249 | ),
|
250 250 | ::aws_smithy_schema::ShapeType::String,
|
251 - | "availability_zone_group",
|
251 + | "AvailabilityZoneGroup",
|
252 252 | 11,
|
253 253 | )
|
254 254 | .with_xml_name("availabilityZoneGroup");
|
255 255 | static REQUESTSPOTINSTANCESINPUT_MEMBER_BLOCK_DURATION_MINUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
256 256 | ::aws_smithy_schema::ShapeId::from_static(
|
257 257 | "com.amazonaws.ec2.synthetic#RequestSpotInstancesInput$BlockDurationMinutes",
|
258 258 | "com.amazonaws.ec2.synthetic",
|
259 259 | "RequestSpotInstancesInput",
|
260 260 | ),
|
261 261 | ::aws_smithy_schema::ShapeType::Integer,
|
262 - | "block_duration_minutes",
|
262 + | "BlockDurationMinutes",
|
263 263 | 12,
|
264 264 | )
|
265 265 | .with_xml_name("blockDurationMinutes");
|
266 266 | static REQUESTSPOTINSTANCESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
267 267 | REQUESTSPOTINSTANCESINPUT_SCHEMA_ID,
|
268 268 | ::aws_smithy_schema::ShapeType::Structure,
|
269 269 | &[
|
270 270 | &REQUESTSPOTINSTANCESINPUT_MEMBER_LAUNCH_SPECIFICATION,
|
271 271 | &REQUESTSPOTINSTANCESINPUT_MEMBER_TAG_SPECIFICATIONS,
|
272 272 | &REQUESTSPOTINSTANCESINPUT_MEMBER_INSTANCE_INTERRUPTION_BEHAVIOR,
|
337 337 | ser.write_string(&REQUESTSPOTINSTANCESINPUT_MEMBER_AVAILABILITY_ZONE_GROUP, val)?;
|
338 338 | }
|
339 339 | if let Some(ref val) = self.block_duration_minutes {
|
340 340 | ser.write_integer(&REQUESTSPOTINSTANCESINPUT_MEMBER_BLOCK_DURATION_MINUTES, *val)?;
|
341 341 | }
|
342 342 | Ok(())
|
343 343 | }
|
344 344 | }
|
345 345 | impl RequestSpotInstancesInput {
|
346 346 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
347 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
348 - | deserializer: &mut D,
|
347 + | pub fn deserialize(
|
348 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
349 349 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
350 350 | #[allow(unused_variables, unused_mut)]
|
351 351 | let mut builder = Self::builder();
|
352 352 | #[allow(
|
353 353 | unused_variables,
|
354 354 | unreachable_code,
|
355 355 | clippy::single_match,
|
356 356 | clippy::match_single_binding,
|
357 357 | clippy::diverging_sub_expression
|
358 358 | )]
|
359 - | deserializer.read_struct(&REQUESTSPOTINSTANCESINPUT_SCHEMA, (), |_, member, deser| {
|
359 + | deserializer.read_struct(&REQUESTSPOTINSTANCESINPUT_SCHEMA, &mut |member, deser| {
|
360 360 | match member.member_index() {
|
361 361 | Some(0) => {
|
362 362 | builder.launch_specification = Some(crate::types::RequestSpotLaunchSpecification::deserialize(deser)?);
|
363 363 | }
|
364 364 | Some(1) => {
|
365 365 | builder.tag_specifications = Some({
|
366 - | let container = if let Some(cap) = deser.container_size() {
|
367 - | Vec::with_capacity(cap)
|
368 - | } else {
|
369 - | Vec::new()
|
370 - | };
|
371 - | deser.read_list(member, container, |mut list, deser| {
|
372 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
373 - | Ok(list)
|
374 - | })?
|
366 + | let mut container = Vec::new();
|
367 + | deser.read_list(member, &mut |deser| {
|
368 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
369 + | Ok(())
|
370 + | })?;
|
371 + | container
|
375 372 | });
|
376 373 | }
|
377 374 | Some(2) => {
|
378 375 | builder.instance_interruption_behavior =
|
379 376 | Some(crate::types::InstanceInterruptionBehavior::from(deser.read_string(member)?.as_str()));
|
380 377 | }
|
381 378 | Some(3) => {
|
382 379 | builder.dry_run = Some(deser.read_boolean(member)?);
|
383 380 | }
|
384 381 | Some(4) => {
|
385 382 | builder.spot_price = Some(deser.read_string(member)?);
|
386 383 | }
|
387 384 | Some(5) => {
|
388 385 | builder.client_token = Some(deser.read_string(member)?);
|
389 386 | }
|
390 387 | Some(6) => {
|
391 388 | builder.instance_count = Some(deser.read_integer(member)?);
|
392 389 | }
|
393 390 | Some(7) => {
|
394 391 | builder.r#type = Some(crate::types::SpotInstanceType::from(deser.read_string(member)?.as_str()));
|
395 392 | }
|
396 393 | Some(8) => {
|
397 394 | builder.valid_from = Some(deser.read_timestamp(member)?);
|
398 395 | }
|
399 396 | Some(9) => {
|
400 397 | builder.valid_until = Some(deser.read_timestamp(member)?);
|
401 398 | }
|
402 399 | Some(10) => {
|
403 400 | builder.launch_group = Some(deser.read_string(member)?);
|
404 401 | }
|
405 402 | Some(11) => {
|
406 403 | builder.availability_zone_group = Some(deser.read_string(member)?);
|
407 404 | }
|
408 405 | Some(12) => {
|
409 406 | builder.block_duration_minutes = Some(deser.read_integer(member)?);
|
410 407 | }
|
411 408 | _ => {}
|
412 409 | }
|
413 410 | Ok(())
|
414 411 | })?;
|
415 412 | builder
|
416 413 | .build()
|
417 414 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
418 415 | }
|
419 416 | }
|
417 + | impl RequestSpotInstancesInput {
|
418 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
419 + | pub fn deserialize_with_response(
|
420 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
421 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
422 + | _status: u16,
|
423 + | _body: &[u8],
|
424 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
425 + | Self::deserialize(deserializer)
|
426 + | }
|
427 + | }
|
420 428 | impl RequestSpotInstancesInput {
|
421 429 | /// Creates a new builder-style object to manufacture [`RequestSpotInstancesInput`](crate::operation::request_spot_instances::RequestSpotInstancesInput).
|
422 430 | pub fn builder() -> crate::operation::request_spot_instances::builders::RequestSpotInstancesInputBuilder {
|
423 431 | crate::operation::request_spot_instances::builders::RequestSpotInstancesInputBuilder::default()
|
424 432 | }
|
425 433 | }
|
426 434 |
|
427 435 | /// A builder for [`RequestSpotInstancesInput`](crate::operation::request_spot_instances::RequestSpotInstancesInput).
|
428 436 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
429 437 | #[non_exhaustive]
|