80 80 | "com.amazonaws.ec2.synthetic",
|
81 81 | "LockSnapshotOutput",
|
82 82 | );
|
83 83 | static LOCKSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_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#LockSnapshotOutput$SnapshotId",
|
86 86 | "com.amazonaws.ec2.synthetic",
|
87 87 | "LockSnapshotOutput",
|
88 88 | ),
|
89 89 | ::aws_smithy_schema::ShapeType::String,
|
90 - | "snapshot_id",
|
90 + | "SnapshotId",
|
91 91 | 0,
|
92 92 | )
|
93 93 | .with_xml_name("snapshotId");
|
94 94 | static LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_STATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$LockState",
|
97 97 | "com.amazonaws.ec2.synthetic",
|
98 98 | "LockSnapshotOutput",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::String,
|
101 - | "lock_state",
|
101 + | "LockState",
|
102 102 | 1,
|
103 103 | )
|
104 104 | .with_xml_name("lockState");
|
105 105 | static LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
106 106 | ::aws_smithy_schema::ShapeId::from_static(
|
107 107 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$LockDuration",
|
108 108 | "com.amazonaws.ec2.synthetic",
|
109 109 | "LockSnapshotOutput",
|
110 110 | ),
|
111 111 | ::aws_smithy_schema::ShapeType::Integer,
|
112 - | "lock_duration",
|
112 + | "LockDuration",
|
113 113 | 2,
|
114 114 | )
|
115 115 | .with_xml_name("lockDuration");
|
116 116 | static LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
117 117 | ::aws_smithy_schema::ShapeId::from_static(
|
118 118 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$CoolOffPeriod",
|
119 119 | "com.amazonaws.ec2.synthetic",
|
120 120 | "LockSnapshotOutput",
|
121 121 | ),
|
122 122 | ::aws_smithy_schema::ShapeType::Integer,
|
123 - | "cool_off_period",
|
123 + | "CoolOffPeriod",
|
124 124 | 3,
|
125 125 | )
|
126 126 | .with_xml_name("coolOffPeriod");
|
127 127 | static LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD_EXPIRES_ON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
128 128 | ::aws_smithy_schema::ShapeId::from_static(
|
129 129 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$CoolOffPeriodExpiresOn",
|
130 130 | "com.amazonaws.ec2.synthetic",
|
131 131 | "LockSnapshotOutput",
|
132 132 | ),
|
133 133 | ::aws_smithy_schema::ShapeType::Timestamp,
|
134 - | "cool_off_period_expires_on",
|
134 + | "CoolOffPeriodExpiresOn",
|
135 135 | 4,
|
136 136 | )
|
137 137 | .with_xml_name("coolOffPeriodExpiresOn");
|
138 138 | static LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_CREATED_ON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
139 139 | ::aws_smithy_schema::ShapeId::from_static(
|
140 140 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$LockCreatedOn",
|
141 141 | "com.amazonaws.ec2.synthetic",
|
142 142 | "LockSnapshotOutput",
|
143 143 | ),
|
144 144 | ::aws_smithy_schema::ShapeType::Timestamp,
|
145 - | "lock_created_on",
|
145 + | "LockCreatedOn",
|
146 146 | 5,
|
147 147 | )
|
148 148 | .with_xml_name("lockCreatedOn");
|
149 149 | static LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_EXPIRES_ON: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
150 150 | ::aws_smithy_schema::ShapeId::from_static(
|
151 151 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$LockExpiresOn",
|
152 152 | "com.amazonaws.ec2.synthetic",
|
153 153 | "LockSnapshotOutput",
|
154 154 | ),
|
155 155 | ::aws_smithy_schema::ShapeType::Timestamp,
|
156 - | "lock_expires_on",
|
156 + | "LockExpiresOn",
|
157 157 | 6,
|
158 158 | )
|
159 159 | .with_xml_name("lockExpiresOn");
|
160 160 | static LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION_START_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
161 161 | ::aws_smithy_schema::ShapeId::from_static(
|
162 162 | "com.amazonaws.ec2.synthetic#LockSnapshotOutput$LockDurationStartTime",
|
163 163 | "com.amazonaws.ec2.synthetic",
|
164 164 | "LockSnapshotOutput",
|
165 165 | ),
|
166 166 | ::aws_smithy_schema::ShapeType::Timestamp,
|
167 - | "lock_duration_start_time",
|
167 + | "LockDurationStartTime",
|
168 168 | 7,
|
169 169 | )
|
170 170 | .with_xml_name("lockDurationStartTime");
|
171 + | static LOCKSNAPSHOTOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
172 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
173 + | ::aws_smithy_schema::ShapeType::String,
|
174 + | "request_id",
|
175 + | 8,
|
176 + | )
|
177 + | .with_http_header("x-amzn-requestid");
|
171 178 | static LOCKSNAPSHOTOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
172 179 | LOCKSNAPSHOTOUTPUT_SCHEMA_ID,
|
173 180 | ::aws_smithy_schema::ShapeType::Structure,
|
174 181 | &[
|
175 182 | &LOCKSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_ID,
|
176 183 | &LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_STATE,
|
177 184 | &LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION,
|
178 185 | &LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD,
|
179 186 | &LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD_EXPIRES_ON,
|
180 187 | &LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_CREATED_ON,
|
181 188 | &LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_EXPIRES_ON,
|
182 189 | &LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION_START_TIME,
|
190 + | &LOCKSNAPSHOTOUTPUT_MEMBER__REQUEST_ID,
|
183 191 | ],
|
184 192 | );
|
185 193 | impl LockSnapshotOutput {
|
186 194 | /// The schema for this shape.
|
187 195 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &LOCKSNAPSHOTOUTPUT_SCHEMA;
|
188 196 | }
|
189 197 | impl ::aws_smithy_schema::serde::SerializableStruct for LockSnapshotOutput {
|
190 198 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
191 199 | fn serialize_members(
|
192 200 | &self,
|
193 201 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
194 202 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
195 203 | if let Some(ref val) = self.snapshot_id {
|
196 204 | ser.write_string(&LOCKSNAPSHOTOUTPUT_MEMBER_SNAPSHOT_ID, val)?;
|
197 205 | }
|
198 206 | if let Some(ref val) = self.lock_state {
|
199 207 | ser.write_string(&LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_STATE, val.as_str())?;
|
200 208 | }
|
201 209 | if let Some(ref val) = self.lock_duration {
|
202 210 | ser.write_integer(&LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION, *val)?;
|
203 211 | }
|
204 212 | if let Some(ref val) = self.cool_off_period {
|
205 213 | ser.write_integer(&LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD, *val)?;
|
206 214 | }
|
207 215 | if let Some(ref val) = self.cool_off_period_expires_on {
|
208 216 | ser.write_timestamp(&LOCKSNAPSHOTOUTPUT_MEMBER_COOL_OFF_PERIOD_EXPIRES_ON, val)?;
|
209 217 | }
|
210 218 | if let Some(ref val) = self.lock_created_on {
|
211 219 | ser.write_timestamp(&LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_CREATED_ON, val)?;
|
212 220 | }
|
213 221 | if let Some(ref val) = self.lock_expires_on {
|
214 222 | ser.write_timestamp(&LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_EXPIRES_ON, val)?;
|
215 223 | }
|
216 224 | if let Some(ref val) = self.lock_duration_start_time {
|
217 225 | ser.write_timestamp(&LOCKSNAPSHOTOUTPUT_MEMBER_LOCK_DURATION_START_TIME, val)?;
|
218 226 | }
|
219 227 | Ok(())
|
220 228 | }
|
221 229 | }
|
222 230 | impl LockSnapshotOutput {
|
223 231 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
224 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
225 - | deserializer: &mut D,
|
232 + | pub fn deserialize(
|
233 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
226 234 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
227 235 | #[allow(unused_variables, unused_mut)]
|
228 236 | let mut builder = Self::builder();
|
229 237 | #[allow(
|
230 238 | unused_variables,
|
231 239 | unreachable_code,
|
232 240 | clippy::single_match,
|
233 241 | clippy::match_single_binding,
|
234 242 | clippy::diverging_sub_expression
|
235 243 | )]
|
236 - | deserializer.read_struct(&LOCKSNAPSHOTOUTPUT_SCHEMA, (), |_, member, deser| {
|
244 + | deserializer.read_struct(&LOCKSNAPSHOTOUTPUT_SCHEMA, &mut |member, deser| {
|
245 + | match member.member_index() {
|
246 + | Some(0) => {
|
247 + | builder.snapshot_id = Some(deser.read_string(member)?);
|
248 + | }
|
249 + | Some(1) => {
|
250 + | builder.lock_state = Some(crate::types::LockState::from(deser.read_string(member)?.as_str()));
|
251 + | }
|
252 + | Some(2) => {
|
253 + | builder.lock_duration = Some(deser.read_integer(member)?);
|
254 + | }
|
255 + | Some(3) => {
|
256 + | builder.cool_off_period = Some(deser.read_integer(member)?);
|
257 + | }
|
258 + | Some(4) => {
|
259 + | builder.cool_off_period_expires_on = Some(deser.read_timestamp(member)?);
|
260 + | }
|
261 + | Some(5) => {
|
262 + | builder.lock_created_on = Some(deser.read_timestamp(member)?);
|
263 + | }
|
264 + | Some(6) => {
|
265 + | builder.lock_expires_on = Some(deser.read_timestamp(member)?);
|
266 + | }
|
267 + | Some(7) => {
|
268 + | builder.lock_duration_start_time = Some(deser.read_timestamp(member)?);
|
269 + | }
|
270 + | Some(8) => {
|
271 + | builder._request_id = Some(deser.read_string(member)?);
|
272 + | }
|
273 + | _ => {}
|
274 + | }
|
275 + | Ok(())
|
276 + | })?;
|
277 + | Ok(builder.build())
|
278 + | }
|
279 + | }
|
280 + | impl LockSnapshotOutput {
|
281 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
282 + | /// Header-bound members are read directly from headers, avoiding runtime
|
283 + | /// member iteration overhead. Body members are read via the deserializer.
|
284 + | pub fn deserialize_with_response(
|
285 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
286 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
287 + | _status: u16,
|
288 + | _body: &[u8],
|
289 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
290 + | #[allow(unused_variables, unused_mut)]
|
291 + | let mut builder = Self::builder();
|
292 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
293 + | builder._request_id = Some(val.to_string());
|
294 + | }
|
295 + | #[allow(
|
296 + | unused_variables,
|
297 + | unreachable_code,
|
298 + | clippy::single_match,
|
299 + | clippy::match_single_binding,
|
300 + | clippy::diverging_sub_expression
|
301 + | )]
|
302 + | deserializer.read_struct(&LOCKSNAPSHOTOUTPUT_SCHEMA, &mut |member, deser| {
|
237 303 | match member.member_index() {
|
238 304 | Some(0) => {
|
239 305 | builder.snapshot_id = Some(deser.read_string(member)?);
|
240 306 | }
|
241 307 | Some(1) => {
|
242 308 | builder.lock_state = Some(crate::types::LockState::from(deser.read_string(member)?.as_str()));
|
243 309 | }
|
244 310 | Some(2) => {
|
245 311 | builder.lock_duration = Some(deser.read_integer(member)?);
|
246 312 | }
|