47 47 | "com.amazonaws.ec2.synthetic",
|
48 48 | "DescribeSpotFleetRequestHistoryOutput",
|
49 49 | );
|
50 50 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_HISTORY_RECORDS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
51 51 | ::aws_smithy_schema::ShapeId::from_static(
|
52 52 | "com.amazonaws.ec2.synthetic#DescribeSpotFleetRequestHistoryOutput$HistoryRecords",
|
53 53 | "com.amazonaws.ec2.synthetic",
|
54 54 | "DescribeSpotFleetRequestHistoryOutput",
|
55 55 | ),
|
56 56 | ::aws_smithy_schema::ShapeType::List,
|
57 - | "history_records",
|
57 + | "HistoryRecords",
|
58 58 | 0,
|
59 59 | )
|
60 60 | .with_xml_name("historyRecordSet");
|
61 61 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_LAST_EVALUATED_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
62 62 | ::aws_smithy_schema::ShapeId::from_static(
|
63 63 | "com.amazonaws.ec2.synthetic#DescribeSpotFleetRequestHistoryOutput$LastEvaluatedTime",
|
64 64 | "com.amazonaws.ec2.synthetic",
|
65 65 | "DescribeSpotFleetRequestHistoryOutput",
|
66 66 | ),
|
67 67 | ::aws_smithy_schema::ShapeType::Timestamp,
|
68 - | "last_evaluated_time",
|
68 + | "LastEvaluatedTime",
|
69 69 | 1,
|
70 70 | )
|
71 71 | .with_xml_name("lastEvaluatedTime");
|
72 72 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
73 73 | ::aws_smithy_schema::ShapeId::from_static(
|
74 74 | "com.amazonaws.ec2.synthetic#DescribeSpotFleetRequestHistoryOutput$NextToken",
|
75 75 | "com.amazonaws.ec2.synthetic",
|
76 76 | "DescribeSpotFleetRequestHistoryOutput",
|
77 77 | ),
|
78 78 | ::aws_smithy_schema::ShapeType::String,
|
79 - | "next_token",
|
79 + | "NextToken",
|
80 80 | 2,
|
81 81 | )
|
82 82 | .with_xml_name("nextToken");
|
83 83 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_SPOT_FLEET_REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
84 84 | ::aws_smithy_schema::ShapeId::from_static(
|
85 85 | "com.amazonaws.ec2.synthetic#DescribeSpotFleetRequestHistoryOutput$SpotFleetRequestId",
|
86 86 | "com.amazonaws.ec2.synthetic",
|
87 87 | "DescribeSpotFleetRequestHistoryOutput",
|
88 88 | ),
|
89 89 | ::aws_smithy_schema::ShapeType::String,
|
90 - | "spot_fleet_request_id",
|
90 + | "SpotFleetRequestId",
|
91 91 | 3,
|
92 92 | )
|
93 93 | .with_xml_name("spotFleetRequestId");
|
94 94 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_START_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "com.amazonaws.ec2.synthetic#DescribeSpotFleetRequestHistoryOutput$StartTime",
|
97 97 | "com.amazonaws.ec2.synthetic",
|
98 98 | "DescribeSpotFleetRequestHistoryOutput",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::Timestamp,
|
101 - | "start_time",
|
101 + | "StartTime",
|
102 102 | 4,
|
103 103 | )
|
104 104 | .with_xml_name("startTime");
|
105 + | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
106 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
107 + | ::aws_smithy_schema::ShapeType::String,
|
108 + | "request_id",
|
109 + | 5,
|
110 + | )
|
111 + | .with_http_header("x-amzn-requestid");
|
105 112 | static DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
106 113 | DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA_ID,
|
107 114 | ::aws_smithy_schema::ShapeType::Structure,
|
108 115 | &[
|
109 116 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_HISTORY_RECORDS,
|
110 117 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_LAST_EVALUATED_TIME,
|
111 118 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_NEXT_TOKEN,
|
112 119 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_SPOT_FLEET_REQUEST_ID,
|
113 120 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_START_TIME,
|
121 + | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER__REQUEST_ID,
|
114 122 | ],
|
115 123 | );
|
116 124 | impl DescribeSpotFleetRequestHistoryOutput {
|
117 125 | /// The schema for this shape.
|
118 126 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA;
|
119 127 | }
|
120 128 | impl ::aws_smithy_schema::serde::SerializableStruct for DescribeSpotFleetRequestHistoryOutput {
|
121 129 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
122 130 | fn serialize_members(
|
123 131 | &self,
|
124 132 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
125 133 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
126 134 | if let Some(ref val) = self.history_records {
|
127 135 | ser.write_list(
|
128 136 | &DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_HISTORY_RECORDS,
|
129 137 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
130 138 | for item in val {
|
131 139 | ser.write_struct(crate::types::HistoryRecord::SCHEMA, item)?;
|
132 140 | }
|
133 141 | Ok(())
|
134 142 | },
|
135 143 | )?;
|
136 144 | }
|
137 145 | if let Some(ref val) = self.last_evaluated_time {
|
138 146 | ser.write_timestamp(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_LAST_EVALUATED_TIME, val)?;
|
139 147 | }
|
140 148 | if let Some(ref val) = self.next_token {
|
141 149 | ser.write_string(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_NEXT_TOKEN, val)?;
|
142 150 | }
|
143 151 | if let Some(ref val) = self.spot_fleet_request_id {
|
144 152 | ser.write_string(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_SPOT_FLEET_REQUEST_ID, val)?;
|
145 153 | }
|
146 154 | if let Some(ref val) = self.start_time {
|
147 155 | ser.write_timestamp(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_MEMBER_START_TIME, val)?;
|
148 156 | }
|
149 157 | Ok(())
|
150 158 | }
|
151 159 | }
|
152 160 | impl DescribeSpotFleetRequestHistoryOutput {
|
153 161 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
154 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
155 - | deserializer: &mut D,
|
162 + | pub fn deserialize(
|
163 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
156 164 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
157 165 | #[allow(unused_variables, unused_mut)]
|
158 166 | let mut builder = Self::builder();
|
159 167 | #[allow(
|
160 168 | unused_variables,
|
161 169 | unreachable_code,
|
162 170 | clippy::single_match,
|
163 171 | clippy::match_single_binding,
|
164 172 | clippy::diverging_sub_expression
|
165 173 | )]
|
166 - | deserializer.read_struct(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA, (), |_, member, deser| {
|
174 + | deserializer.read_struct(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA, &mut |member, deser| {
|
167 175 | match member.member_index() {
|
168 176 | Some(0) => {
|
169 177 | builder.history_records = Some({
|
170 - | let container = if let Some(cap) = deser.container_size() {
|
171 - | Vec::with_capacity(cap)
|
172 - | } else {
|
173 - | Vec::new()
|
174 - | };
|
175 - | deser.read_list(member, container, |mut list, deser| {
|
176 - | list.push(crate::types::HistoryRecord::deserialize(deser)?);
|
177 - | Ok(list)
|
178 - | })?
|
178 + | let mut container = Vec::new();
|
179 + | deser.read_list(member, &mut |deser| {
|
180 + | container.push(crate::types::HistoryRecord::deserialize(deser)?);
|
181 + | Ok(())
|
182 + | })?;
|
183 + | container
|
184 + | });
|
185 + | }
|
186 + | Some(1) => {
|
187 + | builder.last_evaluated_time = Some(deser.read_timestamp(member)?);
|
188 + | }
|
189 + | Some(2) => {
|
190 + | builder.next_token = Some(deser.read_string(member)?);
|
191 + | }
|
192 + | Some(3) => {
|
193 + | builder.spot_fleet_request_id = Some(deser.read_string(member)?);
|
194 + | }
|
195 + | Some(4) => {
|
196 + | builder.start_time = Some(deser.read_timestamp(member)?);
|
197 + | }
|
198 + | Some(5) => {
|
199 + | builder._request_id = Some(deser.read_string(member)?);
|
200 + | }
|
201 + | _ => {}
|
202 + | }
|
203 + | Ok(())
|
204 + | })?;
|
205 + | Ok(builder.build())
|
206 + | }
|
207 + | }
|
208 + | impl DescribeSpotFleetRequestHistoryOutput {
|
209 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
210 + | /// Header-bound members are read directly from headers, avoiding runtime
|
211 + | /// member iteration overhead. Body members are read via the deserializer.
|
212 + | pub fn deserialize_with_response(
|
213 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
214 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
215 + | _status: u16,
|
216 + | _body: &[u8],
|
217 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
218 + | #[allow(unused_variables, unused_mut)]
|
219 + | let mut builder = Self::builder();
|
220 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
221 + | builder._request_id = Some(val.to_string());
|
222 + | }
|
223 + | #[allow(
|
224 + | unused_variables,
|
225 + | unreachable_code,
|
226 + | clippy::single_match,
|
227 + | clippy::match_single_binding,
|
228 + | clippy::diverging_sub_expression
|
229 + | )]
|
230 + | deserializer.read_struct(&DESCRIBESPOTFLEETREQUESTHISTORYOUTPUT_SCHEMA, &mut |member, deser| {
|
231 + | match member.member_index() {
|
232 + | Some(0) => {
|
233 + | builder.history_records = Some({
|
234 + | let mut container = Vec::new();
|
235 + | deser.read_list(member, &mut |deser| {
|
236 + | container.push(crate::types::HistoryRecord::deserialize(deser)?);
|
237 + | Ok(())
|
238 + | })?;
|
239 + | container
|
179 240 | });
|
180 241 | }
|
181 242 | Some(1) => {
|
182 243 | builder.last_evaluated_time = Some(deser.read_timestamp(member)?);
|
183 244 | }
|
184 245 | Some(2) => {
|
185 246 | builder.next_token = Some(deser.read_string(member)?);
|
186 247 | }
|
187 248 | Some(3) => {
|
188 249 | builder.spot_fleet_request_id = Some(deser.read_string(member)?);
|