109 109 | "com.amazonaws.s3.synthetic",
|
110 110 | "DeleteObjectsInput",
|
111 111 | );
|
112 112 | static DELETEOBJECTSINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
113 113 | ::aws_smithy_schema::ShapeId::from_static(
|
114 114 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$Bucket",
|
115 115 | "com.amazonaws.s3.synthetic",
|
116 116 | "DeleteObjectsInput",
|
117 117 | ),
|
118 118 | ::aws_smithy_schema::ShapeType::String,
|
119 - | "bucket",
|
119 + | "Bucket",
|
120 120 | 0,
|
121 121 | )
|
122 122 | .with_http_label();
|
123 123 | static DELETEOBJECTSINPUT_MEMBER_DELETE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
124 124 | ::aws_smithy_schema::ShapeId::from_static(
|
125 125 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$Delete",
|
126 126 | "com.amazonaws.s3.synthetic",
|
127 127 | "DeleteObjectsInput",
|
128 128 | ),
|
129 129 | ::aws_smithy_schema::ShapeType::Structure,
|
130 - | "delete",
|
130 + | "Delete",
|
131 131 | 1,
|
132 132 | )
|
133 133 | .with_xml_name("Delete")
|
134 134 | .with_http_payload();
|
135 135 | static DELETEOBJECTSINPUT_MEMBER_MFA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$MFA",
|
138 138 | "com.amazonaws.s3.synthetic",
|
139 139 | "DeleteObjectsInput",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::String,
|
142 - | "mfa",
|
142 + | "MFA",
|
143 143 | 2,
|
144 144 | )
|
145 145 | .with_http_header("x-amz-mfa");
|
146 146 | static DELETEOBJECTSINPUT_MEMBER_REQUEST_PAYER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
147 147 | ::aws_smithy_schema::ShapeId::from_static(
|
148 148 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$RequestPayer",
|
149 149 | "com.amazonaws.s3.synthetic",
|
150 150 | "DeleteObjectsInput",
|
151 151 | ),
|
152 152 | ::aws_smithy_schema::ShapeType::String,
|
153 - | "request_payer",
|
153 + | "RequestPayer",
|
154 154 | 3,
|
155 155 | )
|
156 156 | .with_http_header("x-amz-request-payer");
|
157 157 | static DELETEOBJECTSINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
158 158 | ::aws_smithy_schema::ShapeId::from_static(
|
159 159 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$BypassGovernanceRetention",
|
160 160 | "com.amazonaws.s3.synthetic",
|
161 161 | "DeleteObjectsInput",
|
162 162 | ),
|
163 163 | ::aws_smithy_schema::ShapeType::Boolean,
|
164 - | "bypass_governance_retention",
|
164 + | "BypassGovernanceRetention",
|
165 165 | 4,
|
166 166 | )
|
167 167 | .with_http_header("x-amz-bypass-governance-retention");
|
168 168 | static DELETEOBJECTSINPUT_MEMBER_EXPECTED_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
169 169 | ::aws_smithy_schema::ShapeId::from_static(
|
170 170 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$ExpectedBucketOwner",
|
171 171 | "com.amazonaws.s3.synthetic",
|
172 172 | "DeleteObjectsInput",
|
173 173 | ),
|
174 174 | ::aws_smithy_schema::ShapeType::String,
|
175 - | "expected_bucket_owner",
|
175 + | "ExpectedBucketOwner",
|
176 176 | 5,
|
177 177 | )
|
178 178 | .with_http_header("x-amz-expected-bucket-owner");
|
179 179 | static DELETEOBJECTSINPUT_MEMBER_CHECKSUM_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
180 180 | ::aws_smithy_schema::ShapeId::from_static(
|
181 181 | "com.amazonaws.s3.synthetic#DeleteObjectsInput$ChecksumAlgorithm",
|
182 182 | "com.amazonaws.s3.synthetic",
|
183 183 | "DeleteObjectsInput",
|
184 184 | ),
|
185 185 | ::aws_smithy_schema::ShapeType::String,
|
186 - | "checksum_algorithm",
|
186 + | "ChecksumAlgorithm",
|
187 187 | 6,
|
188 188 | )
|
189 189 | .with_http_header("x-amz-sdk-checksum-algorithm");
|
190 190 | static DELETEOBJECTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
191 191 | DELETEOBJECTSINPUT_SCHEMA_ID,
|
192 192 | ::aws_smithy_schema::ShapeType::Structure,
|
193 193 | &[
|
194 194 | &DELETEOBJECTSINPUT_MEMBER_BUCKET,
|
195 195 | &DELETEOBJECTSINPUT_MEMBER_DELETE,
|
196 196 | &DELETEOBJECTSINPUT_MEMBER_MFA,
|
197 197 | &DELETEOBJECTSINPUT_MEMBER_REQUEST_PAYER,
|
198 198 | &DELETEOBJECTSINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION,
|
199 199 | &DELETEOBJECTSINPUT_MEMBER_EXPECTED_BUCKET_OWNER,
|
200 200 | &DELETEOBJECTSINPUT_MEMBER_CHECKSUM_ALGORITHM,
|
201 201 | ],
|
202 - | );
|
202 + | )
|
203 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("POST", "/?delete", None));
|
203 204 | impl DeleteObjectsInput {
|
204 205 | /// The schema for this shape.
|
205 206 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEOBJECTSINPUT_SCHEMA;
|
206 207 | }
|
207 208 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteObjectsInput {
|
208 209 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
209 210 | fn serialize_members(
|
210 211 | &self,
|
211 212 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
212 213 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
213 214 | if let Some(ref val) = self.bucket {
|
214 215 | ser.write_string(&DELETEOBJECTSINPUT_MEMBER_BUCKET, val)?;
|
215 216 | }
|
216 217 | if let Some(ref val) = self.delete {
|
217 218 | ser.write_struct(&DELETEOBJECTSINPUT_MEMBER_DELETE, val)?;
|
218 219 | }
|
219 220 | if let Some(ref val) = self.mfa {
|
220 221 | ser.write_string(&DELETEOBJECTSINPUT_MEMBER_MFA, val)?;
|
221 222 | }
|
222 223 | if let Some(ref val) = self.request_payer {
|
223 224 | ser.write_string(&DELETEOBJECTSINPUT_MEMBER_REQUEST_PAYER, val.as_str())?;
|
224 225 | }
|
225 226 | if let Some(ref val) = self.bypass_governance_retention {
|
226 227 | ser.write_boolean(&DELETEOBJECTSINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION, *val)?;
|
227 228 | }
|
228 229 | if let Some(ref val) = self.expected_bucket_owner {
|
229 230 | ser.write_string(&DELETEOBJECTSINPUT_MEMBER_EXPECTED_BUCKET_OWNER, val)?;
|
230 231 | }
|
231 232 | if let Some(ref val) = self.checksum_algorithm {
|
232 233 | ser.write_string(&DELETEOBJECTSINPUT_MEMBER_CHECKSUM_ALGORITHM, val.as_str())?;
|
233 234 | }
|
234 235 | Ok(())
|
235 236 | }
|
236 237 | }
|
237 238 | impl DeleteObjectsInput {
|
238 239 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
239 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
240 - | deserializer: &mut D,
|
240 + | pub fn deserialize(
|
241 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
241 242 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
242 243 | #[allow(unused_variables, unused_mut)]
|
243 244 | let mut builder = Self::builder();
|
244 245 | #[allow(
|
245 246 | unused_variables,
|
246 247 | unreachable_code,
|
247 248 | clippy::single_match,
|
248 249 | clippy::match_single_binding,
|
249 250 | clippy::diverging_sub_expression
|
250 251 | )]
|
251 - | deserializer.read_struct(&DELETEOBJECTSINPUT_SCHEMA, (), |_, member, deser| {
|
252 + | deserializer.read_struct(&DELETEOBJECTSINPUT_SCHEMA, &mut |member, deser| {
|
252 253 | match member.member_index() {
|
253 254 | Some(0) => {
|
254 255 | builder.bucket = Some(deser.read_string(member)?);
|
255 256 | }
|
256 257 | Some(1) => {
|
257 258 | builder.delete = Some(crate::types::Delete::deserialize(deser)?);
|
258 259 | }
|
259 260 | Some(2) => {
|
260 261 | builder.mfa = Some(deser.read_string(member)?);
|
261 262 | }
|
262 263 | Some(3) => {
|
263 264 | builder.request_payer = Some(crate::types::RequestPayer::from(deser.read_string(member)?.as_str()));
|
264 265 | }
|
265 266 | Some(4) => {
|
266 267 | builder.bypass_governance_retention = Some(deser.read_boolean(member)?);
|
267 268 | }
|
268 269 | Some(5) => {
|
269 270 | builder.expected_bucket_owner = Some(deser.read_string(member)?);
|
270 271 | }
|
271 272 | Some(6) => {
|
272 273 | builder.checksum_algorithm = Some(crate::types::ChecksumAlgorithm::from(deser.read_string(member)?.as_str()));
|
273 274 | }
|
274 275 | _ => {}
|
275 276 | }
|
276 277 | Ok(())
|
277 278 | })?;
|
279 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
280 + | builder
|
281 + | .build()
|
282 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
283 + | }
|
284 + | }
|
285 + | impl DeleteObjectsInput {
|
286 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
287 + | /// Header-bound members are read directly from headers, avoiding runtime
|
288 + | /// member iteration overhead. Body members are read via the deserializer.
|
289 + | pub fn deserialize_with_response(
|
290 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
291 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
292 + | _status: u16,
|
293 + | body: &[u8],
|
294 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
295 + | #[allow(unused_variables, unused_mut)]
|
296 + | let mut builder = Self::builder();
|
297 + | if let Some(val) = headers.get("x-amz-mfa") {
|
298 + | builder.mfa = Some(val.to_string());
|
299 + | }
|
300 + | if let Some(val) = headers.get("x-amz-request-payer") {
|
301 + | builder.request_payer = Some(crate::types::RequestPayer::from(val));
|
302 + | }
|
303 + | if let Some(val) = headers.get("x-amz-bypass-governance-retention") {
|
304 + | builder.bypass_governance_retention = val.parse::<bool>().ok();
|
305 + | }
|
306 + | if let Some(val) = headers.get("x-amz-expected-bucket-owner") {
|
307 + | builder.expected_bucket_owner = Some(val.to_string());
|
308 + | }
|
309 + | if let Some(val) = headers.get("x-amz-sdk-checksum-algorithm") {
|
310 + | builder.checksum_algorithm = Some(crate::types::ChecksumAlgorithm::from(val));
|
311 + | }
|
312 + | if !body.is_empty() {
|
313 + | builder.delete = Some(crate::types::Delete::deserialize(deserializer)?);
|
314 + | }
|
278 315 | builder
|
279 316 | .build()
|
280 317 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
281 318 | }
|
282 319 | }
|
283 320 | impl DeleteObjectsInput {
|
284 321 | /// Creates a new builder-style object to manufacture [`DeleteObjectsInput`](crate::operation::delete_objects::DeleteObjectsInput).
|
285 322 | pub fn builder() -> crate::operation::delete_objects::builders::DeleteObjectsInputBuilder {
|
286 323 | crate::operation::delete_objects::builders::DeleteObjectsInputBuilder::default()
|
287 324 | }
|