67 67 | "com.amazonaws.ec2.synthetic",
|
68 68 | "DetachVolumeOutput",
|
69 69 | );
|
70 70 | static DETACHVOLUMEOUTPUT_MEMBER_DELETE_ON_TERMINATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
71 71 | ::aws_smithy_schema::ShapeId::from_static(
|
72 72 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$DeleteOnTermination",
|
73 73 | "com.amazonaws.ec2.synthetic",
|
74 74 | "DetachVolumeOutput",
|
75 75 | ),
|
76 76 | ::aws_smithy_schema::ShapeType::Boolean,
|
77 - | "delete_on_termination",
|
77 + | "DeleteOnTermination",
|
78 78 | 0,
|
79 79 | )
|
80 80 | .with_xml_name("deleteOnTermination");
|
81 81 | static DETACHVOLUMEOUTPUT_MEMBER_ASSOCIATED_RESOURCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
82 82 | ::aws_smithy_schema::ShapeId::from_static(
|
83 83 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$AssociatedResource",
|
84 84 | "com.amazonaws.ec2.synthetic",
|
85 85 | "DetachVolumeOutput",
|
86 86 | ),
|
87 87 | ::aws_smithy_schema::ShapeType::String,
|
88 - | "associated_resource",
|
88 + | "AssociatedResource",
|
89 89 | 1,
|
90 90 | )
|
91 91 | .with_xml_name("associatedResource");
|
92 92 | static DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_OWNING_SERVICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
93 93 | ::aws_smithy_schema::ShapeId::from_static(
|
94 94 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$InstanceOwningService",
|
95 95 | "com.amazonaws.ec2.synthetic",
|
96 96 | "DetachVolumeOutput",
|
97 97 | ),
|
98 98 | ::aws_smithy_schema::ShapeType::String,
|
99 - | "instance_owning_service",
|
99 + | "InstanceOwningService",
|
100 100 | 2,
|
101 101 | )
|
102 102 | .with_xml_name("instanceOwningService");
|
103 103 | static DETACHVOLUMEOUTPUT_MEMBER_VOLUME_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
104 104 | ::aws_smithy_schema::ShapeId::from_static(
|
105 105 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$VolumeId",
|
106 106 | "com.amazonaws.ec2.synthetic",
|
107 107 | "DetachVolumeOutput",
|
108 108 | ),
|
109 109 | ::aws_smithy_schema::ShapeType::String,
|
110 - | "volume_id",
|
110 + | "VolumeId",
|
111 111 | 3,
|
112 112 | )
|
113 113 | .with_xml_name("volumeId");
|
114 114 | static DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
115 115 | ::aws_smithy_schema::ShapeId::from_static(
|
116 116 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$InstanceId",
|
117 117 | "com.amazonaws.ec2.synthetic",
|
118 118 | "DetachVolumeOutput",
|
119 119 | ),
|
120 120 | ::aws_smithy_schema::ShapeType::String,
|
121 - | "instance_id",
|
121 + | "InstanceId",
|
122 122 | 4,
|
123 123 | )
|
124 124 | .with_xml_name("instanceId");
|
125 125 | static DETACHVOLUMEOUTPUT_MEMBER_DEVICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
126 126 | ::aws_smithy_schema::ShapeId::from_static(
|
127 127 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$Device",
|
128 128 | "com.amazonaws.ec2.synthetic",
|
129 129 | "DetachVolumeOutput",
|
130 130 | ),
|
131 131 | ::aws_smithy_schema::ShapeType::String,
|
132 - | "device",
|
132 + | "Device",
|
133 133 | 5,
|
134 134 | )
|
135 135 | .with_xml_name("device");
|
136 136 | static DETACHVOLUMEOUTPUT_MEMBER_STATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
137 137 | ::aws_smithy_schema::ShapeId::from_static(
|
138 138 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$State",
|
139 139 | "com.amazonaws.ec2.synthetic",
|
140 140 | "DetachVolumeOutput",
|
141 141 | ),
|
142 142 | ::aws_smithy_schema::ShapeType::String,
|
143 - | "state",
|
143 + | "State",
|
144 144 | 6,
|
145 145 | )
|
146 146 | .with_xml_name("status");
|
147 147 | static DETACHVOLUMEOUTPUT_MEMBER_ATTACH_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
148 148 | ::aws_smithy_schema::ShapeId::from_static(
|
149 149 | "com.amazonaws.ec2.synthetic#DetachVolumeOutput$AttachTime",
|
150 150 | "com.amazonaws.ec2.synthetic",
|
151 151 | "DetachVolumeOutput",
|
152 152 | ),
|
153 153 | ::aws_smithy_schema::ShapeType::Timestamp,
|
154 - | "attach_time",
|
154 + | "AttachTime",
|
155 155 | 7,
|
156 156 | )
|
157 157 | .with_xml_name("attachTime");
|
158 + | static DETACHVOLUMEOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
159 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
160 + | ::aws_smithy_schema::ShapeType::String,
|
161 + | "request_id",
|
162 + | 8,
|
163 + | )
|
164 + | .with_http_header("x-amzn-requestid");
|
158 165 | static DETACHVOLUMEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
159 166 | DETACHVOLUMEOUTPUT_SCHEMA_ID,
|
160 167 | ::aws_smithy_schema::ShapeType::Structure,
|
161 168 | &[
|
162 169 | &DETACHVOLUMEOUTPUT_MEMBER_DELETE_ON_TERMINATION,
|
163 170 | &DETACHVOLUMEOUTPUT_MEMBER_ASSOCIATED_RESOURCE,
|
164 171 | &DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_OWNING_SERVICE,
|
165 172 | &DETACHVOLUMEOUTPUT_MEMBER_VOLUME_ID,
|
166 173 | &DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_ID,
|
167 174 | &DETACHVOLUMEOUTPUT_MEMBER_DEVICE,
|
168 175 | &DETACHVOLUMEOUTPUT_MEMBER_STATE,
|
169 176 | &DETACHVOLUMEOUTPUT_MEMBER_ATTACH_TIME,
|
177 + | &DETACHVOLUMEOUTPUT_MEMBER__REQUEST_ID,
|
170 178 | ],
|
171 179 | );
|
172 180 | impl DetachVolumeOutput {
|
173 181 | /// The schema for this shape.
|
174 182 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DETACHVOLUMEOUTPUT_SCHEMA;
|
175 183 | }
|
176 184 | impl ::aws_smithy_schema::serde::SerializableStruct for DetachVolumeOutput {
|
177 185 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
178 186 | fn serialize_members(
|
179 187 | &self,
|
180 188 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
181 189 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
182 190 | if let Some(ref val) = self.delete_on_termination {
|
183 191 | ser.write_boolean(&DETACHVOLUMEOUTPUT_MEMBER_DELETE_ON_TERMINATION, *val)?;
|
184 192 | }
|
185 193 | if let Some(ref val) = self.associated_resource {
|
186 194 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_ASSOCIATED_RESOURCE, val)?;
|
187 195 | }
|
188 196 | if let Some(ref val) = self.instance_owning_service {
|
189 197 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_OWNING_SERVICE, val)?;
|
190 198 | }
|
191 199 | if let Some(ref val) = self.volume_id {
|
192 200 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_VOLUME_ID, val)?;
|
193 201 | }
|
194 202 | if let Some(ref val) = self.instance_id {
|
195 203 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_INSTANCE_ID, val)?;
|
196 204 | }
|
197 205 | if let Some(ref val) = self.device {
|
198 206 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_DEVICE, val)?;
|
199 207 | }
|
200 208 | if let Some(ref val) = self.state {
|
201 209 | ser.write_string(&DETACHVOLUMEOUTPUT_MEMBER_STATE, val.as_str())?;
|
202 210 | }
|
203 211 | if let Some(ref val) = self.attach_time {
|
204 212 | ser.write_timestamp(&DETACHVOLUMEOUTPUT_MEMBER_ATTACH_TIME, val)?;
|
205 213 | }
|
206 214 | Ok(())
|
207 215 | }
|
208 216 | }
|
209 217 | impl DetachVolumeOutput {
|
210 218 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
211 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
212 - | deserializer: &mut D,
|
219 + | pub fn deserialize(
|
220 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
213 221 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
214 222 | #[allow(unused_variables, unused_mut)]
|
215 223 | let mut builder = Self::builder();
|
216 224 | #[allow(
|
217 225 | unused_variables,
|
218 226 | unreachable_code,
|
219 227 | clippy::single_match,
|
220 228 | clippy::match_single_binding,
|
221 229 | clippy::diverging_sub_expression
|
222 230 | )]
|
223 - | deserializer.read_struct(&DETACHVOLUMEOUTPUT_SCHEMA, (), |_, member, deser| {
|
231 + | deserializer.read_struct(&DETACHVOLUMEOUTPUT_SCHEMA, &mut |member, deser| {
|
232 + | match member.member_index() {
|
233 + | Some(0) => {
|
234 + | builder.delete_on_termination = Some(deser.read_boolean(member)?);
|
235 + | }
|
236 + | Some(1) => {
|
237 + | builder.associated_resource = Some(deser.read_string(member)?);
|
238 + | }
|
239 + | Some(2) => {
|
240 + | builder.instance_owning_service = Some(deser.read_string(member)?);
|
241 + | }
|
242 + | Some(3) => {
|
243 + | builder.volume_id = Some(deser.read_string(member)?);
|
244 + | }
|
245 + | Some(4) => {
|
246 + | builder.instance_id = Some(deser.read_string(member)?);
|
247 + | }
|
248 + | Some(5) => {
|
249 + | builder.device = Some(deser.read_string(member)?);
|
250 + | }
|
251 + | Some(6) => {
|
252 + | builder.state = Some(crate::types::VolumeAttachmentState::from(deser.read_string(member)?.as_str()));
|
253 + | }
|
254 + | Some(7) => {
|
255 + | builder.attach_time = Some(deser.read_timestamp(member)?);
|
256 + | }
|
257 + | Some(8) => {
|
258 + | builder._request_id = Some(deser.read_string(member)?);
|
259 + | }
|
260 + | _ => {}
|
261 + | }
|
262 + | Ok(())
|
263 + | })?;
|
264 + | Ok(builder.build())
|
265 + | }
|
266 + | }
|
267 + | impl DetachVolumeOutput {
|
268 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
269 + | /// Header-bound members are read directly from headers, avoiding runtime
|
270 + | /// member iteration overhead. Body members are read via the deserializer.
|
271 + | pub fn deserialize_with_response(
|
272 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
273 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
274 + | _status: u16,
|
275 + | _body: &[u8],
|
276 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
277 + | #[allow(unused_variables, unused_mut)]
|
278 + | let mut builder = Self::builder();
|
279 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
280 + | builder._request_id = Some(val.to_string());
|
281 + | }
|
282 + | #[allow(
|
283 + | unused_variables,
|
284 + | unreachable_code,
|
285 + | clippy::single_match,
|
286 + | clippy::match_single_binding,
|
287 + | clippy::diverging_sub_expression
|
288 + | )]
|
289 + | deserializer.read_struct(&DETACHVOLUMEOUTPUT_SCHEMA, &mut |member, deser| {
|
224 290 | match member.member_index() {
|
225 291 | Some(0) => {
|
226 292 | builder.delete_on_termination = Some(deser.read_boolean(member)?);
|
227 293 | }
|
228 294 | Some(1) => {
|
229 295 | builder.associated_resource = Some(deser.read_string(member)?);
|
230 296 | }
|
231 297 | Some(2) => {
|
232 298 | builder.instance_owning_service = Some(deser.read_string(member)?);
|
233 299 | }
|