29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "CancelSpotFleetRequestsOutput",
|
31 31 | );
|
32 32 | static CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_SUCCESSFUL_FLEET_REQUESTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
33 33 | ::aws_smithy_schema::ShapeId::from_static(
|
34 34 | "com.amazonaws.ec2.synthetic#CancelSpotFleetRequestsOutput$SuccessfulFleetRequests",
|
35 35 | "com.amazonaws.ec2.synthetic",
|
36 36 | "CancelSpotFleetRequestsOutput",
|
37 37 | ),
|
38 38 | ::aws_smithy_schema::ShapeType::List,
|
39 - | "successful_fleet_requests",
|
39 + | "SuccessfulFleetRequests",
|
40 40 | 0,
|
41 41 | )
|
42 42 | .with_xml_name("successfulFleetRequestSet");
|
43 43 | static CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_UNSUCCESSFUL_FLEET_REQUESTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
44 44 | ::aws_smithy_schema::ShapeId::from_static(
|
45 45 | "com.amazonaws.ec2.synthetic#CancelSpotFleetRequestsOutput$UnsuccessfulFleetRequests",
|
46 46 | "com.amazonaws.ec2.synthetic",
|
47 47 | "CancelSpotFleetRequestsOutput",
|
48 48 | ),
|
49 49 | ::aws_smithy_schema::ShapeType::List,
|
50 - | "unsuccessful_fleet_requests",
|
50 + | "UnsuccessfulFleetRequests",
|
51 51 | 1,
|
52 52 | )
|
53 53 | .with_xml_name("unsuccessfulFleetRequestSet");
|
54 + | static CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
55 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
56 + | ::aws_smithy_schema::ShapeType::String,
|
57 + | "request_id",
|
58 + | 2,
|
59 + | )
|
60 + | .with_http_header("x-amzn-requestid");
|
54 61 | static CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
55 62 | CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA_ID,
|
56 63 | ::aws_smithy_schema::ShapeType::Structure,
|
57 64 | &[
|
58 65 | &CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_SUCCESSFUL_FLEET_REQUESTS,
|
59 66 | &CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_UNSUCCESSFUL_FLEET_REQUESTS,
|
67 + | &CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER__REQUEST_ID,
|
60 68 | ],
|
61 69 | );
|
62 70 | impl CancelSpotFleetRequestsOutput {
|
63 71 | /// The schema for this shape.
|
64 72 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA;
|
65 73 | }
|
66 74 | impl ::aws_smithy_schema::serde::SerializableStruct for CancelSpotFleetRequestsOutput {
|
67 75 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
68 76 | fn serialize_members(
|
69 77 | &self,
|
70 78 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
71 79 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
72 80 | if let Some(ref val) = self.successful_fleet_requests {
|
73 81 | ser.write_list(
|
74 82 | &CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_SUCCESSFUL_FLEET_REQUESTS,
|
75 83 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
76 84 | for item in val {
|
77 85 | ser.write_struct(crate::types::CancelSpotFleetRequestsSuccessItem::SCHEMA, item)?;
|
78 86 | }
|
79 87 | Ok(())
|
80 88 | },
|
81 89 | )?;
|
82 90 | }
|
83 91 | if let Some(ref val) = self.unsuccessful_fleet_requests {
|
84 92 | ser.write_list(
|
85 93 | &CANCELSPOTFLEETREQUESTSOUTPUT_MEMBER_UNSUCCESSFUL_FLEET_REQUESTS,
|
86 94 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
87 95 | for item in val {
|
88 96 | ser.write_struct(crate::types::CancelSpotFleetRequestsErrorItem::SCHEMA, item)?;
|
89 97 | }
|
90 98 | Ok(())
|
91 99 | },
|
92 100 | )?;
|
93 101 | }
|
94 102 | Ok(())
|
95 103 | }
|
96 104 | }
|
97 105 | impl CancelSpotFleetRequestsOutput {
|
98 106 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
99 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
100 - | deserializer: &mut D,
|
107 + | pub fn deserialize(
|
108 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
109 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
110 + | #[allow(unused_variables, unused_mut)]
|
111 + | let mut builder = Self::builder();
|
112 + | #[allow(
|
113 + | unused_variables,
|
114 + | unreachable_code,
|
115 + | clippy::single_match,
|
116 + | clippy::match_single_binding,
|
117 + | clippy::diverging_sub_expression
|
118 + | )]
|
119 + | deserializer.read_struct(&CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA, &mut |member, deser| {
|
120 + | match member.member_index() {
|
121 + | Some(0) => {
|
122 + | builder.successful_fleet_requests = Some({
|
123 + | let mut container = Vec::new();
|
124 + | deser.read_list(member, &mut |deser| {
|
125 + | container.push(crate::types::CancelSpotFleetRequestsSuccessItem::deserialize(deser)?);
|
126 + | Ok(())
|
127 + | })?;
|
128 + | container
|
129 + | });
|
130 + | }
|
131 + | Some(1) => {
|
132 + | builder.unsuccessful_fleet_requests = Some({
|
133 + | let mut container = Vec::new();
|
134 + | deser.read_list(member, &mut |deser| {
|
135 + | container.push(crate::types::CancelSpotFleetRequestsErrorItem::deserialize(deser)?);
|
136 + | Ok(())
|
137 + | })?;
|
138 + | container
|
139 + | });
|
140 + | }
|
141 + | Some(2) => {
|
142 + | builder._request_id = Some(deser.read_string(member)?);
|
143 + | }
|
144 + | _ => {}
|
145 + | }
|
146 + | Ok(())
|
147 + | })?;
|
148 + | Ok(builder.build())
|
149 + | }
|
150 + | }
|
151 + | impl CancelSpotFleetRequestsOutput {
|
152 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
153 + | /// Header-bound members are read directly from headers, avoiding runtime
|
154 + | /// member iteration overhead. Body members are read via the deserializer.
|
155 + | pub fn deserialize_with_response(
|
156 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
157 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
158 + | _status: u16,
|
159 + | _body: &[u8],
|
101 160 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
102 161 | #[allow(unused_variables, unused_mut)]
|
103 162 | let mut builder = Self::builder();
|
163 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
164 + | builder._request_id = Some(val.to_string());
|
165 + | }
|
104 166 | #[allow(
|
105 167 | unused_variables,
|
106 168 | unreachable_code,
|
107 169 | clippy::single_match,
|
108 170 | clippy::match_single_binding,
|
109 171 | clippy::diverging_sub_expression
|
110 172 | )]
|
111 - | deserializer.read_struct(&CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA, (), |_, member, deser| {
|
173 + | deserializer.read_struct(&CANCELSPOTFLEETREQUESTSOUTPUT_SCHEMA, &mut |member, deser| {
|
112 174 | match member.member_index() {
|
113 175 | Some(0) => {
|
114 176 | builder.successful_fleet_requests = Some({
|
115 - | let container = if let Some(cap) = deser.container_size() {
|
116 - | Vec::with_capacity(cap)
|
117 - | } else {
|
118 - | Vec::new()
|
119 - | };
|
120 - | deser.read_list(member, container, |mut list, deser| {
|
121 - | list.push(crate::types::CancelSpotFleetRequestsSuccessItem::deserialize(deser)?);
|
122 - | Ok(list)
|
123 - | })?
|
177 + | let mut container = Vec::new();
|
178 + | deser.read_list(member, &mut |deser| {
|
179 + | container.push(crate::types::CancelSpotFleetRequestsSuccessItem::deserialize(deser)?);
|
180 + | Ok(())
|
181 + | })?;
|
182 + | container
|
124 183 | });
|
125 184 | }
|
126 185 | Some(1) => {
|
127 186 | builder.unsuccessful_fleet_requests = Some({
|
128 - | let container = if let Some(cap) = deser.container_size() {
|
129 - | Vec::with_capacity(cap)
|
130 - | } else {
|
131 - | Vec::new()
|
132 - | };
|
133 - | deser.read_list(member, container, |mut list, deser| {
|
134 - | list.push(crate::types::CancelSpotFleetRequestsErrorItem::deserialize(deser)?);
|
135 - | Ok(list)
|
136 - | })?
|
187 + | let mut container = Vec::new();
|
188 + | deser.read_list(member, &mut |deser| {
|
189 + | container.push(crate::types::CancelSpotFleetRequestsErrorItem::deserialize(deser)?);
|
190 + | Ok(())
|
191 + | })?;
|
192 + | container
|
137 193 | });
|
138 194 | }
|
139 195 | _ => {}
|
140 196 | }
|
141 197 | Ok(())
|
142 198 | })?;
|
143 199 | Ok(builder.build())
|
144 200 | }
|
145 201 | }
|
146 202 | impl ::aws_types::request_id::RequestId for CancelSpotFleetRequestsOutput {
|